mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Fix modern builds when devkitARM is not in PATH.
This commit is contained in:
parent
c5b262159d
commit
9fd27fe855
5
Makefile
5
Makefile
@ -23,6 +23,7 @@ LD := $(PREFIX)ld
|
|||||||
# note: the makefile must be set up so MODERNCC is never called
|
# note: the makefile must be set up so MODERNCC is never called
|
||||||
# if MODERN=0
|
# if MODERN=0
|
||||||
MODERNCC := $(PREFIX)gcc
|
MODERNCC := $(PREFIX)gcc
|
||||||
|
PATH_MODERNCC := PATH=$(TOOLCHAIN)/bin:PATH $(MODERNCC)
|
||||||
|
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
EXE := .exe
|
EXE := .exe
|
||||||
@ -95,11 +96,11 @@ OBJ_DIR := $(OBJ_DIR_NAME)
|
|||||||
LIBPATH := -L ../../tools/agbcc/lib
|
LIBPATH := -L ../../tools/agbcc/lib
|
||||||
LIB := $(LIBPATH) -lgcc -lc -L../../libagbsyscall -lagbsyscall
|
LIB := $(LIBPATH) -lgcc -lc -L../../libagbsyscall -lagbsyscall
|
||||||
else
|
else
|
||||||
CC1 = $(shell $(MODERNCC) --print-prog-name=cc1) -quiet
|
CC1 = $(shell $(PATH_MODERNCC) --print-prog-name=cc1) -quiet
|
||||||
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast -g
|
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast -g
|
||||||
ROM := $(MODERN_ROM_NAME)
|
ROM := $(MODERN_ROM_NAME)
|
||||||
OBJ_DIR := $(MODERN_OBJ_DIR_NAME)
|
OBJ_DIR := $(MODERN_OBJ_DIR_NAME)
|
||||||
LIBPATH := -L "$(dir $(shell $(MODERNCC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(MODERNCC) -mthumb -print-file-name=libnosys.a))" -L "$(dir $(shell $(MODERNCC) -mthumb -print-file-name=libc.a))"
|
LIBPATH := -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libnosys.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libc.a))"
|
||||||
LIB := $(LIBPATH) -lc -lnosys -lgcc -L../../libagbsyscall -lagbsyscall
|
LIB := $(LIBPATH) -lc -lnosys -lgcc -L../../libagbsyscall -lagbsyscall
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user