mirror of https://github.com/pret/pokeemerald.git
Merge remote-tracking branch 'Pikalax/libc'
This commit is contained in:
commit
8dbab51c0e
9
Makefile
9
Makefile
|
@ -30,8 +30,11 @@ LDFLAGS = -Map ../../$(MAP)
|
||||||
|
|
||||||
OBJCOPY := $(DEVKITARM)/bin/arm-none-eabi-objcopy
|
OBJCOPY := $(DEVKITARM)/bin/arm-none-eabi-objcopy
|
||||||
|
|
||||||
LIBGCC := tools/agbcc/lib/libgcc.a
|
ifeq ($(OS),Windows_NT)
|
||||||
LIBC := tools/agbcc/lib/libc.a
|
LIB := ../../tools/agbcc/lib/libgcc.a ../../tools/agbcc/lib/libc.a
|
||||||
|
else
|
||||||
|
LIB := -L ../../tools/agbcc/lib -lgcc -lc
|
||||||
|
endif
|
||||||
|
|
||||||
SHA1 := sha1sum -c
|
SHA1 := sha1sum -c
|
||||||
|
|
||||||
|
@ -163,7 +166,7 @@ $(OBJ_DIR)/ld_script.ld: ld_script.txt $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_comm
|
||||||
cd $(OBJ_DIR) && sed -f ../../ld_script.sed ../../$< | sed "s#tools/#../../tools/#g" > ld_script.ld
|
cd $(OBJ_DIR) && sed -f ../../ld_script.sed ../../$< | sed "s#tools/#../../tools/#g" > ld_script.ld
|
||||||
|
|
||||||
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS)
|
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS)
|
||||||
cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) ../../$(LIBGCC) ../../$(LIBC)
|
cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) $(LIB)
|
||||||
|
|
||||||
$(ROM): $(ELF)
|
$(ROM): $(ELF)
|
||||||
$(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $< $@
|
$(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $< $@
|
||||||
|
|
Loading…
Reference in New Issue