cscg22-gearboy

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

Makefile (867B)


      1#
      2# Simple Makefile that compiles all .c and .s files in the same folder
      3#
      4
      5# If you move this project you can change the directory 
      6# to match your GBDK root directory (ex: GBDK_HOME = "C:/GBDK/"
      7GBDK_HOME = ../../../
      8
      9LCC = $(GBDK_HOME)bin/lcc
     10
     11# You can uncomment the line below to turn on debug output
     12# LCC = $(LCC) -debug
     13
     14# You can set the name of the .gb ROM file here
     15PROJECTNAME    = gbdecompress
     16
     17BINS	    = $(PROJECTNAME).gb
     18CSOURCES   := $(wildcard *.c)
     19ASMSOURCES := $(wildcard *.s)
     20
     21all:	$(BINS)
     22
     23compile.bat: Makefile
     24	@echo "REM Automatically generated from Makefile" > compile.bat
     25	@make -sn | sed y/\\//\\\\/ | grep -v make >> compile.bat
     26
     27# Compile and link all source files in a single call to LCC
     28$(BINS): $(CSOURCES) $(ASMSOURCES)
     29	$(LCC) -o $@ $(CSOURCES) $(ASMSOURCES)
     30
     31clean:
     32	rm -f *.o *.lst *.map *.gb *.ihx *.sym *.cdb *.adb *.asm *.noi
     33