1 # ###################################################################
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
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
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 # ###################################################################
32 CPPFLAGS
= -DVERSION
=\"$
(VERSION
)\"
40 # Where to install stuff
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 \
53 SRC_C
= errormesg.c list.c macro.c main.c modfile_name.c utils.c xmalloc.c
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
)
68 .SUFFIXES
: .c .o .l .y .h
71 $
(CC
) -c $
(CFLAGS
) $
(CPPFLAGS
) $
<
74 $
(LEX
) $
(LFLAGS
) -t $
< > $@
77 $
(YACC
) -d $
(YFLAGS
) $
<
82 $
(YACC
) -d $
(YFLAGS
) $
<
88 $
(CC
) -o $@ $
(CPPFLAGS
) $
(CFLAGS
) $
(OBJ
) $
(LIBOBJS
) $
(LIBS
)
93 rm
-f
*.o $
(PROG
) gmon.out gmon.sum
94 find .
-name
'core' -exec rm
{} \
;
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
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
134 find_dep.h find_dep.c
: find_dep.y
136 configure
: configure.in
139 Makefile
: Makefile.in configure
142 Makefile.def
: Makefile
143 cp Makefile Makefile.def
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
)
155 wc
-l $
(SRC
) $
(EXTRA_SRC
)