It seems like it takes about 15 minutes to compile and link a new fba executable with mingw, even after only making a minor change to the code. To get around this, I came up with 2 scripts, one to compile and one to link - which gets the compile&link time down to about 10 seconds
lets say you're at ~/fbalpha/trunk and you made a change to src/burn/drv/taito/d_darius2.cpp, and want to build an executable real quick.
user@---------- ~/fbalpha/trunk
$ cm drv/taito/d_darius2
compile-o-matic v.0001 - usage cm dir/sourcefile
user@---------- ~/fbalpha/trunk
$ ./l.sh
linking..
copying to /home/user/fbadebugg/
user@---------- ~/fbalpha/trunk
$
"cm" does the compiling, and "l.sh" does the linking. Here's how to synthesize the scripts, there is quite a bit involved, but the time it saves is worth it. (You have to generate a new link script (or update it) each time something new is added, like a driver or something.)
First, make sure the make process completes successfully and builds an executable, then:
Edit Makefile.mingw, search for "linking executable" and add this line below the echo:
@echo $(LD) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(lib)
Go to line #650 in Makefile.mingw, which should be "@echo Compiling $<..." and add this line below it, and save/exit editor:
@echo $(CC) $(CXXFLAGS) -c $< -o $(subst $(srcdir),$(objdir),$(<D))/$(@F)
execute this, it will change the timestamp on the d_darius2.cpp file, so it gets re-compiled with our new makefile:
touch src/burn/drv/taito/d_darius2.cpp
almost there! now run
make mingw471 > makelog.txt 2>&1
and wait about 15 minutes or so for everything to complete, or, open another shell window and run tail -f makelog.txt to see whats going on.
- stay tuned for part 2 -