Makefile (463B)
1LCC = ./gbdk/build/gbdk/bin/lcc 2SDCC = ./sdcc/bin/sdcc 3GEARBOY = ./gearboy/platforms/linux/gearboy 4 5.PHONY: all clean run 6 7all: main.gb 8 9clean: 10 rm -f main.gb 11 12$(SDCC): 13 @if [ ! -e Makefile ]; then \ 14 cd sdcc && ./configure; \ 15 fi 16 make -C sdcc 17 18$(LCC): $(SDCC) 19 SDCCDIR=$(PWD)/sdcc make -C gbdk 20 21main.gb: main.c $(LCC) 22 $(LCC) -o $@ -Wall $< -Wl-yp0x143=0x80 23 24$(GEARBOY): 25 DEBUG=1 make -C ./gearboy/platforms/linux 26 27run: $(GEARBOY) main.gb 28 $(GEARBOY) main.gb