mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
1536295872
Todo: actually test building with dkP.
96 lines
2.1 KiB
Makefile
96 lines
2.1 KiB
Makefile
TOOLCHAIN := $(DEVKITARM)
|
|
COMPARE ?= 0
|
|
|
|
# check if dkP's base_tools makefile exists
|
|
ifneq (,$(wildcard $(TOOLCHAIN)/base_tools))
|
|
include $(TOOLCHAIN)/base_tools
|
|
# otherwise, either use the bin files or the
|
|
# arm-none-eabi binaries on the system
|
|
else
|
|
ifneq ($(TOOLCHAIN),)
|
|
export PATH := $(TOOLCHAIN)/bin:$(PATH)
|
|
endif
|
|
PREFIX := arm-none-eabi-
|
|
OBJCOPY := $(PREFIX)objcopy
|
|
export MODERNCC := $(PREFIX)gcc
|
|
export AS := $(PREFIX)as
|
|
endif
|
|
|
|
ifneq ($(TOOLCHAIN),)
|
|
export CPP := $(PREFIX)cpp
|
|
else
|
|
export CPP := $(CC) -E
|
|
endif
|
|
export LD := $(PREFIX)ld
|
|
ifeq ($(OS),Windows_NT)
|
|
EXE := .exe
|
|
else
|
|
EXE :=
|
|
endif
|
|
|
|
ASFLAGS := -mcpu=arm7tdmi
|
|
ARFLAGS := rc
|
|
|
|
SYSCALLS := IntrWait \
|
|
RegisterRamReset \
|
|
Sqrt \
|
|
MusicPlayerOpen \
|
|
SoundBiasReset \
|
|
SoundDriverVSyncOn \
|
|
Mod \
|
|
VBlankIntrWait \
|
|
MusicPlayerStart \
|
|
SoundDriverVSyncOff \
|
|
HuffUnComp \
|
|
SoftResetExram \
|
|
MusicPlayerFadeOut \
|
|
LZ77UnCompWram \
|
|
SoundDriverMain \
|
|
SoundBiasChange \
|
|
LZ77UnCompVram \
|
|
ArcTan2 \
|
|
MusicPlayerStop \
|
|
DivArm \
|
|
ModArm \
|
|
SoundDriverVSync \
|
|
SoundDriverInit \
|
|
BgAffineSet \
|
|
Diff8bitUnFilterWram \
|
|
MultiBoot \
|
|
MidiKey2Freq \
|
|
Div \
|
|
Diff8bitUnFilterVram \
|
|
ArcTan \
|
|
ObjAffineSet \
|
|
SoftResetRom \
|
|
SoundDriverMode \
|
|
RLUnCompWram \
|
|
BitUnPack \
|
|
SoundChannelClear \
|
|
CpuFastSet \
|
|
CpuSet \
|
|
Diff16bitUnFilter \
|
|
SoundBiasSet \
|
|
MusicPlayerContinue \
|
|
SoftReset \
|
|
RLUnCompVram
|
|
|
|
ASM_SRCS := libagbsyscall.s
|
|
ASM_OBJS := $(foreach syscall, $(SYSCALLS), $(syscall).o)
|
|
|
|
LIB := libagbsyscall.a
|
|
|
|
.PHONY: all clean
|
|
|
|
all: $(LIB)
|
|
@:
|
|
|
|
clean:
|
|
rm -f $(LIB) $(ASM_OBJS)
|
|
|
|
$(LIB): $(ASM_OBJS)
|
|
$(AR) $(ARFLAGS) $@ $^
|
|
|
|
$(ASM_OBJS): libagbsyscall.s
|
|
$(AS) $(ASFLAGS) --defsym L_$(*F)=1 -o $@ $<
|