Use compiler flags for header dependency file generation when possible.

This commit is contained in:
Janet B. Anderson
2009-11-25 17:15:47 +00:00
parent 99bd16d7e6
commit d4afa2528d
3 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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