diff options
| author | Seth Barberee <seth.barberee@gmail.com> | 2020-10-20 13:02:58 -0500 |
|---|---|---|
| committer | Seth Barberee <seth.barberee@gmail.com> | 2020-10-20 13:02:58 -0500 |
| commit | a0aac0e9d22251550fc01bc899d3144639072d3e (patch) | |
| tree | a1fc11374ef4b736a00ff1c717d810b74b662ce2 /libagbsyscall/Makefile | |
| parent | 33b0b86f530d2156bd7c195e057753cf40863942 (diff) | |
static-link libagbsyscall similar to pokeemerald... Thx Pika
Diffstat (limited to 'libagbsyscall/Makefile')
| -rw-r--r-- | libagbsyscall/Makefile | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/libagbsyscall/Makefile b/libagbsyscall/Makefile new file mode 100644 index 0000000..911cdb2 --- /dev/null +++ b/libagbsyscall/Makefile @@ -0,0 +1,98 @@ +TOOLCHAIN := $(DEVKITARM) +COMPARE ?= 0 + +ifeq ($(CC),) +HOSTCC := gcc +else +HOSTCC := $(CC) +endif + +ifeq ($(CXX),) +HOSTCXX := g++ +else +HOSTCXX := $(CXX) +endif + +ifneq (,$(wildcard $(TOOLCHAIN)/base_tools)) +include $(TOOLCHAIN)/base_tools +else +export PATH := $(TOOLCHAIN)/bin:$(PATH) +PREFIX := arm-none-eabi- +OBJCOPY := $(PREFIX)objcopy +export CC := $(PREFIX)gcc +export AS := $(PREFIX)as +endif +export CPP := $(PREFIX)cpp +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 $@ $< |
