updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / da / makedepf90-2.8.8 / Makefile.def
blob72343a592e6f6c833db01ecdfa533af37bc4770b
1 # ###################################################################
3 #
4 # Copyright (C) 2000-2006 Erik Edelmann <Erik.Edelmann@iki.fi>
6 # This program is free software; you can redistribute it
7 # and/or modify it under the terms of the GNU General Public
8 # License version 2 as published by the Free Software
9 # Foundation.
11 # This program is distributed in the hope that it will be
12 # useful, but WITHOUT ANY WARRANTY; without even the implied
13 # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 # PURPOSE. See the GNU General Public License for more
15 # details.
17 # You should have received a copy of the GNU General Public
18 # License along with this program; if not, write to the Free
19 # Software Foundation, Inc., 59 Temple Place, Suite 330,
20 # Boston, MA 02111-1307 USA
23 # ###################################################################
26 PROG = makedepf90
28 VERSION = 2.8.8
30 CC = gcc
31 CFLAGS = -g -O2
32 CPPFLAGS = -DVERSION=\"$(VERSION)\"
34 LEX = flex
35 LFLAGS = -i -B
37 YACC = bison -y
38 YFLAGS =
40 # Where to install stuff
41 prefix = /usr/local
42 exec_prefix = ${prefix}
43 bindir = ${exec_prefix}/bin
44 mandir = ${prefix}/man
46 # How to install stuff
47 INSTALL=/bin/install -c
48 INSTALL_PROGRAM=${INSTALL}
49 INSTALL_DATA=${INSTALL} -m 644
51 SRC_H = errormesg.h finddep.h global.h list.h macro.h modfile_name.h utils.h \
52 xmalloc.h
53 SRC_C = errormesg.c list.c macro.c main.c modfile_name.c utils.c xmalloc.c
54 SRC_Y = find_dep.y
55 SRC_L = lexer.l
56 SRC = $(SRC_H) $(SRC_C) $(SRC_Y) $(SRC_L)
58 EXTRA_SRC = strcasecmp.c
60 DISTFILES = $(SRC) lexer.c find_dep.h find_dep.c Makefile.in configure.in \
61 configure makedepf90.1 COPYING NEWS README Makefile.def .depend \
62 $(EXTRA_SRC) install-sh config.h.in config.h
64 OBJ = ${SRC_C:.c=.o} $(SRC_Y:.y=.o) $(SRC_L:.l=.o)
65 LIBOBJS =
67 .SUFFIXES:
68 .SUFFIXES: .c .o .l .y .h
70 .c.o:
71 $(CC) -c $(CFLAGS) $(CPPFLAGS) $<
73 .l.c:
74 $(LEX) $(LFLAGS) -t $< > $@
76 .y.c:
77 $(YACC) -d $(YFLAGS) $<
78 mv y.tab.c $@
79 mv y.tab.h $*.h
81 .y.h:
82 $(YACC) -d $(YFLAGS) $<
83 mv y.tab.h $@
84 mv y.tab.c $*.c
87 $(PROG): $(OBJ)
88 $(CC) -o $@ $(CPPFLAGS) $(CFLAGS) $(OBJ) $(LIBOBJS) $(LIBS)
90 include .depend
92 clean:
93 rm -f *.o $(PROG) gmon.out gmon.sum
94 find . -name 'core' -exec rm {} \;
96 realclean: clean
97 rm -f lexer.c find_dep.[ch] .depend configure tags config.cache config.log config.status
99 install: $(PROG) makedepf90.1
100 $(INSTALL) -d $(bindir)
101 $(INSTALL_PROGRAM) $(PROG) $(bindir)
102 $(INSTALL) -d $(mandir)/man1
103 $(INSTALL_DATA) makedepf90.1 $(mandir)/man1
104 install-strip: $(PROG) makedepf90.1
105 $(INSTALL) -d $(bindir)
106 $(INSTALL_PROGRAM) -s $(PROG) $(bindir)
107 $(INSTALL) -d $(mandir)/man1
108 $(INSTALL_DATA) makedepf90.1 $(mandir)/man1
110 test: $(PROG)
111 (cd testdir/test1; bash test1.sh)
112 (cd testdir/test2; bash test2.sh)
113 (cd testdir/bayes; bash bayes.sh)
114 (cd testdir/bayes2; bash test.sh)
115 (cd testdir/bayes3; bash bayes3.sh)
116 (cd testdir/bayes4; bash bayes4.sh)
117 (cd testdir/bayes_coco; bash bayes_coco.sh)
118 (cd testdir/ranlib; bash ranlib.sh)
119 (cd testdir/convert; bash convert.sh)
120 (cd testdir/stdtype; bash stdtype.sh)
121 (cd testdir/f90ppr; bash f90ppr.sh)
122 (cd testdir/f90tops; bash f90tops.sh)
123 (cd testdir/e; bash e.sh)
124 (cd testdir/err; bash err.sh)
125 (cd testdir/recur; bash recur.sh)
126 (cd testdir/eol; bash eol.sh)
127 (cd testdir/optI; bash optI.sh)
128 (cd testdir/glurr; bash glurr.sh)
130 depend .depend: lexer.c find_dep.c find_dep.h
131 $(CC) -MM *.c > .depend
133 lexer.c: lexer.l
134 find_dep.h find_dep.c: find_dep.y
136 configure: configure.in
137 autoconf
139 Makefile: Makefile.in configure
140 ./configure
142 Makefile.def: Makefile
143 cp Makefile Makefile.def
145 dist: $(DISTFILES)
146 if [ -d makedepf90-$(VERSION) -o -f makedepf90-$(VERSION) ]; then \
147 rm -rf makedepf90-$(VERSION); \
149 mkdir makedepf90-$(VERSION)
150 cp $(DISTFILES) makedepf90-$(VERSION)
151 tar zcvf makedepf90-$(VERSION).tar.gz makedepf90-$(VERSION)
152 rm -rf makedepf90-$(VERSION)
154 wcl:
155 wc -l $(SRC) $(EXTRA_SRC)