| 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).
|
|---|
| 4 | #
|
|---|
| 5 | #This file is part of the GNU Fortran libU77 library.
|
|---|
| 6 | #
|
|---|
| 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.
|
|---|
| 11 | #
|
|---|
| 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.
|
|---|
| 16 | #
|
|---|
| 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
|
|---|
| 20 | #02111-1307, USA.
|
|---|
| 21 |
|
|---|
| 22 | #### Start of system configuration section. ####
|
|---|
| 23 |
|
|---|
| 24 | # $(srcdir) must be set to the g77 runtime libU77 source directory
|
|---|
| 25 | srcdir = @srcdir@
|
|---|
| 26 | VPATH = @srcdir@
|
|---|
| 27 |
|
|---|
| 28 | # configure sets this to all the -D options appropriate for the
|
|---|
| 29 | # configuration.
|
|---|
| 30 | DEFS = @DEFS@
|
|---|
| 31 | LIBS = @LIBS@
|
|---|
| 32 |
|
|---|
| 33 | F2C_H_DIR = @srcdir@/..
|
|---|
| 34 | G2C_H_DIR = ..
|
|---|
| 35 | CC = @CC@
|
|---|
| 36 | CFLAGS = @CFLAGS@
|
|---|
| 37 | CPPFLAGS = @CPPFLAGS@
|
|---|
| 38 | @SET_MAKE@
|
|---|
| 39 |
|
|---|
| 40 | SHELL = @SHELL@
|
|---|
| 41 |
|
|---|
| 42 | #### End of system configuration section. ####
|
|---|
| 43 |
|
|---|
| 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)
|
|---|
| 47 |
|
|---|
| 48 | # This could probably be done more elegantly, but it's currently
|
|---|
| 49 | # just for running the u77-test test.
|
|---|
| 50 | G77DIR = ../../../gcc/
|
|---|
| 51 |
|
|---|
| 52 | .SUFFIXES:
|
|---|
| 53 | .SUFFIXES: .c .lo
|
|---|
| 54 |
|
|---|
| 55 | .c.lo:
|
|---|
| 56 | @LIBTOOL@ --mode=compile $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $<
|
|---|
| 57 |
|
|---|
| 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 | bes.lo dbes.lo \
|
|---|
| 65 | chdir_.lo chmod_.lo lnblnk_.lo hostnm_.lo rename_.lo fgetc_.lo fputc_.lo \
|
|---|
| 66 | umask_.lo sys_clock_.lo date_.lo second_.lo flush1_.lo mclock_.lo \
|
|---|
| 67 | alarm_.lo datetime_.lo
|
|---|
| 68 | SRCS = Version.c gerror_.c perror_.c ierrno_.c itime_.c time_.c \
|
|---|
| 69 | unlink_.c fnum_.c getpid_.c getuid_.c getgid_.c kill_.c rand_.c \
|
|---|
| 70 | srand_.c irand_.c sleep_.c idate_.c ctime_.c etime_.c \
|
|---|
| 71 | dtime_.c isatty_.c ltime_.c fstat_.c stat_.c \
|
|---|
| 72 | lstat_.c access_.c link_.c getlog_.c ttynam_.c getcwd_.c symlnk_.c \
|
|---|
| 73 | vxttime_.c vxtidate_.c gmtime_.c fdate_.c secnds_.c \
|
|---|
| 74 | bes.c dbes.c \
|
|---|
| 75 | chdir_.c chmod_.c lnblnk_.c hostnm_.c rename_.c fgetc_.c fputc_.c \
|
|---|
| 76 | umask_.c sys_clock_.c date_.c second_.c flush1_.c mclock_.c \
|
|---|
| 77 | alarm_.c datetime_.c
|
|---|
| 78 |
|
|---|
| 79 | all: ../s-libu77
|
|---|
| 80 |
|
|---|
| 81 | ../s-libu77: $(OBJS)
|
|---|
| 82 | -rm -f $@.T $@
|
|---|
| 83 | objs='$(OBJS)'; for name in $$objs; do \
|
|---|
| 84 | echo libU77/$${name} >> $@.T; done
|
|---|
| 85 | mv $@.T $@
|
|---|
| 86 |
|
|---|
| 87 | Makefile: Makefile.in config.status
|
|---|
| 88 | $(SHELL) config.status
|
|---|
| 89 |
|
|---|
| 90 | config.status: configure
|
|---|
| 91 | rm -f config.cache
|
|---|
| 92 | CONFIG_SITE=no-such-file CC='$(CC)' CFLAGS='$(CFLAGS)' \
|
|---|
| 93 | CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
|
|---|
| 94 |
|
|---|
| 95 | ${srcdir}/configure: configure.in
|
|---|
| 96 | cd ${srcdir} && autoconf
|
|---|
| 97 |
|
|---|
| 98 | ${srcdir}/config.hin: stamp-h.in
|
|---|
| 99 | ${srcdir}/stamp-h.in: configure.in acconfig.h
|
|---|
| 100 | cd ${srcdir} && autoheader
|
|---|
| 101 | echo timestamp > ${srcdir}/stamp-h.in
|
|---|
| 102 |
|
|---|
| 103 | config.h: stamp-h
|
|---|
| 104 | stamp-h: config.hin config.status
|
|---|
| 105 | $(SHELL) config.status
|
|---|
| 106 | echo timestamp > stamp-h
|
|---|
| 107 |
|
|---|
| 108 | VersionU.lo: Version.c
|
|---|
| 109 | @LIBTOOL@ --mode=compile $(CC) -c $(ALL_CFLAGS) $(srcdir)/Version.c -o $@
|
|---|
| 110 |
|
|---|
| 111 | $(OBJS): $(F2C_H_DIR)/f2c.h $(G2C_H_DIR)/g2c.h config.h
|
|---|
| 112 | access_.lo: access_.c
|
|---|
| 113 | ctime_.lo: ctime_.c
|
|---|
| 114 | dtime_.lo: dtime_.c
|
|---|
| 115 | etime_.lo: etime_.c
|
|---|
| 116 | fnum_.lo: fnum_.c $(F2C_H_DIR)/libI77/fio.h
|
|---|
| 117 | fstat_.lo: fstat_.c
|
|---|
| 118 | gerror_.lo: gerror_.c
|
|---|
| 119 | getcwd_.lo: getcwd_.c
|
|---|
| 120 | getgid_.lo: getgid_.c
|
|---|
| 121 | getlog_.lo: getlog_.c
|
|---|
| 122 | getpid_.lo: getpid_.c
|
|---|
| 123 | getuid_.lo: getuid_.c
|
|---|
| 124 | idate_.lo: idate_.c
|
|---|
| 125 | ierrno_.lo: ierrno_.c
|
|---|
| 126 | irand_.lo: irand_.c
|
|---|
| 127 | isatty_.lo: isatty_.c $(F2C_H_DIR)/libI77/fio.h
|
|---|
| 128 | itime_.lo: itime_.c
|
|---|
| 129 | kill_.lo: kill_.c
|
|---|
| 130 | link_.lo: link_.c
|
|---|
| 131 | loc_.lo: loc_.c
|
|---|
| 132 | lstat_.lo: lstat_.c
|
|---|
| 133 | ltime_.lo: ltime_.c
|
|---|
| 134 | perror_.lo: perror_.c
|
|---|
| 135 | qsort.lo: qsort.c
|
|---|
| 136 | qsort_.lo: qsort_.c
|
|---|
| 137 | rand_.lo: rand_.c
|
|---|
| 138 | rename_.lo: rename_.c
|
|---|
| 139 | second_.lo: second_.c
|
|---|
| 140 | sleep_.lo: sleep_.c
|
|---|
| 141 | srand_.lo: srand_.c
|
|---|
| 142 | stat_.lo: stat_.c
|
|---|
| 143 | symlnk_.lo: symlnk_.c
|
|---|
| 144 | time_.lo: time_.c
|
|---|
| 145 | ttynam_.lo: ttynam_.c
|
|---|
| 146 | unlink_.lo: unlink_.c
|
|---|
| 147 | wait_.lo: wait_.c
|
|---|
| 148 | vxttime_.lo: vxttime_.c
|
|---|
| 149 | vtxidate_.lo: vxtidate_.c
|
|---|
| 150 | fdate_.lo: fdate_.c
|
|---|
| 151 | gmtime_.lo: gmtime_.c
|
|---|
| 152 | secnds_.lo: secnds_.c
|
|---|
| 153 | bes.lo: bes.c
|
|---|
| 154 | dbes.lo: dbes.c
|
|---|
| 155 | lnblnk_.lo: lnblnk_.c
|
|---|
| 156 | chmod_.lo: chmod_.c
|
|---|
| 157 | chdir_.lo: chdir_.c
|
|---|
| 158 | hostnm_.lo: hostnm_.c
|
|---|
| 159 | rename_.lo: rename_.c
|
|---|
| 160 | fputc_.lo: fputc_.c
|
|---|
| 161 | fgetc_.lo: fgetc_.c
|
|---|
| 162 | sys_clock_.lo: sys_clock_.c
|
|---|
| 163 | date_.lo: date_.c
|
|---|
| 164 | umask_.lo: umask_.c
|
|---|
| 165 | flush1_.lo: flush1_.c
|
|---|
| 166 | mclock_.lo: mclock_.c
|
|---|
| 167 | alarm_.lo: alarm_.c
|
|---|
| 168 | datetime_.lo: datetime_.c
|
|---|
| 169 |
|
|---|
| 170 | check:
|
|---|
| 171 | -$(G77DIR)g77 -B$(G77DIR) -L.. -g $(srcdir)/u77-test.f \
|
|---|
| 172 | -lg2c $(LIBS) -lm -o a.out && ./a.out
|
|---|
| 173 | rm -f a.out
|
|---|
| 174 |
|
|---|
| 175 | install uninstall install-strip dist installcheck installdirs:
|
|---|
| 176 |
|
|---|
| 177 | mostlyclean:
|
|---|
| 178 | rm -f *.o *.lo a.out
|
|---|
| 179 | rm -rf .libs
|
|---|
| 180 |
|
|---|
| 181 | clean: mostlyclean
|
|---|
| 182 | rm -f config.log ../s-libu77
|
|---|
| 183 |
|
|---|
| 184 | distclean: clean
|
|---|
| 185 | rm -f config.cache config.status Makefile config.h stamp.h \
|
|---|
| 186 | ../s-libu77 configure
|
|---|
| 187 |
|
|---|
| 188 | maintainer-clean:
|
|---|
| 189 |
|
|---|
| 190 | .PHONY: mostlyclean clean distclean maintainer-clean all check uninstall \
|
|---|
| 191 | install-strip dist installcheck installdirs archive
|
|---|