1 | ######################################################################################## |
---|
2 | # |
---|
3 | # KPP - The Kinetic PreProcessor |
---|
4 | # Builds simulation code for chemical kinetic systems |
---|
5 | # |
---|
6 | # Copyright (C) 1995-1996 Valeriu Damian and Adrian Sandu |
---|
7 | # Copyright (C) 1997-2005 Adrian Sandu |
---|
8 | # with contributions from: Mirela Damian, Rolf Sander |
---|
9 | # |
---|
10 | # KPP is free software; you can redistribute it and/or modify it under the |
---|
11 | # terms of the GNU General Public License as published by the Free Software |
---|
12 | # Foundation (http://www.gnu.org/copyleft/gpl.html); either version 2 of the |
---|
13 | # License, or (at your option) any later version. |
---|
14 | # |
---|
15 | # KPP is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
16 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
---|
17 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
---|
18 | # details. |
---|
19 | # |
---|
20 | # You should have received a copy of the GNU General Public License along |
---|
21 | ## with this program; if not, consult http://www.gnu.org/copyleft/gpl.html or |
---|
22 | # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
23 | # Boston, MA 02111-1307, USA. |
---|
24 | # |
---|
25 | # Adrian Sandu |
---|
26 | # Computer Science Department |
---|
27 | # Virginia Polytechnic Institute and State University |
---|
28 | # Blacksburg, VA 24060 |
---|
29 | # E-mail: sandu@cs.vt.edu |
---|
30 | # |
---|
31 | ####################################################################################### |
---|
32 | |
---|
33 | include ../Makefile.defs |
---|
34 | |
---|
35 | BISON=bison -d |
---|
36 | CFLAGS=`cat ../cflags` |
---|
37 | |
---|
38 | all: kpp |
---|
39 | |
---|
40 | .c.o: |
---|
41 | @echo " "$(CC) $(CC_FLAGS) $(CFLAGS) -c $*.c |
---|
42 | @$(CC) $(CC_FLAGS) $(CFLAGS) -I$(INCLUDE_DIR) -c $*.c |
---|
43 | |
---|
44 | OBJS = \ |
---|
45 | y.tab.o \ |
---|
46 | lex.yy.o \ |
---|
47 | scanner.o \ |
---|
48 | scanutil.o \ |
---|
49 | kpp.o \ |
---|
50 | gen.o \ |
---|
51 | code.o \ |
---|
52 | code_c.o \ |
---|
53 | code_f77.o \ |
---|
54 | code_f90.o \ |
---|
55 | code_matlab.o \ |
---|
56 | debug.o |
---|
57 | |
---|
58 | kpp: $(OBJS) |
---|
59 | @echo " "$(CC) $(CC_FLAGS) $(CFLAGS) $(OBJS) -L$(FLEX_LIB_DIR) -lfl -o kpp |
---|
60 | @$(CC) $(CC_FLAGS) $(CFLAGS) $(OBJS) -L$(FLEX_LIB_DIR) -lfl -o kpp |
---|
61 | @mv kpp ../bin |
---|
62 | |
---|
63 | clean: |
---|
64 | @rm -f *~ *.o cflags |
---|
65 | |
---|
66 | maintainer-clean: clean |
---|
67 | @rm -f lex.yy.c y.tab.c y.tab.h |
---|
68 | |
---|
69 | lex.yy.c: scan.l scan.h |
---|
70 | @echo " "$(FLEX) scan.l |
---|
71 | @$(FLEX) -olex.yy.c scan.l |
---|
72 | |
---|
73 | y.tab.c: scan.y scan.h |
---|
74 | @echo " "$(BISON) scan.y |
---|
75 | @$(BISON) -o y.tab.c scan.y |
---|
76 | |
---|
77 | flex: lex.yy.c y.tab.c |
---|
78 | |
---|
79 | scanner.o: scan.h gdata.h |
---|
80 | scanutil.o: scan.h |
---|
81 | kpp.o: gdata.h |
---|
82 | gen.o: gdata.h code.h |
---|
83 | debug.o: gdata.h |
---|
84 | code.o: gdata.h code.h |
---|
85 | |
---|
86 | code_c.o: gdata.h code.h |
---|
87 | code_f.o: gdata.h code.h |
---|