Skip to content

Commit

Permalink
Revert HOST->LOCAL changes; HOSTCC/HOST_CC is fairly standard.
Browse files Browse the repository at this point in the history
  • Loading branch information
AliceLR committed Dec 14, 2023
1 parent 65524e2 commit 5570fd4
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 21 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ PEFIX ?= true

CHMOD ?= chmod
CP ?= cp
LOCAL_CC?= gcc
HOST_CC ?= gcc
LN ?= ln
MKDIR ?= mkdir
MV ?= mv
Expand Down Expand Up @@ -441,7 +441,7 @@ PEFIX := @${PEFIX}

CHMOD := @${CHMOD}
CP := @${CP}
LOCAL_CC:= @${LOCAL_CC}
HOST_CC := @${HOST_CC}
LN := @${LN}
MKDIR := @${MKDIR}
MV := @${MV}
Expand Down Expand Up @@ -478,7 +478,7 @@ build/${TARGET}src:
#
# * SUPPRESS_CC_TARGETS prevents "mzx", etc from being added to "all".
# * SUPPRESS_BUILD_TARGETS suppresses "build".
# * SUPPRESS_LOCAL_TARGETS suppresses "assets/help.fil", "test", etc.
# * SUPPRESS_HOST_TARGETS suppresses "assets/help.fil", "test", etc.
#
ifneq (${SUPPRESS_ALL_TARGETS},1)

Expand Down Expand Up @@ -621,7 +621,7 @@ distclean: clean
@rm -f src/config.h
@echo "PLATFORM=none" > platform.inc

ifneq (${SUPPRESS_LOCAL_TARGETS},1)
ifneq (${SUPPRESS_HOST_TARGETS},1)

assets/help.fil: ${txt2hlp} docs/WIPHelp.txt
$(if ${V},,@echo " txt2hlp " $@)
Expand All @@ -648,7 +648,7 @@ else
@${SHELL} testworlds/run.sh ${PLATFORM}
endif

endif # !SUPPRESS_LOCAL_TARGETS
endif # !SUPPRESS_HOST_TARGETS

test_clean:
@rm -rf testworlds/log
Expand Down
2 changes: 1 addition & 1 deletion arch/3ds/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ CROSS_COMPILE =
# Don't strip when generating debug symbols.
NO_STRIP_IN_DEBUGLINK ?= 1
# Disable rules that require target code to run natively.
SUPPRESS_LOCAL_TARGETS ?= 1
SUPPRESS_HOST_TARGETS ?= 1

#
# Override library paths.
Expand Down
2 changes: 1 addition & 1 deletion arch/android/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ endif
# Block --host, which will break things.
CROSS_COMPILE =
# Disable rules that require target code to run natively.
SUPPRESS_LOCAL_TARGETS ?= 1
SUPPRESS_HOST_TARGETS ?= 1

#
# Determine ${TOOLCHAIN} (the common NDK toolchain path) if not provided.
Expand Down
2 changes: 1 addition & 1 deletion arch/dreamcast/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ EXTRA_LICENSES += ${LICENSE_NEWLIB}
CROSS_COMPILE = kos-

# Disable rules that require target code to run natively.
SUPPRESS_LOCAL_TARGETS ?= 1
SUPPRESS_HOST_TARGETS ?= 1

#
# Override library paths
Expand Down
2 changes: 1 addition & 1 deletion arch/emscripten/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ STRIP = /bin/true
# Block --host, which will break things.
CROSS_COMPILE =
# Disable rules that require target code to run natively.
SUPPRESS_LOCAL_TARGETS ?= 1
SUPPRESS_HOST_TARGETS ?= 1

SDL_CFLAGS = -s USE_SDL=2
SDL_LDFLAGS = -s USE_SDL=2
Expand Down
2 changes: 1 addition & 1 deletion arch/gp2x/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CROSS_COMPILE ?= arm-open2x-linux-
BINEXT = .gpe

# Disable rules that require target code to run natively.
SUPPRESS_LOCAL_TARGETS ?= 1
SUPPRESS_HOST_TARGETS ?= 1

#
# GP2X binaries must be statically linked.
Expand Down
8 changes: 4 additions & 4 deletions arch/mingw/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ pefix := arch/mingw/pefix
-include arch/mingw/pefix.d

