forked from flozz/gameboy-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (20 loc) · 805 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Simple Makefile that compiles all .c and .s files in the same folder
#
# NOTE: If you move this project you can change the directory
# to match your GBDK root directory (ex: GBDK_HOME = "/home/user/GBDK/")
GBDK_HOME = ../gbdk/
LCC = $(GBDK_HOME)bin/lcc
LCCFLAGS += -Wa-l -Wl-m -Wl-j -v
# You can uncomment the line below to turn on debug output
# LCCFLAGS += -debug
# You can set the name of the .gb ROM file here
PROJECTNAME = Graphics1
BINS = $(PROJECTNAME).gb
CSOURCES := $(wildcard src/*.c)
ASMSOURCES := $(wildcard src/*.s)
all: $(BINS)
# Compile and link all source files in a single call to LCC
$(BINS): $(CSOURCES) $(ASMSOURCES)
$(LCC) $(LCCFLAGS) -o $@ $(CSOURCES) $(ASMSOURCES)
clean:
rm --verbose -f *.o *.lst *.map *.gb *.ihx *.sym *.cdb *.adb *.asm *.noi