Commit b3803e53 authored by Ben Avison's avatar Ben Avison
Browse files

Always implicitly include StdTools when cross-compiling

`AAsmModule`, `CApp`, `CLibrary` and `CModule` implicitly include various
other shared makefile fragments to permit simpler master makefiles. However,
when cross-compiling, they were only included when invoked from within the
`objs` subdirectory, which in particular meant you couldn't rely on any of
the definitions from `StdTools` when extending the `clean` rule unless you
explicitly included it from the master makefile, thereby defeating the
purpose of the implicit inclusion. Change them so that `StdTools` is included
for all rules.
parent 9cedcd56
......@@ -124,6 +124,10 @@ endif
SOURCES_TO_SYMLINK += $(wildcard h/*) $(wildcard hdr/*) $(wildcard s/*) Resources VersionNum VersionASM
ifeq ("${INCLUDED_STDTOOLS}","")
include StdTools
endif
ifneq (objs,$(notdir ${CURDIR}))
# Makefile invoked from same directory
......@@ -169,10 +173,6 @@ else
# Makefile invoked from objs subdirectory
ifeq ("${INCLUDED_STDTOOLS}","")
include StdTools
endif
all: rom debug standalone
# GNU make seems to treat any double-colon rule with no dependencies as
......
......@@ -111,6 +111,12 @@ ROM_OBJS_ = $(addsuffix .oz,${ROM_OBJS})
SOURCES_TO_SYMLINK += $(wildcard c/*) $(wildcard c++/*) $(wildcard h/*) $(wildcard s/*) VersionNum VersionASM
ifeq ("${INCLUDED_STDTOOLS}","")
ifeq ("${INCLUDED_HOSTTOOLS}","")
include StdTools
endif
endif
ifneq (objs,$(notdir ${CURDIR}))
# Makefile invoked from same directory
......@@ -151,12 +157,6 @@ else
# Makefile invoked from objs subdirectory
ifeq ("${INCLUDED_STDTOOLS}","")
ifeq ("${INCLUDED_HOSTTOOLS}","")
include StdTools
endif
endif
ifeq ($(filter rom%,${MAKECMDGOALS}),)
ifeq ("${INCLUDED_APPLIBS}","")
include AppLibs
......
......@@ -107,6 +107,10 @@ endif
SOURCES_TO_SYMLINK += $(wildcard c/*) $(wildcard h/*) $(wildcard s/*)
ifeq ("${INCLUDED_STDTOOLS}","")
include StdTools
endif
ifneq (objs,$(notdir ${CURDIR}))
# Makefile invoked from same directory
......@@ -146,10 +150,6 @@ else
# Makefile invoked from objs subdirectory
ifeq ("${INCLUDED_STDTOOLS}","")
include StdTools
endif
ifeq ("${INCLUDED_STDRULES}","")
include StdRules
endif
......
......@@ -199,6 +199,10 @@ endif
SOURCES_TO_SYMLINK += $(wildcard c/*) $(wildcard c++/*) $(wildcard cmhg/*) $(wildcard h/*) $(wildcard hdr/*) $(wildcard s/*) VersionNum VersionASM
ifeq ("${INCLUDED_STDTOOLS}","")
include StdTools
endif
ifneq (objs,$(notdir ${CURDIR}))
# Makefile invoked from same directory
......@@ -245,9 +249,6 @@ ifneq ("${ASM2TXT_EXT}","")
ASM2TXT_EXT := .${ASM2TXT_EXT}
endif
ifeq ("${INCLUDED_STDTOOLS}","")
include StdTools
endif
ifeq ("${INCLUDED_MODULELIBS}","")
include ModuleLibs
endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment