cantera/Cantera/cxx/demos/Makefile
2004-02-03 03:31:05 +00:00

31 lines
644 B
Makefile

# 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)