gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/examples/gb/ram_function/Makefile
1 # If you move this project you can change the directory
2 # to match your GBDK root directory (ex: GBDK_HOME = "C:/GBDK/"
3 ifndef GBDK_HOME
4 GBDK_HOME = ../../../
5 endif
6
7 LCC = $(GBDK_HOME)/bin/lcc -Wa-l -Wl-m -Wl-j
8
9 BINS = ram_fn.gb
10
11 # GBDK_DEBUG = ON
12 ifdef GBDK_DEBUG
13 LCCFLAGS += -debug -v
14 endif
15
16
17 all: $(BINS)
18
19 compile.bat: Makefile
20 @echo "REM Automatically generated from Makefile" > compile.bat
21 @make -sn | sed y/\\//\\\\/ | sed s/mkdir\ -p\/mkdir\/ | grep -v make >> compile.bat
22
23 %.o: %.c
24 $(LCC) $(LCCFLAGS) -c -o $@ $<
25
26 %.s: %.c
27 $(LCC) $(LCCFLAGS) -S -o $@ $<
28
29 %.o: %.s
30 $(LCC) $(LCCFLAGS) -c -o $@ $<
31
32 %.gb: %.o
33 $(LCC) $(LCCFLAGS) -o $@ $<
34
35 clean:
36 rm -f *.o *.lst *.map *.gb *~ *.rel *.cdb *.adb *.ihx *.lnk *.sym *.asm *.noi *.rst
37
38
39 ram_fn.o: ram_fn.c
40 $(LCC) $(LCCFLAGS) -D_inc_ram=0xD000 -D_inc_hiram=0xFFA0 -c -o $@ $<
41
42 ram_fn.gb: ram_fn.o
43 $(LCC) $(LCCFLAGS) -Wl-g_inc_ram=0xD000 -Wl-g_inc_hiram=0xFFA0 -o $@ ram_fn.o
44
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.