summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSwastik Baranwal <swstkbaranwal@gmail.com>2018-12-27 16:00:22 +0530
committerGitHub <noreply@github.com>2018-12-27 16:00:22 +0530
commit95c3652551aacf612a19336e17ce00a2ec1046d2 (patch)
tree882caaf9875700cccb73e391a7a014a782e579fa /Makefile
parent2ed26ab8fcd4e302ab4aac6bb01dba7b5c985914 (diff)
parentd5de7960a330953b3a7d7684122997c0d8aedcf1 (diff)
Merge pull request #2 from pret/master
Taking files
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 10 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index f3c4c5843..a2059db74 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
-include $(DEVKITARM)/base_tools
-export CPP := $(PREFIX)cpp
-export LD := $(PREFIX)ld
+AS := tools/binutils/bin/arm-none-eabi-as
+CPP := $(CC) -E
+LD := tools/binutils/bin/arm-none-eabi-ld
+OBJCOPY := tools/binutils/bin/arm-none-eabi-objcopy
TITLE := POKEMON FIRE
GAME_CODE := BPRE
@@ -84,10 +85,12 @@ clean: tidy
rm -f sound/direct_sound_samples/*.bin
rm -f $(SONG_OBJS)
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
+ @$(MAKE) -C berry_fix clean
tidy:
rm -f $(ROM) $(ELF) $(MAP)
rm -r build/*
+ @$(MAKE) -C berry_fix tidy
include graphics_file_rules.mk
@@ -108,11 +111,6 @@ sound/%.bin: sound/%.aif ; $(AIF) $< $@
sound/songs/%.s: sound/songs/%.mid
cd $(@D) && ../../$(MID) $(<F)
-$(C_BUILDDIR)/libc.o: CC1 := tools/agbcc/bin/old_agbcc
-$(C_BUILDDIR)/libc.o: CFLAGS := -O2
-
-$(C_BUILDDIR)/siirtc.o: CFLAGS := -mthumb-interwork
-
$(C_BUILDDIR)/agb_flash.o: CFLAGS := -O -mthumb-interwork
$(C_BUILDDIR)/agb_flash_1m.o: CFLAGS := -O -mthumb-interwork
$(C_BUILDDIR)/agb_flash_mx.o: CFLAGS := -O -mthumb-interwork
@@ -169,8 +167,11 @@ $(OBJ_DIR)/ld_script.ld: ld_script.txt $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_comm
cd $(OBJ_DIR) && sed -f ../../ld_script.sed ../../$< | sed "s#tools/#../../tools/#g" > ld_script.ld
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS)
- cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) $(LIB)
+ cd $(OBJ_DIR) && ../../$(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(LIB)
$(ROM): $(ELF)
$(OBJCOPY) -O binary $< $@
$(FIX) $@ -p -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent
+
+berry_fix/berry_fix.gba:
+ @$(MAKE) -C berry_fix