diff options
| author | Cleverking2003 <30466983+Cleverking2003@users.noreply.github.com> | 2020-04-30 19:41:40 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-30 19:41:40 +0300 |
| commit | 32c0e050f72df12ec9e3cf1f064d03d741fed977 (patch) | |
| tree | 92d7a51a90b15de7b7323dd2b66b5aac07976665 /arm9/Makefile | |
| parent | 0dcb9b71fd54d7374dab4012c87a0a4dc5c5ed11 (diff) | |
| parent | f0f2ea83dacfd41ed625e2933af3de9696e47699 (diff) | |
Merge pull request #44 from ProjectRevoTPP/os_lib
example compilation for OS_arena
Diffstat (limited to 'arm9/Makefile')
| -rw-r--r-- | arm9/Makefile | 12 |
1 files changed, 10 insertions, 2 deletions
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 $@ $< |
