diff --git a/configure/CONFIG.gnuCommon b/configure/CONFIG.gnuCommon index 95bdda1b1..f0548024e 100644 --- a/configure/CONFIG.gnuCommon +++ b/configure/CONFIG.gnuCommon @@ -53,3 +53,5 @@ LOADABLE_SHRLIB_LDFLAGS = -shared -fPIC GNU_LDLIBS_YES = -lgcc +# Use GNU compiler flags to generate header dependancies files +HDEPENDS_METHOD = CFLAGS diff --git a/configure/os/CONFIG.darwinCommon.darwinCommon b/configure/os/CONFIG.darwinCommon.darwinCommon index 986d6c281..ee27f290f 100644 --- a/configure/os/CONFIG.darwinCommon.darwinCommon +++ b/configure/os/CONFIG.darwinCommon.darwinCommon @@ -106,6 +106,15 @@ vpath %.m $(USR_VPATH) $(ALL_SRC_DIRS) %.o: %.m $(COMPILE.c) -c $< +# +# Header dependency file generation +# +# Use GNU compiler flags when ARCH_CLASS is a single arch value +# otherwise use perl script command +SINGLE_ARCH=$(filter 1,$(words $(ARCH_CLASS))) +HDEPENDS_CFLAGS = $(if $(SINGLE_ARCH),$(HDEPENDS_CFLAGS_$(HDEPENDS))) +HDEPENDS_METHOD = $(if $(SINGLE_ARCH),CFLAGS,CMD) + #-------------------------------------------------- # Allow site overrides -include $(CONFIG)/os/CONFIG_SITE.darwinCommon.darwinCommon diff --git a/configure/os/CONFIG.solarisCommon.solarisCommon b/configure/os/CONFIG.solarisCommon.solarisCommon index 259c8639c..8402bd5e8 100644 --- a/configure/os/CONFIG.solarisCommon.solarisCommon +++ b/configure/os/CONFIG.solarisCommon.solarisCommon @@ -58,6 +58,10 @@ OP_SYS_LDFLAGS += -z ignore -z combreloc -z lazyload #COMPILE_FILTER.c = 2>&1 | $(EPICS_BASE)/configure/tools/filterWarnings.pl #COMPILE_FILTER.cpp = $(COMPILE_FILTER.c) +# Header dependency file generation command +HDEPENDS_METHOD=CMD +HDEPENDSCMD = $(if $(filter .c,$(suffix $<)),$(COMPILE.c),$(COMPILE.cpp)) -xM1 $< >$*$(DEP) + #-------------------------------------------------- # Allow site overrides -include $(CONFIG)/os/CONFIG_SITE.solarisCommon.solarisCommon