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/Makefile12
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)
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 :=
@@ -29,6 +33,7 @@ INCLUDES :=
29ARCH := -mthumb -mthumb-interwork 33ARCH := -mthumb -mthumb-interwork
30 34
31CFLAGS := -g -Wall -O3\ 35CFLAGS := -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
39CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions 44CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
40 45
41ASFLAGS := $(ARCH) 46ASFLAGS := -g $(ARCH)
42LDFLAGS = -g $(ARCH) -Wl,-Map,$(notdir $@).map 47LDFLAGS = $(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
114all : $(BUILD) 120all : $(BUILD)