-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (28 loc) · 933 Bytes
/
Makefile
File metadata and controls
39 lines (28 loc) · 933 Bytes
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
29
30
31
32
33
34
35
36
37
38
#
# Simple Makefile that compiles all .c and .s files in the same folder
#
# If you move this project you can change the directory
# to match your GBDK root directory (ex: GBDK_HOME = "C:/GBDK/"
ifndef GBDK_HOME
GBDK_HOME = ~/gbdk/
endif
LCC = $(GBDK_HOME)bin/lcc
LCCFLAGS = -Wm-yC
# GBDK_DEBUG = ON
ifdef GBDK_DEBUG
LCCFLAGS += -debug -v
endif
# You can set the name of the .gb ROM file here
PROJECTNAME = NoboruColor
BINS = $(PROJECTNAME).gb
CSOURCES := $(wildcard *.c)
ASMSOURCES := $(wildcard *.s)
all: $(BINS)
compile.bat: Makefile
@echo "REM Automatically generated from Makefile" > compile.bat
@make -sn | sed y/\\//\\\\/ | sed s/mkdir\ \-p/mkdir/ | grep -v make >> compile.bat
# Compile and link all source files in a single call to LCC
$(BINS): $(CSOURCES) $(ASMSOURCES)
$(LCC) $(LCCFLAGS) -o $@ $(CSOURCES) $(ASMSOURCES)
clean:
rm -f *.o *.lst *.map *.gb *.ihx *.sym *.cdb *.adb *.asm *.noi *.rst