From f0f2ea83dacfd41ed625e2933af3de9696e47699 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Thu, 30 Apr 2020 12:35:00 -0400 Subject: example compilation for OS_arena --- arm9/Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'arm9/Makefile') diff --git a/arm9/Makefile b/arm9/Makefile index a48e5acb..b66c3318 100644 --- a/arm9/Makefile +++ b/arm9/Makefile @@ -44,7 +44,7 @@ ELF := $(BUILD_DIR)/$(TARGET).elf LD_SCRIPT := arm9.lcf # Directories containing source files -SRC_DIRS := src +SRC_DIRS := src lib lib/src ASM_DIRS := asm data files C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)) @@ -60,7 +60,7 @@ O_FILES := $(foreach file,$(C_FILES),$(BUILD_DIR)/$(file:.c=.o)) \ ##################### Compiler Options ####################### -MWCCVERSION := 2.0/base +MWCCVERSION = 2.0/base TOOLS_DIR = ../tools CROSS := arm-none-eabi- @@ -139,6 +139,14 @@ patch_mwasmarm: ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(ASM_DIRS)) +######################## Special Rules ######################## + +# TODO: Move out to lib/Makefile +build/lib/src/%.o: CC := $(WINE) $(TOOLS_DIR)/mwccarm/1.2/sp2p3/mwccarm.exe +build/lib/src/%.o: CFLAGS := -O4,p -proc arm9tdmi -interworking -ir include -ir ../include -lang c99 + +####################### Everything Else ###################### + $(BUILD_DIR)/%.o: %.c $(CC) -c $(CFLAGS) -o $@ $< -- cgit v1.2.3