From 7fbef7cc0c11aaf94de7b861c152dc31be51f300 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Thu, 22 Apr 2004 21:14:51 +0000 Subject: [PATCH] Ok, think I fixed it. Added a demo results and added Makefile back into repository so that demo problems run correctly in both directories (and give the same result). --- Cantera/cxx/Makefile.in | 3 ++- Cantera/cxx/demos/Makefile.in | 12 ++++++++++++ Cantera/cxx/demos/Makefile.install | 31 ++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 Cantera/cxx/demos/Makefile.install diff --git a/Cantera/cxx/Makefile.in b/Cantera/cxx/Makefile.in index 05e977663..c34cf2887 100644 --- a/Cantera/cxx/Makefile.in +++ b/Cantera/cxx/Makefile.in @@ -14,7 +14,8 @@ build_python=@BUILD_PYTHON@ build_particles=@BUILD_PARTICLES@ all: - cd src; @MAKE@ + @INSTALL@ include/*.h ../../build/include/cantera + cd src; @MAKE@ cd demos; @MAKE@ clean: diff --git a/Cantera/cxx/demos/Makefile.in b/Cantera/cxx/demos/Makefile.in index c5e9dd60e..c60d3c7a8 100644 --- a/Cantera/cxx/demos/Makefile.in +++ b/Cantera/cxx/demos/Makefile.in @@ -63,6 +63,18 @@ $(PROGRAM): $(OBJS) $(CANTERA_LIBDIR)/libcantera.a test: @MAKE@ $(PROGRAM) ./runtest + +install: + @INSTALL@ -d @ct_demodir@/cxx + @INSTALL@ *.cpp @ct_demodir@/cxx + @INSTALL@ *.h @ct_demodir@/cxx + @INSTALL@ kin1_blessed.csv @ct_demodir@/cxx + @INSTALL@ kin1_blessed.dat @ct_demodir@/cxx + @INSTALL@ Makefile.install @ct_demodir@/cxx/Makefile + chown -R @username@ @ct_demodir@/cxx + + clean: $(RM) $(OBJS) $(PROGRAM) ../../../bin/rm_cvsignore + diff --git a/Cantera/cxx/demos/Makefile.install b/Cantera/cxx/demos/Makefile.install new file mode 100644 index 000000000..45cb5eac6 --- /dev/null +++ b/Cantera/cxx/demos/Makefile.install @@ -0,0 +1,31 @@ +# This Makefile uses script 'ctnew' to create the Makefiles for each +# demo program. This script is created during the Cantera build +# process, and is installed by default in /usr/local/bin. + +# if script ctnew is not on the PATH, set this to the path to it. +CTNEW = ctnew + +SRCS = kinetics1.cpp kinetics2.cpp flame1.cpp + +OBJS = $(SRCS:.cpp=.o) +EXES = $(SRCS:.cpp=.x) +MKS = $(SRCS:.cpp=.mak) + +all: $(EXES) + +%.mak: + $(CTNEW); sed 's/demo/$*/g' demo.mak > $*.mak + +%.x: + @echo + @echo Building program $*.x... + @echo + make $*.mak; make -f $*.mak; mv $* $*.x + @echo + @echo type '$*.x' to run the program + @echo + +clean: + rm -f $(OBJS) $(EXES) $(MKS) + +