Skip to content

Commit

Permalink
Specify COMPILER_DIR (#67)
Browse files Browse the repository at this point in the history
* SJIS makefile recipe

* Use COMPILER_DIR instead of second recipe
  • Loading branch information
hensldm authored Jun 4, 2024
1 parent 299d7fa commit 5e8f8f0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ else
$(error Invalid Target)
endif

export COMPILER_PATH := $(WORKING_DIR)/$(COMPILER_DIR)

ifeq ($(findstring _rom,$(TARGET)),_rom)
CPPFLAGS += -D_FINALROM
endif
Expand Down
16 changes: 8 additions & 8 deletions Makefile.gcc
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
COMPILER := gcc
AS := tools/gcc/as
CC := tools/gcc/gcc
AR_OLD := tools/gcc/ar
COMPILER_DIR := tools/gcc/
AS := $(COMPILER_DIR)as
CC := $(COMPILER_DIR)gcc
AR_OLD := $(COMPILER_DIR)ar
PATCH_AR_FLAGS := 0 0 37777700
STRIP =

export COMPILER_PATH := $(WORKING_DIR)/tools/gcc

CFLAGS := -w -nostdinc -c -G 0 -mgp32 -mfp32 -D_LANGUAGE_C
ASFLAGS := -w -nostdinc -c -G 0 -mgp32 -mfp32 -DMIPSEB -D_LANGUAGE_ASSEMBLY -D_MIPS_SIM=1 -D_ULTRA64 -x assembler-with-cpp
CPPFLAGS = -D_MIPS_SZLONG=32 -D__USE_ISOC99 $(GBIDEFINE) $(VERSION_DEFINE) $(DEBUGFLAG)
Expand Down Expand Up @@ -46,7 +45,7 @@ endif
export VR4300MUL := ON

$(BUILD_DIR)/src/os/initialize_isv.marker: OPTFLAGS := -O2
$(BUILD_DIR)/src/os/initialize_isv.marker: STRIP = && tools/gcc/strip-2.7 -N initialize_isv.c $(WORKING_DIR)/$(@:.marker=.o)
$(BUILD_DIR)/src/os/initialize_isv.marker: STRIP = && $(COMPILER_DIR)strip-2.7 -N initialize_isv.c $(WORKING_DIR)/$(@:.marker=.o)
$(BUILD_DIR)/src/os/assert.marker: OPTFLAGS := -O0
ifeq ($(filter $(VERSION),D E F G H I),)
$(BUILD_DIR)/src/os/seterrorhandler.marker: OPTFLAGS := -O0
Expand All @@ -63,5 +62,6 @@ $(BUILD_DIR)/src/rmon/%.marker: ASFLAGS += -P
$(BUILD_DIR)/src/host/host_ptn64.marker: CFLAGS += -fno-builtin # Probably a better way to solve this

MDEBUG_FILES := $(BUILD_DIR)/src/monutil.marker
$(BUILD_DIR)/src/monutil.marker: CC := tools/ido/cc
$(BUILD_DIR)/src/monutil.marker: ASFLAGS := -non_shared -mips2 -fullwarn -verbose -Xcpluscomm -G 0 -woff 516,649,838,712 -Wab,-r4300_mul -nostdinc -o32 -c
MDEBUG_COMPILER_DIR := tools/ido/
$(MDEBUG_FILES): CC := $(MDEBUG_COMPILER_DIR)cc
$(MDEBUG_FILES): ASFLAGS := -non_shared -mips2 -fullwarn -verbose -Xcpluscomm -G 0 -woff 516,649,838,712 -Wab,-r4300_mul -nostdinc -o32 -c
7 changes: 3 additions & 4 deletions Makefile.ido
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
COMPILER := ido
AS := tools/ido/cc
CC := tools/ido/cc
COMPILER_DIR := tools/ido/
AS := $(COMPILER_DIR)cc
CC := $(COMPILER_DIR)cc
AR_OLD := tools/ar.py
PATCH_AR_FLAGS := 40001 110 100644
STRIP =

export COMPILER_PATH := $(WORKING_DIR)/tools/ido

CFLAGS := -c -Wab,-r4300_mul -G 0 -nostdinc -Xcpluscomm -fullwarn -woff 516,649,838,712
ASFLAGS := -c -Wab,-r4300_mul -G 0 -nostdinc -woff 516,649,838,712
CPPFLAGS = -D_MIPS_SZLONG=32 $(GBIDEFINE) $(VERSION_DEFINE) $(PICFLAGS) $(DEBUGFLAG)
Expand Down

0 comments on commit 5e8f8f0

Please sign in to comment.