diff options
Diffstat (limited to 'gba/Makefile')
-rw-r--r-- | gba/Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gba/Makefile b/gba/Makefile index 99dfbb6..e417104 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 := |
@@ -29,6 +33,7 @@ INCLUDES := | |||
29 | ARCH := -mthumb -mthumb-interwork | 33 | ARCH := -mthumb -mthumb-interwork |
30 | 34 | ||
31 | CFLAGS := -g -Wall -O3\ | 35 | CFLAGS := -g -Wall -O3\ |
36 | -Wno-multichar\ | ||
32 | -mcpu=arm7tdmi -mtune=arm7tdmi\ | 37 | -mcpu=arm7tdmi -mtune=arm7tdmi\ |
33 | -fomit-frame-pointer\ | 38 | -fomit-frame-pointer\ |
34 | -ffast-math \ | 39 | -ffast-math \ |
@@ -38,8 +43,8 @@ CFLAGS += $(INCLUDE) | |||
38 | 43 | ||
39 | CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions | 44 | CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions |
40 | 45 | ||
41 | ASFLAGS := $(ARCH) | 46 | ASFLAGS := -g $(ARCH) |
42 | LDFLAGS = -g $(ARCH) -Wl,-Map,$(notdir $@).map | 47 | LDFLAGS = $(ARCH) -Wl,-Map,$(notdir $@).map |
43 | 48 | ||
44 | #--------------------------------------------------------------------------------- | 49 | #--------------------------------------------------------------------------------- |
45 | # any extra libraries we wish to link with the project | 50 | # any extra libraries we wish to link with the project |
@@ -109,6 +114,7 @@ export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) | |||
109 | #--------------------------------------------------------------------------------- | 114 | #--------------------------------------------------------------------------------- |
110 | $(BUILD): | 115 | $(BUILD): |
111 | @[ -d $@ ] || mkdir -p $@ | 116 | @[ -d $@ ] || mkdir -p $@ |
117 | $(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 | 118 | @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile |
113 | 119 | ||
114 | all : $(BUILD) | 120 | all : $(BUILD) |