version 1.25, 2013/08/27 21:06:31
|
version 1.26, 2013/08/30 16:36:38
|
|
|
SOURCES_NO_ASM = $(SOURCES) | SOURCES_NO_ASM = $(SOURCES) |
endif | endif |
| |
ifeq ($(CXX), g++) |
## |
|
## test for compiler definition in CXX (g++, clang++, etc. compilers). |
|
## Test for compiler type as substring, not exact because there |
|
## are cases where other info exists in CXX (ex. CXX=ccache g++) |
|
## |
|
ifeq ($(findstring g++, $(CXX)), g++) |
PEGASUS_CXX_MAKEDEPEND_OPTION = -M | PEGASUS_CXX_MAKEDEPEND_OPTION = -M |
endif | endif |
|
|
ifeq ($(CXX), clang++) | ifeq ($(CXX), clang++) |
PEGASUS_CXX_MAKEDEPEND_OPTION = -M | PEGASUS_CXX_MAKEDEPEND_OPTION = -M |
C_SOURCES = $(filter %.c, $(SOURCES)) | C_SOURCES = $(filter %.c, $(SOURCES)) |
|
|
acc_sed_filter = -e 's=$(OBJ_DIR).*cpp:==g' | acc_sed_filter = -e 's=$(OBJ_DIR).*cpp:==g' |
endif | endif |
| |
|
## |
|
## If compiler definition found, use compiler to define depend.mak |
|
## each obj dir |
|
## |
ifdef PEGASUS_CXX_MAKEDEPEND_OPTION | ifdef PEGASUS_CXX_MAKEDEPEND_OPTION |
| |
ifeq ($(COMPILER), clang) | ifeq ($(COMPILER), clang) |
|
|
else | else |
depend: $(OBJ_DIR)/target $(ERROR) | depend: $(OBJ_DIR)/target $(ERROR) |
$(CXX) $(PEGASUS_CXX_MAKEDEPEND_OPTION) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $(SOURCES_NO_ASM) | sed -e 's=^\(.*:\)='$(OBJ_DIR)'/\1=' $(acc_sed_filter) > $(DEPEND_MAK) | $(CXX) $(PEGASUS_CXX_MAKEDEPEND_OPTION) $(LOCAL_DEFINES) $(DEFINES) $(SYS_INCLUDES) $(INCLUDES) $(SOURCES_NO_ASM) | sed -e 's=^\(.*:\)='$(OBJ_DIR)'/\1=' $(acc_sed_filter) > $(DEPEND_MAK) |
|
|
endif | endif |
|
|
|
## |
|
## Compiler type not found. If PEGASUS_HAS_MAKEDEPEND set use makedepend |
|
## to define depend.mak files. Otherwise use OpenPegasus mu to create |
|
## depend.make files |
|
## |
else | else |
ifdef PEGASUS_HAS_MAKEDEPEND | ifdef PEGASUS_HAS_MAKEDEPEND |
DEPEND_INCLUDES += -DPEGASUS_OS_TYPE_UNIX -I/usr/include $(SYS_INCLUDES) | DEPEND_INCLUDES += -DPEGASUS_OS_TYPE_UNIX -I/usr/include $(SYS_INCLUDES) |