Do not pass architecture flags for dependency checking
Only pass flags categories which can be expected to hold -I flags to the preprocessor for dependency checking. Omit categories which may contain architecture and tuning flags. This is a small and hopefully reasonable limitation of dependency-checking functionality. The preprocessor will still see predefined macros, amongst which architecture definition. Thus, eventual architecture-dependent include statements in the source code are considered for native architecture during dependency checking. This commit should resolve the rebuild issue on OSX, where some compiler versions can not handle multiple architecture flags during dependency checking.
This commit is contained in:
parent
f06e550a3a
commit
9fd17957c7
1 changed files with 7 additions and 5 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
# Makefile.pdlibbuilder dated 2016-06-26
|
# Makefile.pdlibbuilder dated 2016-09-20
|
||||||
|
version = 0.2.6
|
||||||
version = 0.2.5
|
|
||||||
|
|
||||||
# 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.
|
||||||
|
|
@ -629,7 +628,10 @@ endif
|
||||||
CFLAGS = $(warn.flags) $(optimization.flags) $(arch.c.flags)
|
CFLAGS = $(warn.flags) $(optimization.flags) $(arch.c.flags)
|
||||||
|
|
||||||
# preprocessor flags
|
# preprocessor flags
|
||||||
cpp.flags += -DPD -I "$(pdincludepath)" $(CPPFLAGS)
|
cpp.flags := -DPD -I "$(pdincludepath)" $(cpp.flags) $(CPPFLAGS)
|
||||||
|
|
||||||
|
# flags for dependency checking (cflags from makefile may define -I options)
|
||||||
|
depcheck.flags := $(cpp.flags) $(cflags)
|
||||||
|
|
||||||
# architecture specifications for linker are overridable by LDFLAGS
|
# architecture specifications for linker are overridable by LDFLAGS
|
||||||
LDFLAGS := $(arch.ld.flags)
|
LDFLAGS := $(arch.ld.flags)
|
||||||
|
|
@ -908,7 +910,7 @@ endif
|
||||||
# argument $1 is input source file(s)
|
# argument $1 is input source file(s)
|
||||||
# dir is explicitly added because option -MM strips it by default
|
# dir is explicitly added because option -MM strips it by default
|
||||||
define declare-object-target
|
define declare-object-target
|
||||||
$(dir $1)$(filter %.o: %.h, $(shell $(CPP) $(c.flags) -MM $1)) $(MAKEFILE_LIST)
|
$(dir $1)$(filter %.o: %.h, $(shell $(CPP) $(depcheck.flags) -MM $1)) $(MAKEFILE_LIST)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# evaluate implicit prerequisite rules when rebuilding everything
|
# evaluate implicit prerequisite rules when rebuilding everything
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue