Added depends target to makefiles
This commit is contained in:
parent
8597f5b934
commit
11d73d12c1
9 changed files with 52 additions and 74 deletions
|
|
@ -9,12 +9,14 @@ all:
|
|||
cd silane_equil; @MAKE@ all
|
||||
cd surfkin; @MAKE@ all
|
||||
cd diamondSurf; @MAKE@ all
|
||||
cd ck2cti_test; @MAKE@ all
|
||||
|
||||
test:
|
||||
cd cxx_ex; @MAKE@ test
|
||||
cd silane_equil; @MAKE@ test
|
||||
cd surfkin; @MAKE@ test
|
||||
cd diamondSurf; @MAKE@ test
|
||||
cd ck2cti_test; @MAKE@ test
|
||||
|
||||
clean:
|
||||
$(RM) *.*~
|
||||
|
|
@ -22,4 +24,12 @@ clean:
|
|||
cd silane_equil; @MAKE@ clean
|
||||
cd surfkin; @MAKE@ clean
|
||||
cd diamondSurf; @MAKE@ clean
|
||||
cd ck2cti_test; @MAKE@ clean
|
||||
|
||||
depends:
|
||||
cd cxx_ex; @MAKE@ depends
|
||||
cd silane_equil; @MAKE@ depends
|
||||
cd surfkin; @MAKE@ depends
|
||||
cd diamondSurf; @MAKE@ depends
|
||||
cd ck2cti_test; @MAKE@ depends
|
||||
|
||||
|
|
|
|||
|
|
@ -12,3 +12,5 @@ test:
|
|||
clean:
|
||||
../../bin/rm_cvsignore
|
||||
|
||||
depends:
|
||||
|
||||
|
|
|
|||
|
|
@ -12,3 +12,5 @@ test:
|
|||
clean:
|
||||
../../bin/rm_cvsignore
|
||||
|
||||
depends:
|
||||
|
||||
|
|
|
|||
|
|
@ -18,50 +18,10 @@
|
|||
<pressure units="Pa">101325.0</pressure>
|
||||
</state>
|
||||
<thermo model="IdealGas"/>
|
||||
<kinetics model="GRI30"/>
|
||||
<transport model="None"/>
|
||||
</phase>
|
||||
|
||||
<!-- phase gri30_mix -->
|
||||
<phase dim="3" id="gri30_mix">
|
||||
<elementArray datasrc="elements.xml">O H C N Ar </elementArray>
|
||||
<speciesArray datasrc="#species_data">
|
||||
H2 H O O2 OH H2O HO2 H2O2 C CH
|
||||
CH2 CH2(S) CH3 CH4 CO CO2 HCO CH2O CH2OH CH3O
|
||||
CH3OH C2H C2H2 C2H3 C2H4 C2H5 C2H6 HCCO CH2CO HCCOH
|
||||
N NH NH2 NH3 NNH NO NO2 N2O HNO CN
|
||||
HCN H2CN HCNN HCNO HOCN HNCO NCO N2 AR C3H7
|
||||
C3H8 CH2CHO CH3CHO </speciesArray>
|
||||
<reactionArray datasrc="#reaction_data"/>
|
||||
<state>
|
||||
<temperature units="K">300.0</temperature>
|
||||
<pressure units="Pa">101325.0</pressure>
|
||||
</state>
|
||||
<thermo model="IdealGas"/>
|
||||
<kinetics model="GRI30"/>
|
||||
<kinetics model="GasKinetics"/>
|
||||
<transport model="Mix"/>
|
||||
</phase>
|
||||
|
||||
<!-- phase gri30_multi -->
|
||||
<phase dim="3" id="gri30_multi">
|
||||
<elementArray datasrc="elements.xml">O H C N Ar </elementArray>
|
||||
<speciesArray datasrc="#species_data">
|
||||
H2 H O O2 OH H2O HO2 H2O2 C CH
|
||||
CH2 CH2(S) CH3 CH4 CO CO2 HCO CH2O CH2OH CH3O
|
||||
CH3OH C2H C2H2 C2H3 C2H4 C2H5 C2H6 HCCO CH2CO HCCOH
|
||||
N NH NH2 NH3 NNH NO NO2 N2O HNO CN
|
||||
HCN H2CN HCNN HCNO HOCN HNCO NCO N2 AR C3H7
|
||||
C3H8 CH2CHO CH3CHO </speciesArray>
|
||||
<reactionArray datasrc="#reaction_data"/>
|
||||
<state>
|
||||
<temperature units="K">300.0</temperature>
|
||||
<pressure units="Pa">101325.0</pressure>
|
||||
</state>
|
||||
<thermo model="IdealGas"/>
|
||||
<kinetics model="GRI30"/>
|
||||
<transport model="Multi"/>
|
||||
</phase>
|
||||
|
||||
<!-- species definitions -->
|
||||
<speciesData id="species_data">
|
||||
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@ CXX = @CXX@
|
|||
# C++ compile flags
|
||||
CXX_FLAGS = @CXXFLAGS@
|
||||
|
||||
# external libraries
|
||||
EXT_LIBS = @LOCAL_LIBS@ -lctcxx
|
||||
|
||||
# Ending C++ linking libraries
|
||||
LCXX_END_LIBS = @LCXX_END_LIBS@
|
||||
|
||||
|
|
@ -42,7 +39,7 @@ LCXX_END_LIBS = @LCXX_END_LIBS@
|
|||
CANTERA_LIBDIR=@buildlib@
|
||||
|
||||
# required Cantera libraries
|
||||
CANTERA_LIBS =
|
||||
CANTERA_LIBS = @LOCAL_LIBS@ -lctcxx
|
||||
|
||||
# the directory where Cantera include files may be found.
|
||||
CANTERA_INCDIR=@ctroot@/build/include/cantera
|
||||
|
|
@ -69,12 +66,12 @@ all: $(PROGRAM)
|
|||
|
||||
# Rule to make the program
|
||||
$(PROGRAM): $(OBJS) $(CANTERA_LIBDIR)/libcantera.a
|
||||
$(CXX) -o $(PROGRAM) $(OBJS) $(LCXX_FLAGS) $(CANTERA_LIBS) \
|
||||
$(LINK_OPTIONS) $(EXT_LIBS) @LIBS@ $(FORT_LIBS) \
|
||||
$(CXX) -o $(PROGRAM) $(OBJS) $(LCXX_FLAGS) $(LINK_OPTIONS) \
|
||||
$(CANTERA_LIBS) @LIBS@ $(FORT_LIBS) \
|
||||
$(LCXX_END_LIBS)
|
||||
|
||||
# depends target
|
||||
depends: .depends
|
||||
depends:
|
||||
$(RM) *.d .depends
|
||||
@MAKE@ .depends
|
||||
|
||||
|
|
@ -91,16 +88,3 @@ clean:
|
|||
$(RM) $(OBJS) $(PROGRAM) $(DEPENDS) .depends
|
||||
../../bin/rm_cvsignore
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,3 +3,5 @@ diff_test.out
|
|||
output.txt
|
||||
silane_equil
|
||||
csvCode.txt
|
||||
*.d
|
||||
.depends
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@
|
|||
#
|
||||
#############################################################################
|
||||
|
||||
# addition to suffixes
|
||||
.SUFFIXES : .d
|
||||
|
||||
# the name of the executable program to be created
|
||||
PROG_NAME = silane_equil
|
||||
|
||||
|
|
@ -29,9 +32,6 @@ CXX = @CXX@
|
|||
# C++ compile flags
|
||||
CXX_FLAGS = @CXXFLAGS@
|
||||
|
||||
# external libraries
|
||||
EXT_LIBS = @LOCAL_LIBS@ -lctcxx
|
||||
|
||||
# Ending C++ linking libraries
|
||||
LCXX_END_LIBS = @LCXX_END_LIBS@
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ LCXX_END_LIBS = @LCXX_END_LIBS@
|
|||
CANTERA_LIBDIR=@buildlib@
|
||||
|
||||
# required Cantera libraries
|
||||
CANTERA_LIBS =
|
||||
CANTERA_LIBS = @LOCAL_LIBS@ -lctcxx
|
||||
|
||||
# the directory where Cantera include files may be found.
|
||||
CANTERA_INCDIR=@ctroot@/build/include/cantera
|
||||
|
|
@ -47,24 +47,40 @@ CANTERA_INCDIR=@ctroot@/build/include/cantera
|
|||
# flags passed to the C++ compiler/linker for the linking step
|
||||
LCXX_FLAGS = -L$(CANTERA_LIBDIR) @CXXFLAGS@
|
||||
|
||||
# how to compile C++ source files to object files
|
||||
# How to compile C++ source files to object files
|
||||
.@CXX_EXT@.@OBJ_EXT@:
|
||||
$(CXX) -c $< -I$(CANTERA_INCDIR) $(CXX_FLAGS)
|
||||
|
||||
# How to compile the dependency file
|
||||
.cpp.d:
|
||||
g++ -MM -I$(CANTERA_INCDIR) $(CXX_FLAGS) $*.cpp > $*.d
|
||||
|
||||
# List of dependency files to be created
|
||||
DEPENDS=$(OBJS:.o=.d)
|
||||
|
||||
# Program Name
|
||||
PROGRAM = $(PROG_NAME)$(EXE_EXT)
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
||||
$(PROGRAM): $(OBJS) $(CANTERA_LIBDIR)/libcantera.a
|
||||
$(CXX) -o $(PROGRAM) $(OBJS) $(LCXX_FLAGS) $(CANTERA_LIBS) \
|
||||
$(LINK_OPTIONS) $(EXT_LIBS) @LIBS@ $(FORT_LIBS) \
|
||||
$(CXX) -o $(PROGRAM) $(OBJS) $(LCXX_FLAGS) $(LINK_OPTIONS) \
|
||||
$(CANTERA_LIBS) @LIBS@ $(FORT_LIBS) \
|
||||
$(LCXX_END_LIBS)
|
||||
|
||||
# depends target -> forces recalculation of dependencies
|
||||
depends:
|
||||
$(RM) *.d .depends
|
||||
@MAKE@ .depends
|
||||
|
||||
.depends: $(DEPENDS)
|
||||
cat *.d > .depends
|
||||
|
||||
test:
|
||||
@MAKE@ $(PROGRAM)
|
||||
./runtest
|
||||
clean:
|
||||
$(RM) $(OBJS) $(PROGRAM)
|
||||
$(RM) $(OBJS) $(PROGRAM) $(DEPENDS) .depends
|
||||
../../bin/rm_cvsignore
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ int main(int argc, char **argv) {
|
|||
try {
|
||||
IdealGasMix g("silane.xml", "silane");
|
||||
g.setState_TPX(1500.0, 100.0, "SIH4:0.01, H2:0.99");
|
||||
//g.setState_TPX(1500.0, 1.0132E5, "SIH4:0.01, H2:0.99");
|
||||
equilibrate(g, TP);
|
||||
cout << g;
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ LCXX_END_LIBS = @LCXX_END_LIBS@
|
|||
CANTERA_LIBDIR=@buildlib@
|
||||
|
||||
# required Cantera libraries
|
||||
CANTERA_LIBS =
|
||||
CANTERA_LIBS = @LOCAL_LIBS@ -lctcxx
|
||||
|
||||
# the directory where Cantera include files may be found.
|
||||
CANTERA_INCDIR=@ctroot@/build/include/cantera
|
||||
|
|
@ -65,14 +65,15 @@ PROGRAM = $(PROG_NAME)$(EXE_EXT)
|
|||
all: $(PROGRAM)
|
||||
|
||||
$(PROGRAM): $(OBJS) $(CANTERA_LIBDIR)/libcantera.a
|
||||
$(CXX) -o $(PROGRAM) $(OBJS) $(LCXX_FLAGS) $(CANTERA_LIBS) \
|
||||
$(LINK_OPTIONS) $(EXT_LIBS) @LIBS@ $(FORT_LIBS) \
|
||||
$(CXX) -o $(PROGRAM) $(OBJS) $(LCXX_FLAGS) $(LINK_OPTIONS) \
|
||||
$(CANTERA_LIBS) @LIBS@ $(FORT_LIBS) \
|
||||
$(LCXX_END_LIBS)
|
||||
|
||||
$(OBJS):
|
||||
|
||||
depends: $(DEPENDS)
|
||||
cat *.d > .depends
|
||||
depends:
|
||||
$(RM) *.d .depends
|
||||
@MAKE@ .depends
|
||||
|
||||
.depends: $(DEPENDS)
|
||||
cat *.d > .depends
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue