Made depends rule like the cxx rule.
This commit is contained in:
parent
9f79fe420b
commit
0a976c661c
1 changed files with 15 additions and 12 deletions
|
|
@ -9,8 +9,8 @@
|
|||
###############################################################
|
||||
|
||||
|
||||
SUFFIXES=
|
||||
SUFFIXES= .cpp .d .o
|
||||
.SUFFIXES :
|
||||
.SUFFIXES : .cpp .d .o .h
|
||||
|
||||
PIC_FLAG=@PIC@
|
||||
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
|
||||
|
|
@ -19,26 +19,30 @@ OBJS = importPhase.o
|
|||
|
||||
DEPENDS = $(OBJS:.o=.d)
|
||||
|
||||
# the C++ compiler
|
||||
CXX = @CXX@
|
||||
PIC_FLAG=@PIC@
|
||||
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
|
||||
|
||||
|
||||
# the directory where Cantera include files may be found.
|
||||
CXX_INCLUDES = -I../../src/base -I../../src/thermo @CXX_INCLUDES@
|
||||
|
||||
# how to compile C++ source files to object files
|
||||
.@CXX_EXT@.@OBJ_EXT@:
|
||||
.cpp.o:
|
||||
$(CXX) -c $< $(CXX_INCLUDES) $(CXX_FLAGS)
|
||||
|
||||
%.d:
|
||||
@CXX_DEPENDS@ $(CXX_FLAGS) $(CXX_INCLUDES) $*.cpp > $*.d
|
||||
|
||||
LIB_NAME=libctcxx
|
||||
CXXLIB=@buildlib@/$(LIB_NAME).a
|
||||
|
||||
all: $(CXXLIB)
|
||||
all: .depends $(CXXLIB)
|
||||
|
||||
$(CXXLIB): $(OBJS)
|
||||
@ARCHIVE@ $(CXXLIB) $(OBJS)
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJS) $(CXXLIB)
|
||||
$(RM) $(OBJS) *.d $(CXXLIB)
|
||||
(if test -d SunWS_cache ; then \
|
||||
$(RM) -rf SunWS_cache ; \
|
||||
fi )
|
||||
|
|
@ -46,12 +50,11 @@ clean:
|
|||
install:
|
||||
@INSTALL@ $(CXXLIB) @prefix@/lib/cantera
|
||||
|
||||
%.d:
|
||||
@CXX_DEPENDS@ $(CXX_INCLUDES) $*.cpp > $*.d
|
||||
depends:
|
||||
@MAKE@ .depends
|
||||
|
||||
depends: $(DEPENDS)
|
||||
cat *.d > .depends
|
||||
$(RM) $(DEPENDS)
|
||||
.depends: $(DEPENDS)
|
||||
cat $(DEPENDS) > .depends
|
||||
|
||||
ifeq ($(wildcard .depends), .depends)
|
||||
include .depends
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue