cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

Makefile (576B)


      1CC	= ../../../bin/lcc -mz80:gg -Wm-yoA -Wl-m -Wl-j
      2
      3BINS	= smoketest.gg
      4
      5all:	$(BINS)
      6
      7ASRC = $(wildcard *.s)
      8CSRC = $(wildcard *.c)
      9
     10OBJS = $(CSRC:%.c=%.o) $(ASRC:%.s=%.o)
     11
     12compile.bat: Makefile
     13	@echo "REM Automatically generated from Makefile" > compile.bat
     14	@make -sn | sed y/\\//\\\\/ | grep -v make >> compile.bat
     15
     16# Compile and link single file in one pass
     17
     18%.o:	%.c
     19	$(CC) -c -o $@ $<
     20
     21%.o:	%.s
     22	$(CC) -c -o $@ $<
     23
     24$(BINS):	$(OBJS)
     25	$(CC) -Wm-yS -o $@ $^
     26	rm -f *.map *.noi *.ihx *.lst
     27
     28clean:
     29	rm -f *.o *.lst *.map *.gg *~ *.rel *.cdb *.ihx *.lnk *.sym *.asm *.noi
     30