Josh @ Dreamland
|
 |
Posted on: May 12, 2010, 08:00:05 am |
|
|
Prince of all Goldfish
 Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Good news everyone. I got the makefiles not to recompile all the time. I've not yet committed my changes though; be patient. I want to make sure all the changes I've made to the syntax checker and parser hold up during some field testing, and there's some code that needs moved around because it's being called too often.
Anyway, I'm not sure I can enumerate all the changes between my next revision (expect it tonight) and my last; that's why we have Diff.
The IRC has relieved me of the things I usually keep in a list to say when I make a newspost, especially with freezway asking how makefiles are coming every twenty minutes. Freezway, the makefiles work, but you can't have them. So there.
I may as well share concerns as well as success. I decided to use makefiles, despite them being an ancient art that's a huge pain to get working, because I wanted individual systems to be responsible for their own rules of building. This would be especially helpful, I thought, when we did the Wii port, which is necessarily Make-based. Problem is, I'm not sure what changes would need made to the makefile (particularly the ones under SHELL/ and SHELL/Universal_System/) to enable the modified Make to compile it correctly. I will need to thoroughly inspect the Wii-written makefiles for things that need set.
The most glaringly obvious of these is that $(DEVKITPPC) needs set, and that it includes a file called wii_rules from that directory. This leaves a number of questions that I can't yet answer with certainty. Namely, do I want to make it so that every system relies on a file called $(COMPILER_DATA)/$(PLATFORMNAME)_rules? Do I want to just include makefiles/makefile.$(PLATFORMNAME)?
It seems the latter would be the simplest as well as the most easily extended since as many files can be dumped into that folder as the OS allows, and the makefile will include any of them LGM/ENIGMA request by name or fragment of name (wii, pc, etc). It is what I will likely be going with unless someone has a better idea.
That leaves one additional problem that needs dealt with for a number of reasons. How do we incorporate multiple compilers? Currently, ENIGMA frantically searches for c++ and g++ at load time. If it doesn't find them, it errors to Ism, who asks the user. Either way, it leaves knowing where gcc and make/mingw32-make are located. That location name can be made into a map, certainly. But, where do we store compiler information? A new folder, ENIGMAsystem/compilers/? A new text file, ENIGMAsystem/compilers? The former would be more desirable so that, should compilers be pluginized (and this is thinking way ahead), plugins aren't fighting for permissions and last word in one text file, and aren't iterating it on and off for their input. It would just rely--as the entire remainder of the system would, really--on no two compilers sharing a name.
Perhaps all that belongs in Proposals anyway, I guess I just needed something to put in this newspost. Maybe I'll post it there later.
Anyway, real work to do now. Cheers.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
freezway
|
 |
Reply #2 Posted on: May 12, 2010, 05:21:49 pm |
|
|
 Joined: Dec 2009
Posts: 220
|
=)
|
|
|
Logged
|
if you drop a cat with buttered toast strapped to its back, which side lands down? joshdreamland: our languages are based on the idea that it's going to end up FUBAR /kick retep998
|
|
|
|
|
Josh @ Dreamland
|
 |
Reply #5 Posted on: May 13, 2010, 08:21:08 am |
|
|
Prince of all Goldfish
 Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
kkg: I did so in R3 where the only compiler we'd be using was the native GCC, but accounting for the Wii, I realized we would need makefiles at some point. I still didn't want to, so I considered the full set of benefits and flaws that would come with it;
Flaws: - Labor. Oooh, labor. Benefits: - Any system under Platforms/ or Graphics_Systems/ could be compiled without ENIGMA even knowing they exist. - - - This means that more systems could be added without any further hard-coding in the compiler. - Make would enable compilation for more fragile systems, such as the Wii, which always use makefiles to get the job done right. - Make would ultimately handle dependency resolution for me, compiling only what needed to be (as it does now).
At that point, it was clear that whatever work it took to learn make and write makefiles, even for newer systems down the road, it'd be worth it. So I went the extra mile and wrote a shell script to write makefiles for me/other developers.
Also, it should correctly locate Make on Windows now, if anyone would bother to test 218.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
IsmAvatar
|
 |
Reply #6 Posted on: May 13, 2010, 11:02:25 am |
|
|
LateralGM Developer
 Location: Pennsylvania/USA Joined: Apr 2008
