1 # Makefile for GNU F77 compiler runtime, libc interface.
2 # Copyright (C) 1995-1998 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
35 F2C_H_DIR = @srcdir@/..
46 #### End of system configuration section. ####
48 # fio.h is in libI77. config.h is in `.'.
49 ALL_CFLAGS = -I. -I$(srcdir) -I$(F2C_H_DIR)/libI77 -I$(G2C_H_DIR) \
50 -I$(F2C_H_DIR) $(CPPFLAGS) $(DEFS) $(CFLAGS)
52 # This could probably be done more elegantly, but it's currently
53 # just for running the u77-test test.
54 G77DIR = ../../../gcc/
60 $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $<
62 OBJS = VersionU.o gerror_.o perror_.o ierrno_.o itime_.o time_.o \
63 unlink_.o fnum_.o getpid_.o getuid_.o getgid_.o kill_.o rand_.o \
64 srand_.o irand_.o sleep_.o idate_.o ctime_.o etime_.o \
65 dtime_.o isatty_.o ltime_.o fstat_.o stat_.o \
66 lstat_.o access_.o link_.o getlog_.o ttynam_.o getcwd_.o symlnk_.o \
67 vxttime_.o vxtidate_.o gmtime_.o fdate_.o secnds_.o \
69 chdir_.o chmod_.o lnblnk_.o hostnm_.o rename_.o fgetc_.o fputc_.o \
70 umask_.o sys_clock_.o date_.o second_.o flush1_.o mclock_.o \
72 SRCS = Version.c gerror_.c perror_.c ierrno_.c itime_.c time_.c \
73 unlink_.c fnum_.c getpid_.c getuid_.c getgid_.c kill_.c rand_.c \
74 srand_.c irand_.c sleep_.c idate_.c ctime_.c etime_.c \
75 dtime_.c isatty_.c ltime_.c fstat_.c stat_.c \
76 lstat_.c access_.c link_.c getlog_.c ttynam_.c getcwd_.c symlnk_.c \
77 vxttime_.c vxtidate_.c gmtime_.c fdate_.c secnds_.c \
79 chdir_.c chmod_.c lnblnk_.c hostnm_.c rename_.c fgetc_.c fputc_.c \
80 umask_.c sys_clock_.c date_.c second_.c flush1_.c mclock_.c \
86 echo timestamp > ../s-libu77
89 $(AR) $(ARFLAGS) $(LIBG2C) $(OBJS)
91 Makefile: Makefile.in config.status
92 $(SHELL) config.status
94 config.status: configure
96 CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \
97 CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
99 ${srcdir}/configure: configure.in
100 cd ${srcdir} && autoconf
102 ${srcdir}/config.hin: stamp-h.in
103 ${srcdir}/stamp-h.in: configure.in acconfig.h
104 cd ${srcdir} && autoheader
105 echo timestamp > ${srcdir}/stamp-h.in
108 stamp-h: config.hin config.status
109 $(SHELL) config.status
110 echo timestamp > stamp-h
112 VersionU.o: Version.c
113 $(CC) -c $(ALL_CFLAGS) -o $@ $(srcdir)/Version.c
115 $(OBJS): $(F2C_H_DIR)/f2c.h $(G2C_H_DIR)/g2c.h config.h
120 fnum_.o: fnum_.c $(F2C_H_DIR)/libI77/fio.h
131 isatty_.o: isatty_.c $(F2C_H_DIR)/libI77/fio.h
152 vxttime_.o: vxttime_.c
153 vtxidate_.o: vxtidate_.c
166 sys_clock_.o: sys_clock_.c
172 datetime_.o: datetime_.c
175 -$(G77DIR)g77 -B$(G77DIR) -L.. -g $(srcdir)/u77-test.f -lg2c $(LIBS) -lm && ./a.out
178 install uninstall install-strip dist installcheck installdirs:
184 rm -f config.log ../s-libu77
187 rm -f config.cache config.status Makefile config.h stamp.h \
188 ../s-libu77 configure
192 .PHONY: mostlyclean clean distclean maintainer-clean all check uninstall \
193 install-strip dist installcheck installdirs archive