Makefile
Posted: Wed Jul 30, 2014 11:45 am
While cleaning up my random coding snippets and setting up some project-directories I looked through the makefile to make everything compile again and saw the following parts:
and
Wouldn't it be better to expect both files in SRC rather than LIBSRC? The rom_head file contains the name of the game, which is likely to be different for each project one is working on. The sega.s file contains the list of vectors, which are also likely to be different, at least if you're coding things where timing is critical...
Code: Select all
out/sega.o: $(LIBSRC)/boot/sega.s out/rom_head.bin
$(MKDIR) -p out
$(CC) $(FLAGS) -c $(LIBSRC)/boot/sega.s -o $@
Code: Select all
out/rom_head.o: $(LIBSRC)/boot/rom_head.c
$(MKDIR) -p out
$(CC) $(FLAGS) -c $< -o $@