1 # Makefile for GNU F77 compiler runtime, libc interface.
2 # Copyright (C) 1995-1998, 2001 Free Software Foundation, Inc.
3 # Contributed by Dave Love (d.love@dl.ac.uk).
5 #This file is part of the GNU Fortran libU77 library.
7 #The GNU Fortran libU77 library is free software; you can redistribute
8 #it and/or modify it under the terms of the GNU Library General Public
9 #License as published by the Free Software Foundation; either version 2,
10 #or (at your option) any later version.
12 #GNU Fortran is distributed in the hope that it will be useful,
13 #but WITHOUT ANY WARRANTY; without even the implied warranty of
14 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 #GNU Library General Public License for more details.
17 #You should have received a copy of the GNU General Public License
18 #along with GNU Fortran; see the file COPYING. If not, write to
19 #the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #### Start of system configuration section. ####
24 # $(srcdir) must be set to the g77 runtime libU77 source directory
28 # configure sets this to all the -D options appropriate for the
33 F2C_H_DIR = @srcdir@/..
42 #### End of system configuration section. ####
44 # fio.h is in libI77. config.h is in `.'.
45 ALL_CFLAGS = -I. -I$(srcdir) -I$(F2C_H_DIR)/libI77 -I$(G2C_H_DIR) \
46 -I$(F2C_H_DIR) $(CPPFLAGS) $(DEFS) $(WARN_CFLAGS) $(CFLAGS)
48 # This could probably be done more elegantly, but it's currently
49 # just for running the u77-test test.
50 G77DIR = ../../../gcc/
56 @LIBTOOL@ --mode=compile $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $<
58 OBJS = VersionU.lo gerror_.lo perror_.lo ierrno_.lo itime_.lo time_.lo \
59 unlink_.lo fnum_.lo getpid_.lo getuid_.lo getgid_.lo kill_.lo rand_.lo \
60 srand_.lo irand_.lo sleep_.lo idate_.lo ctime_.lo etime_.lo \
61 dtime_.lo isatty_.lo ltime_.lo fstat_.lo stat_.lo \
62 lstat_.lo access_.lo link_.lo getlog_.lo ttynam_.lo getcwd_.lo symlnk_.lo \
63 vxttime_.lo vxtidate_.lo gmtime_.lo fdate_.lo secnds_.lo \
64 chdir_.lo chmod_.lo lnblnk_.lo hostnm_.lo rename_.lo fgetc_.lo fputc_.lo \
65 umask_.lo sys_clock_.lo date_.lo second_.lo flush1_.lo mclock_.lo \
66 alarm_.lo datetime_.lo
67 SRCS = Version.c gerror_.c perror_.c ierrno_.c itime_.c time_.c \
68 unlink_.c fnum_.c getpid_.c getuid_.c getgid_.c kill_.c rand_.c \
69 srand_.c irand_.c sleep_.c idate_.c ctime_.c etime_.c \
70 dtime_.c isatty_.c ltime_.c fstat_.c stat_.c \
71 lstat_.c access_.c link_.c getlog_.c ttynam_.c getcwd_.c symlnk_.c \
72 vxttime_.c vxtidate_.c gmtime_.c fdate_.c secnds_.c \
73 chdir_.c chmod_.c lnblnk_.c hostnm_.c rename_.c fgetc_.c fputc_.c \
74 umask_.c sys_clock_.c date_.c second_.c flush1_.c mclock_.c \
81 objs='$(OBJS)'; for name in $$objs; do \
82 echo libU77/$${name} >> $@.T; done
85 Makefile: Makefile.in config.status
86 $(SHELL) config.status
88 config.status: configure
90 CONFIG_SITE=no-such-file CC='$(CC)' CFLAGS='$(CFLAGS)' \
91 CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
93 ${srcdir}/configure: configure.in
94 cd ${srcdir} && autoconf
96 ${srcdir}/config.hin: stamp-h.in
97 ${srcdir}/stamp-h.in: configure.in acconfig.h
98 cd ${srcdir} && autoheader
99 echo timestamp > ${srcdir}/stamp-h.in
102 stamp-h: config.hin config.status
103 $(SHELL) config.status
104 echo timestamp > stamp-h
106 VersionU.lo: Version.c
107 @LIBTOOL@ --mode=compile $(CC) -c $(ALL_CFLAGS) $(srcdir)/Version.c -o $@
109 $(OBJS): $(F2C_H_DIR)/f2c.h $(G2C_H_DIR)/g2c.h config.h
110 access_.lo: access_.c
114 fnum_.lo: fnum_.c $(F2C_H_DIR)/libI77/fio.h
116 gerror_.lo: gerror_.c
117 getcwd_.lo: getcwd_.c
118 getgid_.lo: getgid_.c
119 getlog_.lo: getlog_.c
120 getpid_.lo: getpid_.c
121 getuid_.lo: getuid_.c
123 ierrno_.lo: ierrno_.c
125 isatty_.lo: isatty_.c $(F2C_H_DIR)/libI77/fio.h
132 perror_.lo: perror_.c
136 rename_.lo: rename_.c
137 second_.lo: second_.c
141 symlnk_.lo: symlnk_.c
143 ttynam_.lo: ttynam_.c
144 unlink_.lo: unlink_.c
146 vxttime_.lo: vxttime_.c
147 vtxidate_.lo: vxtidate_.c
149 gmtime_.lo: gmtime_.c
150 secnds_.lo: secnds_.c
151 lnblnk_.lo: lnblnk_.c
154 hostnm_.lo: hostnm_.c
155 rename_.lo: rename_.c
158 sys_clock_.lo: sys_clock_.c
161 flush1_.lo: flush1_.c
162 mclock_.lo: mclock_.c
164 datetime_.lo: datetime_.c
167 -$(G77DIR)g77 -B$(G77DIR) -L.. -g $(srcdir)/u77-test.f \
168 -lg2c $(LIBS) -lm -o a.out && ./a.out
171 install uninstall install-strip dist installcheck installdirs:
178 rm -f config.log ../s-libu77
181 rm -f config.cache config.status Makefile config.h stamp.h \
182 ../s-libu77 configure
186 .PHONY: mostlyclean clean distclean maintainer-clean all check uninstall \
187 install-strip dist installcheck installdirs archive