libagbsyscall as an actual lib
This commit is contained in:
@@ -82,7 +82,7 @@ endif
|
||||
|
||||
LDFLAGS = -Map ../../$(MAP)
|
||||
|
||||
LIB := $(LIBPATH) -lgcc -lc
|
||||
LIB := $(LIBPATH) -lgcc -lc -L../../libagbsyscall -lagbsyscall
|
||||
|
||||
SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c
|
||||
GFX := tools/gbagfx/gbagfx$(EXE)
|
||||
@@ -111,7 +111,7 @@ MAKEFLAGS += --no-print-directory
|
||||
# Secondary expansion is required for dependency variables in object rules.
|
||||
.SECONDEXPANSION:
|
||||
|
||||
.PHONY: all rom clean compare tidy tools mostlyclean clean-tools $(TOOLDIRS) berry_fix
|
||||
.PHONY: all rom clean compare tidy tools mostlyclean clean-tools $(TOOLDIRS) berry_fix libagbsyscall
|
||||
|
||||
infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
|
||||
|
||||
@@ -161,7 +161,7 @@ tools: $(TOOLDIRS)
|
||||
$(TOOLDIRS):
|
||||
@$(MAKE) -C $@ CC=$(HOSTCC) CXX=$(HOSTCXX)
|
||||
|
||||
rom: berry_fix $(ROM)
|
||||
rom: $(ROM)
|
||||
ifeq ($(COMPARE),1)
|
||||
@$(SHA1) rom.sha1
|
||||
endif
|
||||
@@ -182,7 +182,9 @@ mostlyclean: tidy
|
||||
rm -f $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc
|
||||
find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} +
|
||||
rm -f $(AUTO_GEN_TARGETS)
|
||||
rm -f $(OBJ_DIR)/libagbsyscall.a
|
||||
@$(MAKE) clean -C berry_fix
|
||||
@$(MAKE) clean -C libagbsyscall
|
||||
|
||||
tidy:
|
||||
rm -f $(ROM) $(ELF) $(MAP)
|
||||
@@ -310,7 +312,7 @@ endif
|
||||
$(OBJ_DIR)/ld_script.ld: $(LD_SCRIPT) $(LD_SCRIPT_DEPS)
|
||||
cd $(OBJ_DIR) && sed "s#tools/#../../tools/#g" ../../$(LD_SCRIPT) > ld_script.ld
|
||||
|
||||
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS)
|
||||
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS) libagbsyscall
|
||||
cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) $(LIB)
|
||||
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent
|
||||
|
||||
@@ -323,4 +325,7 @@ modern: ; @$(MAKE) MODERN=1
|
||||
berry_fix/berry_fix.gba: berry_fix
|
||||
|
||||
berry_fix:
|
||||
@$(MAKE) -C berry_fix COMPARE=$(COMPARE)
|
||||
@$(MAKE) -C berry_fix COMPARE=$(COMPARE) TOOLCHAIN=$(TOOLCHAIN)
|
||||
|
||||
libagbsyscall:
|
||||
@$(MAKE) -C libagbsyscall TOOLCHAIN=$(TOOLCHAIN)
|
||||
|
||||
Reference in New Issue
Block a user