arch/mingw/pefix.o: arch/mingw/pefix.c
$(if ${V},,@echo " LOC.CC " $<)
${LOCAL_CC} -MD ${CFLAGS} -c $< -o $@
$(if ${V},,@echo " HOSTCC " $<)
${HOST_CC} -MD ${CFLAGS} -c $< -o $@

${pefix}: arch/mingw/pefix.o
$(if ${V},,@echo " LOC.LINK" ${pefix})
${LOCAL_CC} arch/mingw/pefix.o -o ${pefix}
$(if ${V},,@echo " HOSTLINK" ${pefix})
${HOST_CC} arch/mingw/pefix.o -o ${pefix}

all: ${pefix}

Expand Down
2 changes: 1 addition & 1 deletion arch/nds/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CROSS_COMPILE =
# Don't strip when generating debug symbols.
NO_STRIP_IN_DEBUGLINK ?= 1
# Disable rules that require target code to run natively.
SUPPRESS_LOCAL_TARGETS ?= 1
SUPPRESS_HOST_TARGETS ?= 1

#
# Override library paths.
Expand Down
2 changes: 1 addition & 1 deletion arch/psp/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CROSS_COMPILE = psp-
# Don't strip when generating debug symbols.
NO_STRIP_IN_DEBUGLINK ?= 1
# Disable rules that require target code to run natively.
SUPPRESS_LOCAL_TARGETS ?= 1
SUPPRESS_HOST_TARGETS ?= 1

# flag PSP build and link in c/psppower
ARCH_CFLAGS += -G0 -isystem ${PREFIX}/sdk/include -DPATH_MAX=4096
Expand Down
3 changes: 3 additions & 0 deletions arch/psvita/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

CROSS_COMPILE = arm-vita-eabi-

# Disable rules that require target code to run natively.
SUPPRESS_HOST_TARGETS ?= 1

VITA_TITLEID = VMZX00001
VITA_TITLE = MegaZeux

Expand Down
2 changes: 1 addition & 1 deletion arch/switch/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CROSS_COMPILE =
# Don't strip when generating debug symbols.
NO_STRIP_IN_DEBUGLINK ?= 1
# Disable rules that require target code to run natively.
SUPPRESS_LOCAL_TARGETS ?= 1
SUPPRESS_HOST_TARGETS ?= 1

#
# Override library paths.
Expand Down
2 changes: 1 addition & 1 deletion arch/wii/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CROSS_COMPILE =
# Don't strip when generating debug symbols.
NO_STRIP_IN_DEBUGLINK ?= 1
# Disable rules that require target code to run natively.
SUPPRESS_LOCAL_TARGETS ?= 1
SUPPRESS_HOST_TARGETS ?= 1

#
# Override library paths
Expand Down
2 changes: 1 addition & 1 deletion arch/wiiu/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ PREFIX := $(DEVKITPPC)
# Block --host, which will break things.
CROSS_COMPILE =
# Disable rules that require target code to run natively.
SUPPRESS_LOCAL_TARGETS ?= 1
SUPPRESS_HOST_TARGETS ?= 1

#
# Override library paths.
Expand Down
2 changes: 1 addition & 1 deletion config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ usage() {
echo " --bindir Where utilities should be installed. (/usr/bin)"
echo " --sharedir Where resources should be installed. (/usr/share)"
echo " --licensedir Where licenses should be installed. (/usr/share/doc)"
echo " --host Specify cross toolchain prefix for Unix et al. (none)"
echo " --host Specify cross toolchain prefix for Linux et al. (none)"
echo
echo " Install directories can be disregarded for builds for platforms"
echo " with a monolithic directory structure e.g. Windows."
Expand Down
1 change: 0 additions & 1 deletion docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ DEVELOPERS
+ Added --host config.sh option to manually specify a cross
compiler prefix. This is ignored or overriden by most ports
and is mainly just for Linux.
+ HOST_CC is now LOCAL_CC to avoid confusion with --host.
+ Relicensed ccv from GPL 3 to GPL 2+ to match the rest of MZX.
(Lancer-X)
+ If available, GetSystemTimePreciseAsFileTime and clock_gettime
Expand Down

0 comments on commit 5570fd4

Please sign in to comment.