diff options
Diffstat (limited to 'gba/Makefile')
-rw-r--r-- | gba/Makefile | 13 |
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) |
8 | endif | 8 | endif |
9 | 9 | ||
10 | %_pkjb.elf: | ||
11 | @echo linking pkjb | ||
12 | @$(LD) -specs=../gba_pkjb.specs $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@ | ||
13 | |||
10 | include $(DEVKITARM)/gba_rules | 14 | include $(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 | #--------------------------------------------------------------------------------- |
19 | TARGET := $(shell basename $(CURDIR))_mb | 23 | TARGET := $(shell basename $(CURDIR))_pkjb |
20 | BUILD := build | 24 | BUILD := build |
21 | SOURCES := source | 25 | SOURCES := source |
22 | DATA := | 26 | DATA := |
@@ -38,8 +42,8 @@ CFLAGS += $(INCLUDE) | |||
38 | 42 | ||
39 | CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions | 43 | CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions |
40 | 44 | ||
41 | ASFLAGS := $(ARCH) | 45 | ASFLAGS := -g $(ARCH) |
42 | LDFLAGS = -g $(ARCH) -Wl,-Map,$(notdir $@).map | 46 | LDFLAGS = $(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 | ||
114 | all : $(BUILD) | 119 | all : $(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 |