Use variable 'system' when evaluating 'for{Linux,Darwin,Windows}
This evaluates correctly in the case where 'system' is defined for the purpose of cross compiling. This commit addresses issue #31.
This commit is contained in:
parent
cb839ed470
commit
2c14110947
1 changed files with 7 additions and 8 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
# Makefile.pdlibbuilder dated 2016-11-02
|
# Makefile.pdlibbuilder dated 2016-11-22
|
||||||
version = 0.4.3
|
version = 0.4.4
|
||||||
|
|
||||||
# Helper makefile for Pure Data external libraries.
|
# Helper makefile for Pure Data external libraries.
|
||||||
# Written by Katja Vetter March-June 2015 for the public domain. No warranties.
|
# Written by Katja Vetter March-June 2015 for the public domain. No warranties.
|
||||||
|
|
@ -462,27 +462,26 @@ endif
|
||||||
|
|
||||||
|
|
||||||
# The following systems are defined: Linux, Darwin, Windows. GNU and
|
# The following systems are defined: Linux, Darwin, Windows. GNU and
|
||||||
# GNU/kFreeBSD are treated as Linux to get the same options. System-specific
|
# GNU/kFreeBSD are treated as Linux to get the same options.
|
||||||
# multiline defines (optionally set in library makefile) are conditionally
|
|
||||||
# evaluated here.
|
|
||||||
|
|
||||||
uname := $(shell uname)
|
uname := $(shell uname)
|
||||||
|
|
||||||
ifeq ($(findstring $(uname), Linux GNU GNU/kFreeBSD), $(uname))
|
ifeq ($(findstring $(uname), Linux GNU GNU/kFreeBSD), $(uname))
|
||||||
system = Linux
|
system = Linux
|
||||||
$(eval $(forLinux))
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(uname), Darwin)
|
ifeq ($(uname), Darwin)
|
||||||
system = Darwin
|
system = Darwin
|
||||||
$(eval $(forDarwin))
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(findstring MINGW, $(uname)), MINGW)
|
ifeq ($(findstring MINGW, $(uname)), MINGW)
|
||||||
system = Windows
|
system = Windows
|
||||||
$(eval $(forWindows))
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# evaluate possible system-specific multiline defines from library makefile
|
||||||
|
$(eval $(for$(system)))
|
||||||
|
|
||||||
|
|
||||||
# TODO: Cygwin, Android
|
# TODO: Cygwin, Android
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue