diff options
| author | YamaArashi <shadow962@live.com> | 2017-04-05 13:51:55 -0700 |
|---|---|---|
| committer | YamaArashi <shadow962@live.com> | 2017-04-05 13:51:55 -0700 |
| commit | e0dd5ef9a7bebe68ed36ded1cd92aa04411643e3 (patch) | |
| tree | d9697d72a2ddea6b240a9ad4793a87f8cf4cf046 /Makefile | |
| parent | b95747dc69a1a52a37b2002e12c12c9a57e72962 (diff) | |
fix build errors
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -87,22 +87,28 @@ src/agb_flash_mx.o: CFLAGS := -O -mthumb-interwork src/m4a_2.o: CC1 := tools/agbcc/bin/old_agbcc src/m4a_4.o: CC1 := tools/agbcc/bin/old_agbcc -$(C_OBJS): %.o : %.c +ifeq ($(NODEP),) +%.o: c_dep = $(shell $(SCANINC) $*.c) +else +%.o: c_dep := +endif + +$(C_OBJS): %.o : %.c $$(c_dep) @$(CPP) $(CPPFLAGS) $< -o $*.i @$(PREPROC) $*.i charmap.txt | $(CC1) $(CFLAGS) -o $*.s @echo -e ".text\n\t.align\t2, 0\n" >> $*.s $(AS) $(ASFLAGS) -o $@ $*.s ifeq ($(NODEP),) -%.o: dep = $(shell $(SCANINC) $*.s) +%.o: asm_dep = $(shell $(SCANINC) $*.s) else -%.o: dep := +%.o: asm_dep := endif -$(ASM_OBJS): %.o: %.s $$(dep) +$(ASM_OBJS): %.o: %.s $$(asm_dep) $(AS) $(ASFLAGS) -o $@ $< -$(DATA_ASM_OBJS): %.o: %.s $$(dep) +$(DATA_ASM_OBJS): %.o: %.s $$(asm_dep) $(PREPROC) $< charmap.txt | $(AS) $(ASFLAGS) -o $@ sym_bss.ld: sym_bss.txt |
