98 lines
2 KiB
Bash
98 lines
2 KiB
Bash
#!/bin/sh
|
|
|
|
.SUFFIXES :
|
|
.SUFFIXES : .cpp .d .o .h .f
|
|
|
|
|
|
# the object files to be linked together.
|
|
OBJS = isentropic.o ctlib.o demo_ftnlib.o
|
|
|
|
# additional flags to be passed to the linker. If your program
|
|
# requires other external libraries, put them here
|
|
LINK_OPTIONS =
|
|
|
|
#---------------------------------------------------------------------------
|
|
# You probably don't need to edit anything below.
|
|
|
|
|
|
# the Fortran compiler
|
|
FORT = @F77@
|
|
|
|
# Fortran compile flags
|
|
FORT_FLAGS = @FFLAGS@
|
|
|
|
# Fortran libraries
|
|
FORT_LIBS = @LCXX_FLIBS@ @FLIBS@ @LCXX_END_LIBS@
|
|
|
|
# the C++ compiler
|
|
CXX = @CXX@
|
|
|
|
# C++ compile flags
|
|
CXX_FLAGS = @CXXFLAGS@
|
|
|
|
# external libraries
|
|
EXT_LIBS = @LOCAL_LIBS@ -lctcxx
|
|
|
|
# the directory where the Cantera libraries are located
|
|
CANTERA_LIBDIR=@ct_libdir@
|
|
|
|
# the directory where Cantera include files may be found.
|
|
CANTERA_INCDIR=@ct_incroot@
|
|
|
|
# flags passed to the C++ compiler/linker for the linking step
|
|
LCXX_FLAGS = -L$(CANTERA_LIBDIR) @LOCAL_LIB_DIRS@ @CXXFLAGS@
|
|
|
|
# how to compile C++ source files to object files
|
|
.@CXX_EXT@.@OBJ_EXT@:
|
|
$(CXX) -c $< -I$(CANTERA_INCDIR) $(CXX_FLAGS)
|
|
|
|
# how to compile Fortran source files to object files
|
|
.@F77_EXT@.@OBJ_EXT@:
|
|
$(FORT) -c $< $(FORT_FLAGS)
|
|
|
|
PROGRAM = $(PROG_NAME)$(EXE_EXT)
|
|
|
|
DEPENDS = $(OBJS:.o=.d)
|
|
|
|
all: isentropic ctlib
|
|
|
|
isentropic: isentropic.o demo_ftnlib.o
|
|
$(CXX) -o isentropic isentropic.o demo_ftnlib.o $(LCXX_FLAGS) $(CANTERA_LIBS) $(LINK_OPTIONS) $(EXT_LIBS) @LIBS@ $(FORT_LIBS)
|
|
|
|
ctlib: ctlib.o demo_ftnlib.o
|
|
$(CXX) -o ctlib ctlib.o demo_ftnlib.o $(LCXX_FLAGS) $(CANTERA_LIBS) $(LINK_OPTIONS) $(EXT_LIBS) @LIBS@ $(FORT_LIBS)
|
|
|
|
.cpp.d:
|
|
@CXX_DEPENDS@ -I$(CANTERA_INCDIR) $(CXX_FLAGS) $*.cpp > $*.d
|
|
|
|
.f.d:
|
|
@echo "$*.o: $*.f" | cat > $*.d
|
|
|
|
|
|
clean:
|
|
$(RM) $(OBJS) isentropic ctlib *.d .depends \
|
|
diff* output_0.txt output_1.txt gri30.xml ct2ctml.log \
|
|
isentropic.dsp
|
|
|
|
test:
|
|
@MAKE@
|
|
./runtest
|
|
|
|
depends:
|
|
@MAKE@ .depends
|
|
|
|
.depends: $(DEPENDS)
|
|
cat *.d > .depends
|
|
|
|
TAGS:
|
|
etags *.h *.cpp
|
|
|
|
ifeq ($(wildcard .depends), .depends)
|
|
include .depends
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|