gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/examples/gb/template_minimal/Makefile
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/"
7 ifndef GBDK_HOME
8 GBDK_HOME = ../../../
9 endif
10
11 LCC = $(GBDK_HOME)/bin/lcc
12
13 # GBDK_DEBUG = ON
14 ifdef GBDK_DEBUG
15 LCCFLAGS += -debug -v
16 endif
17
18
19 # You can set the name of the .gb ROM file here
20 PROJECTNAME = Example
21
22 BINS = $(PROJECTNAME).gb
23 CSOURCES := $(wildcard *.c)
24 ASMSOURCES := $(wildcard *.s)
25
26 all: $(BINS)
27
28 compile.bat: Makefile
29 @echo "REM Automatically generated from Makefile" > compile.bat
30 @make -sn | sed y/\\//\\\\/ | sed s/mkdir\ \-p/mkdir/ | grep -v make >> compile.bat
31
32 # Compile and link all source files in a single call to LCC
33 $(BINS): $(CSOURCES) $(ASMSOURCES)
34 $(LCC) $(LCCFLAGS) -o $@ $(CSOURCES) $(ASMSOURCES)
35
36 clean:
37 rm -f *.o *.lst *.map *.gb *.ihx *.sym *.cdb *.adb *.asm *.noi *.rst
38
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.