Merge branch 'eval-system-specific-defines', update version to 0.2.0
This merge introduces the evaluation of optional multiline defines 'forLinux', 'forDarwin' and 'forWindows', which can be used as a flexible replacement for system-specific variables as in Pd-extended's Makefile template. Example code is added to Makefile.pdlibbuilder's built-in documentation.
This commit is contained in:
commit
3946ea50de
1 changed files with 21 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
# Makefile.pdlibbuilder version 0.1.0, dated 2015-12-08
|
# Makefile.pdlibbuilder version 0.2.0, dated 2015-12-19
|
||||||
#
|
#
|
||||||
# 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.
|
||||||
|
|
@ -66,6 +66,13 @@
|
||||||
# - makefiledirs
|
# - makefiledirs
|
||||||
# - externalsdir
|
# - externalsdir
|
||||||
#
|
#
|
||||||
|
# Optional multiline defines evaluated per operating system:
|
||||||
|
#
|
||||||
|
# - forLinux
|
||||||
|
# - forDarwin
|
||||||
|
# - forWindows
|
||||||
|
#
|
||||||
|
#
|
||||||
# Variables avaialable for (re)definition via command arguments:
|
# Variables avaialable for (re)definition via command arguments:
|
||||||
#
|
#
|
||||||
# - pdbinpath (Windows only)
|
# - pdbinpath (Windows only)
|
||||||
|
|
@ -140,6 +147,13 @@
|
||||||
# is '..', meaning the direct parent. The value is used in search paths for
|
# is '..', meaning the direct parent. The value is used in search paths for
|
||||||
# pd core components (header files, and executable in the case of Windows).
|
# pd core components (header files, and executable in the case of Windows).
|
||||||
#
|
#
|
||||||
|
# forLinux, forDarwin, forWindows:
|
||||||
|
# Shorthand for 'variable definitions for Linux only' etc. Use like:
|
||||||
|
# define forLinux
|
||||||
|
# cflags += -DLINUX
|
||||||
|
# class.sources += linuxthing.c
|
||||||
|
# endef
|
||||||
|
#
|
||||||
# makefiles and makefiledirs:
|
# makefiles and makefiledirs:
|
||||||
# Extra makefiles or directories with makefiles that should be made in sub-make
|
# Extra makefiles or directories with makefiles that should be made in sub-make
|
||||||
# processes.
|
# processes.
|
||||||
|
|
@ -430,20 +444,25 @@ 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.
|
# GNU/kFreeBSD are treated as Linux to get the same options. System-specific
|
||||||
|
# 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
|
||||||
|
|
||||||
# TODO: Cygwin, Android
|
# TODO: Cygwin, Android
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue