nes-proj/Makefile.identify-target
George Oikonomou e73edfaa60 Move target identification code to a separate file
For some cross-platform examples, we need to tweak things based on the target platform. For this reason, target identification needs to happen early, before inclusion of the top-level Makefile.include. Up to now, we have simply replicated the target-identification code to example Makefiles, leading to code-replication and on occasion bugs (incorrect platform identification).

This commits moves the correct working code to a separate file, so that example Makefiles can include this "as a library". The top-level Makefile merely includes this file now.
2017-10-28 22:36:08 +01:00

10 lines
201 B
Makefile

ifeq ($(TARGET),)
-include Makefile.target
ifeq ($(TARGET),)
${info TARGET not defined, using target 'native'}
TARGET=native
else
${info using saved target '$(TARGET)'}
endif
endif