Posts: 877
|
ismavatar@mage-ubuntu:~/enigma-dev$ svn up ... Updated to revision 218. ismavatar@mage-ubuntu:~/enigma-dev$ make cd CompilerSource && make make[1]: Entering directory `/home/ismavatar/enigma-dev/CompilerSource' mkdir .eobjs g++ -Wall -fPIC -c cfile_parse/cfile_parse.cpp -o .eobjs/cfile_parse.o make[1]: Leaving directory `/home/ismavatar/enigma-dev/CompilerSource' ismavatar@mage-ubuntu:~/enigma-dev$ Make only compiled one object file, and I'm not seeing any kind of dll/so to work with here. Had to use the old method of C::B to get me an so.
ismavatar@mage-ubuntu:~/enigma-dev$ java -jar lgm16b4.jar Java Version: 10600 (1.6.0_20) Loading lib files in /home/ismavatar/enigma-dev/lgm16b4.jar 01_move.lgl 02_main1.lgl 03_main2.lgl 04_control.lgl 05_score.lgl 06_extra.lgl 07_draw.lgl SvnKit missing, corrupted, or unusable. Please download and place next to the enigma plugin in order to enable auto-update. Initializing Enigma: Intializing Parsers.Probing for GCC... GCC located. Path: `' Successfully loaded GCC definitions Undefining _GLIBCXX_EXPORT_TEMPLATE # 1 "blank.txt" # 1 "<built-in>" # 1 "<command-line>" # 1 "blank.txt" 7dirs: "/usr/include/c++/4.4/" "/usr/include/c++/4.4/i486-linux-gnu/" "/usr/include/c++/4.4/backward/" "/usr/local/include/" "/usr/lib/gcc/i486-linux-gnu/4.4.3/include/" "/usr/lib/gcc/i486-linux-gnu/4.4.3/include-fixed/" "/usr/include/" All that worked. Trying to find make. cd CompilerSource && make make[1]: Entering directory `/home/ismavatar/enigma-dev/CompilerSource' make[1]: `.eobjs/cfile_parse.o' is up to date. make[1]: Leaving directory `/home/ismavatar/enigma-dev/CompilerSource' Good news; it should seem I can reach make from `make' Ignoring error in specialization expression at position 19: Expected operator at this point
Ignoring error in specialization expression at position 19: Expected operator at this point
Ignoring error in specialization expression at position 23: Expected operator at this point
Successfully parsed ENIGMA's engine (570ms) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Initializing EDL Parser... Done. Unable to load plugin: jna.jar: null: Missing plugin entry point (LGM-Plugin) I then clicked Enigma->Run and discovered that it's about time for LGM to start threading...
Location in memory of structure: 0x94fed78 File version: 600
COPYING SOME FUCKING RESOURCES: Copying sprite names [0] Copying sound names [0] Copying background names [0] Copying path names [kidding, these are totally not implemented] [0] Copying script names [0] Copying font names [kidding, these are totally not implemented] [0] Copying timeline names [kidding, these are totally not implemented] [0] Copying object names [0] Copying room names [0] SYNTAX CHECKING AND PRIMARY PARSING: 0 Scripts: "Linking" scripts `Linking' 0 scripts in 0 passes... Completing script "Link" Done. 0 Objects: "Linking" scripts into the objects... "Link" complete. # Target takes the following parameters: # GMODE{run,build,debug,compile} # GRAPHICS{<anything under graphics_systems>} # PLATFORM{<anything under platforms>} # GLINKS{<requirements of anything above>} echo Okay. Okay. cd ENIGMAsystem/SHELL/ && make GMODE=Run GLINKS="-lGL -lz" GRAPHICS=OpenGL PLATFORM=xlib make[1]: Entering directory `/home/ismavatar/enigma-dev/ENIGMAsystem/SHELL' # Target takes the following parameters: # GMODE{run,build,debug,compile} # GRAPHICS{<anything under graphics_systems>} # PLATFORM{<anything under platforms>} # GLINKS{<anything needed by the above as linker args>} cd Graphics_Systems/OpenGL/ && make Run MODE=Run make[2]: Entering directory `/home/ismavatar/enigma-dev/ENIGMAsystem/SHELL/Graphics_Systems/OpenGL' mkdir .eobjs_Run g++ -c graphics_object.cpp -o .eobjs_Run/graphics_object.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/GSblend.o] Error 1 (ignored) g++ -c GSblend.cpp -o .eobjs_Run/GSblend.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/GScolors.o] Error 1 (ignored) g++ -c GScolors.cpp -o .eobjs_Run/GScolors.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/GSenable.o] Error 1 (ignored) g++ -c GSenable.cpp -o .eobjs_Run/GSenable.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/GSmiscextra.o] Error 1 (ignored) g++ -c GSmiscextra.cpp -o .eobjs_Run/GSmiscextra.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/GSprmtvs.o] Error 1 (ignored) g++ -c GSprmtvs.cpp -o .eobjs_Run/GSprmtvs.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/GSscreen.o] Error 1 (ignored) g++ -c GSscreen.cpp -o .eobjs_Run/GSscreen.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/GSspriteadd.o] Error 1 (ignored) g++ -c GSspriteadd.cpp -o .eobjs_Run/GSspriteadd.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/GSsprite.o] Error 1 (ignored) g++ -c GSsprite.cpp -o .eobjs_Run/GSsprite.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/GSstdraw.o] Error 1 (ignored) g++ -c GSstdraw.cpp -o .eobjs_Run/GSstdraw.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/GSsurface.o] Error 1 (ignored) g++ -c GSsurface.cpp -o .eobjs_Run/GSsurface.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/OPENGLStd.o] Error 1 (ignored) g++ -c OPENGLStd.cpp -o .eobjs_Run/OPENGLStd.o mkdir .eobjs_Run/ mkdir: cannot create directory `.eobjs_Run/': File exists make[2]: [Run] Error 1 (ignored) make[2]: Leaving directory `/home/ismavatar/enigma-dev/ENIGMAsystem/SHELL/Graphics_Systems/OpenGL' cd Platforms/xlib/ && make Run MODE=Run make[2]: Entering directory `/home/ismavatar/enigma-dev/ENIGMAsystem/SHELL/Platforms/xlib' mkdir .eobjs_Run g++ -c XLIBmain.cpp -o .eobjs_Run/XLIBmain.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/XLIBwindow.o] Error 1 (ignored) g++ -c XLIBwindow.cpp -o .eobjs_Run/XLIBwindow.o mkdir .eobjs_Run/ mkdir: cannot create directory `.eobjs_Run/': File exists make[2]: [Run] Error 1 (ignored) make[2]: Leaving directory `/home/ismavatar/enigma-dev/ENIGMAsystem/SHELL/Platforms/xlib' cd Universal_System/ && make Run MODE=Run make[2]: Entering directory `/home/ismavatar/enigma-dev/ENIGMAsystem/SHELL/Universal_System' mkdir .eobjs_Run g++ -c CallbackArrays.cpp -o .eobjs_Run/CallbackArrays.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/collisions.o] Error 1 (ignored) g++ -c collisions.cpp -o .eobjs_Run/collisions.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/collisions_object.o] Error 1 (ignored) g++ -c collisions_object.cpp -o .eobjs_Run/collisions_object.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/compression.o] Error 1 (ignored) g++ -c compression.cpp -o .eobjs_Run/compression.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/EGMstd.o] Error 1 (ignored) g++ -c EGMstd.cpp -o .eobjs_Run/EGMstd.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/ENIGMA_GLOBALS.o] Error 1 (ignored) g++ -c ENIGMA_GLOBALS.cpp -o .eobjs_Run/ENIGMA_GLOBALS.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/estring.o] Error 1 (ignored) g++ -c estring.cpp -o .eobjs_Run/estring.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/events.o] Error 1 (ignored) g++ -c events.cpp -o .eobjs_Run/events.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/event_system.o] Error 1 (ignored) g++ -c event_system.cpp -o .eobjs_Run/event_system.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/globalupdate.o] Error 1 (ignored) g++ -c globalupdate.cpp -o .eobjs_Run/globalupdate.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/IMGloading.o] Error 1 (ignored) g++ -c IMGloading.cpp -o .eobjs_Run/IMGloading.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/instance.o] Error 1 (ignored) g++ -c instance.cpp -o .eobjs_Run/instance.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/mathnc.o] Error 1 (ignored) g++ -c mathnc.cpp -o .eobjs_Run/mathnc.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/OBJaccess.o] Error 1 (ignored) g++ -c OBJaccess.cpp -o .eobjs_Run/OBJaccess.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/object.o] Error 1 (ignored) g++ -c object.cpp -o .eobjs_Run/object.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/objecttable.o] Error 1 (ignored) g++ -c objecttable.cpp -o .eobjs_Run/objecttable.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/planar_object.o] Error 1 (ignored) g++ -c planar_object.cpp -o .eobjs_Run/planar_object.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/reflexive_types.o] Error 1 (ignored) g++ -c reflexive_types.cpp -o .eobjs_Run/reflexive_types.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/roomsystem.o] Error 1 (ignored) g++ -c roomsystem.cpp -o .eobjs_Run/roomsystem.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/simplecollisions.o] Error 1 (ignored) g++ -c simplecollisions.cpp -o .eobjs_Run/simplecollisions.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/spriteinit.o] Error 1 (ignored) g++ -c spriteinit.cpp -o .eobjs_Run/spriteinit.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/spritestruct.o] Error 1 (ignored) g++ -c spritestruct.cpp -o .eobjs_Run/spritestruct.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/transform_object.o] Error 1 (ignored) g++ -c transform_object.cpp -o .eobjs_Run/transform_object.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/var_cr3.o] Error 1 (ignored) g++ -c var_cr3.cpp -o .eobjs_Run/var_cr3.o mkdir .eobjs_Run mkdir: cannot create directory `.eobjs_Run': File exists make[2]: [.eobjs_Run/WITHconstruct.o] Error 1 (ignored) g++ -c WITHconstruct.cpp -o .eobjs_Run/WITHconstruct.o mkdir .eobjs_Run/ mkdir: cannot create directory `.eobjs_Run/': File exists make[2]: [Run] Error 1 (ignored) make[2]: Leaving directory `/home/ismavatar/enigma-dev/ENIGMAsystem/SHELL/Universal_System' g++ SHELLmain.cpp Graphics_Systems/OpenGL/.eobjs_Run/*.o Platforms/xlib/.eobjs_Run/*.o Universal_System/.eobjs_Run/*.o -lGL -lz -o game.exe make[1]: Leaving directory `/home/ismavatar/enigma-dev/ENIGMAsystem/SHELL' +++++Make completed successfully.++++++++++++++++++++++++++++++++++++ No resource data in exe Game returned 0 0 Sprites: 0 Sounds: 0 After which I was greeted with a game window (default).
Ok, someone's going to have to explain to me how to add scrollbars to that thing, because [ codebox ] doesn't work.
Also, one of these days you'll have to give me the new Enigma/LateralGM background tile, because I never got a copy of it.
|
|
« Last Edit: May 13, 2010, 11:36:31 am by IsmAvatar »
|
Logged
|
|
|
|
Josh @ Dreamland
|
 |
Reply #7 Posted on: May 13, 2010, 02:30:16 pm |
|
|
Prince of all Goldfish
 Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
Ism: I'm not sure if Retro's makefile could magically discern what OS you are on, but mine can't. From the main directory's makefile, call make ENIGMA PLATFORM=linux.
And yes, threading and console output would be nice. If you like, I can prefix messages to redirect with "enigma: ". Don't worry, compile is only slow the first time, then it completes in seconds.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
luiscubal
|
 |
Reply #8 Posted on: May 13, 2010, 03:56:59 pm |
|
|
 Joined: Jun 2009
Posts: 452
|
I'm not sure if Retro's makefile could magically discern what OS you are on, but mine can't. That might be a feature, rather than a bug, if you consider cross-compilation. A lot of software is hard-coded to compile for the platform it is running on, which is not always what one want, and it is painful to change platforms. Unless, of course, it would detect and use the current OS as the default platform, but you could override that. Related: http://stackoverflow.com/questions/714100/os-detecting-makefileAlso, for multi-core computers, you may want to try the make -j(-j 2 on dual cores, -j 4 on quad cores, etc.) flag to make it faster.
|
|
|
Logged
|
|
|
|
freezway
|
 |
Reply #9 Posted on: May 13, 2010, 05:20:19 pm |
|
|
 Joined: Dec 2009
Posts: 220
|
i usually use -j5
|
|
|
Logged
|
if you drop a cat with buttered toast strapped to its back, which side lands down? joshdreamland: our languages are based on the idea that it's going to end up FUBAR /kick retep998
|
|
|
Josh @ Dreamland
|
 |
Reply #10 Posted on: May 13, 2010, 10:38:54 pm |
|
|
Prince of all Goldfish
 Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
You know, few things are more annoying than your OS dying because Java really blows on it.
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
freezway
|
 |
Reply #11 Posted on: May 14, 2010, 12:17:41 am |
|
|
 Joined: Dec 2009
Posts: 220
|
does ctrl-alt-bksp work?
|
|
|
Logged
|
if you drop a cat with buttered toast strapped to its back, which side lands down? joshdreamland: our languages are based on the idea that it's going to end up FUBAR /kick retep998
|
|
|
kkg
|
 |
Reply #12 Posted on: May 14, 2010, 01:33:20 am |
|
|
 Location: Australia Joined: Nov 2009
Posts: 84
|
@freezway I love doing that to the computers that use X at the local shops  Watching the employees try to figure out what's wrong is priceless
|
|
|
Logged
|
PC: Core i7-2600 @ 3.8ghz | 4x 4gb G.Skill RipjawZ DDR3-2000 | GTX580 | Win7 x64 Time is the greatest teacher, however it kills every single one of its pupils.
|
|
|
Josh @ Dreamland
|
 |
Reply #13 Posted on: May 14, 2010, 08:04:12 am |
|
|
Prince of all Goldfish
 Location: Pittsburgh, PA, USA Joined: Feb 2008
Posts: 2950
|
You have local shops with computers running X? Most people around here don't really know what Linux is...
|
|
|
Logged
|
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble "I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
|
|
|
|
|