about summary refs log tree commit diff stats
path: root/gba/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'gba/Makefile')
-rw-r--r--gba/Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/gba/Makefile b/gba/Makefile index 99dfbb6..f9cb296 100644 --- a/gba/Makefile +++ b/gba/Makefile
@@ -7,6 +7,10 @@ ifeq ($(strip $(DEVKITARM)),)
7$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM) 7$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitARM)
8endif 8endif
9 9
10%_pkjb.elf:
11 @echo linking pkjb
12 @$(LD) -specs=../gba_pkjb.specs $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@
13
10include $(DEVKITARM)/gba_rules 14include $(DEVKITARM)/gba_rules
11 15
12#--------------------------------------------------------------------------------- 16#---------------------------------------------------------------------------------
@@ -16,7 +20,7 @@ include $(DEVKITARM)/gba_rules
16# DATA is a list of directories containing data files 20# DATA is a list of directories containing data files
17# INCLUDES is a list of directories containing header files 21# INCLUDES is a list of directories containing header files
18#--------------------------------------------------------------------------------- 22#---------------------------------------------------------------------------------
19TARGET := $(shell basename $(CURDIR))_mb 23TARGET := $(shell basename $(CURDIR))_pkjb
20BUILD := build 24BUILD := build
21SOURCES := source 25SOURCES := source
22DATA := 26DATA :=
@@ -38,8 +42,8 @@ CFLAGS += $(INCLUDE)
38 42
39CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions 43CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
40 44
41ASFLAGS := $(ARCH) 45ASFLAGS := -g $(ARCH)
42LDFLAGS = -g $(ARCH) -Wl,-Map,$(notdir $@).map 46LDFLAGS = $(ARCH) -Wl,-Map,$(notdir $@).map
43 47
44#--------------------------------------------------------------------------------- 48#---------------------------------------------------------------------------------
45# any extra libraries we wish to link with the project 49# any extra libraries we wish to link with the project
@@ -109,6 +113,7 @@ export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
109#--------------------------------------------------------------------------------- 113#---------------------------------------------------------------------------------
110$(BUILD): 114$(BUILD):
111 @[ -d $@ ] || mkdir -p $@ 115 @[ -d $@ ] || mkdir -p $@
116 $(CC) -MMD -MP -MF start/pkjb_crt0.d -x assembler-with-cpp $(ASFLAGS) -c start/pkjb_crt0.s -o start/pkjb_crt0.o $(ERROR_FILTER)
112 @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile 117 @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
113 118
114all : $(BUILD) 119all : $(BUILD)
@@ -150,7 +155,7 @@ $(OUTPUT).elf : $(OFILES)
150#--------------------------------------------------------------------------------- 155#---------------------------------------------------------------------------------
151 @echo $(notdir $<) 156 @echo $(notdir $<)
152 @$(bin2o) 157 @$(bin2o)
153 158
154#--------------------------------------------------------------------------------- 159#---------------------------------------------------------------------------------
155# This rule creates assembly source files using grit 160# This rule creates assembly source files using grit
156# grit takes an image file and a .grit describing how the file is to be processed 161# grit takes an image file and a .grit describing how the file is to be processed