Sync with FreeBSD cp.
[dragonfly.git] / gnu / lib / libg2c / Makefile
1 # $FreeBSD: src/gnu/lib/libg2c/Makefile,v 1.8.2.1 2002/07/22 14:21:44 ru Exp $
2 # $DragonFly: src/gnu/lib/libg2c/Attic/Makefile,v 1.2 2003/06/17 04:25:44 dillon Exp $
3
4 SRCDIR= ${.CURDIR}/../../../contrib/libf2c
5
6 .PATH: ${SRCDIR} ${SRCDIR}/libU77 ${SRCDIR}/libF77 ${SRCDIR}/libI77
7
8 LIB=            g2c
9 SHLIB_MAJOR=    1
10 SHLIB_MINOR=    0
11
12 # Traditional FORTRAN Library members defined in libF77
13
14 F77MISC=        F77_aloc.c main.c s_rnge.c abort_.c getarg_.c \
15                 iargc_.c getenv_.c signal_.c s_stop.c s_paus.c system_.c \
16                 cabs.c derf_.c derfc_.c erf_.c erfc_.c sig_die.c exit_.c \
17                 setarg.c setsig.c
18
19 F77POW=         pow_ci.c pow_dd.c pow_di.c pow_hh.c pow_ii.c pow_ri.c pow_zi.c \
20                 pow_zz.c
21
22 F77CX=          c_abs.c c_cos.c c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c
23 F77DCX=         ${F77CX:S/^c_/z_/g}
24
25 F77INT=         i_abs.c i_dim.c i_dnnt.c i_indx.c i_len.c i_mod.c i_nint.c \
26                 i_sign.c
27
28 F77HALF=        h_abs.c h_dim.c h_dnnt.c h_indx.c h_len.c h_mod.c h_nint.c \
29                 h_sign.c
30
31 F77REAL=        r_abs.c r_acos.c r_asin.c r_atan.c r_atn2.c r_cnjg.c r_cos.c \
32                 r_cosh.c r_dim.c r_exp.c r_imag.c r_int.c r_lg10.c r_log.c \
33                 r_mod.c r_nint.c r_sign.c r_sin.c r_sinh.c r_sqrt.c r_tan.c \
34                 r_tanh.c
35 F77DBL=         ${F77REAL:S/^r_/d_/g} d_prod.c
36
37 F77CMP=         l_ge.c l_gt.c l_le.c l_lt.c hl_ge.c hl_gt.c hl_le.c hl_lt.c
38
39 F77EFL=         ef1asc_.c ef1cmc_.c
40
41 F77CHAR=        s_cat.c s_cmp.c s_copy.c
42
43 F77F90BIT=      lbitbits.c lbitshft.c qbitbits.c qbitshft.c
44
45 F77SRCS=        ${F77MISC} ${F77POW} ${F77CX} ${F77DCX} ${F77INT} ${F77HALF} \
46                 ${F77REAL} ${F77DBL} ${F77CMP} ${F77EFL} ${F77CHAR} ${F77F90BIT}
47
48 # I/O Library members defined in libI77
49
50 I77SRCS=        backspace.c close.c dfe.c dolio.c due.c endfile.c \
51                 err.c fmt.c fmtlib.c iio.c ilnw.c inquire.c lread.c lwrite.c \
52                 open.c rdfmt.c rewind.c rsfe.c rsli.c rsne.c sfe.c sue.c \
53                 typesize.c uio.c util.c wref.c wrtfmt.c wsfe.c wsle.c wsne.c \
54                 xwsne.c ftell_.c
55
56 # UNIX Library members defined in libU77
57
58 U77SRCS=        gerror_.c perror_.c ierrno_.c itime_.c time_.c \
59                 unlink_.c fnum_.c getpid_.c getuid_.c getgid_.c kill_.c \
60                 rand_.c srand_.c irand_.c sleep_.c idate_.c ctime_.c \
61                 etime_.c dtime_.c isatty_.c ltime_.c fstat_.c stat_.c \
62                 lstat_.c access_.c link_.c getlog_.c ttynam_.c getcwd_.c \
63                 symlnk_.c vxttime_.c vxtidate_.c gmtime_.c fdate_.c \
64                 secnds_.c bes.c dbes.c chdir_.c chmod_.c lnblnk_.c \
65                 hostnm_.c rename_.c fgetc_.c fputc_.c umask_.c \
66                 sys_clock_.c date_.c second_.c flush1_.c mclock_.c \
67                 alarm_.c datetime_.c
68
69 # Library members refered to as libE77 by EGCS
70
71 E77OBJS=        abort.o access.o alarm.o besj0.o besj1.o besjn.o \
72                 besy0.o besy1.o besyn.o chdir.o chmod.o ctime.o date.o \
73                 dbesj0.o dbesj1.o dbesjn.o dbesy0.o dbesy1.o dbesyn.o derf.o \
74                 derfc.o dtime.o ef1asc.o ef1cmc.o erf.o erfc.o etime.o exit.o \
75                 fdate.o fget.o fgetc.o flush.o flush1.o fnum.o fput.o fputc.o \
76                 fseek.o fstat.o ftell.o gerror.o getarg.o getcwd.o getenv.o \
77                 getgid.o getlog.o getpid.o getuid.o gmtime.o hostnm.o iargc.o \
78                 idate.o ierrno.o irand.o isatty.o itime.o kill.o link.o \
79                 lnblnk.o lstat.o ltime.o mclock.o perror.o rand.o rename.o \
80                 secnds.o second.o signal.o sleep.o srand.o stat.o symlnk.o \
81                 system.o time.o ttynam.o umask.o unlink.o vxtidt.o vxttim.o
82
83 LIBF77SRCS=     ${F77SRCS} ${I77SRCS} ${U77SRCS} ${E77SRCS} MAIN.c
84
85 SRCS=           ${LIBF77SRCS}
86 OBJS=           ${E77OBJS}
87
88 CFLAGS+=        -DHAVE_CONFIG_H=1 -DSTDC_HEADERS=1 -DHAVE_TEMPNAM=1
89 CFLAGS+=        -DNO_EOF_CHAR_CHECK=1 -DRETSIGTYPE=void
90 CFLAGS+=        -DSkip_f2c_Undefs=1 -DIEEE_drem=1 -DAllow_TYQUAD -DPedantic
91 CFLAGS+=        -I${SRCDIR} -I${SRCDIR}/libF77 -I${SRCDIR}/libI77 -I${SRCDIR}/libU77
92 CFLAGS+=        -I${.CURDIR}
93
94 .for x in F I U
95 ${x}77SRCS+=    Version${x}.c
96 CLEANFILES+=    Version${x}.c
97 Version${x}.c: ${SRCDIR}/lib${x}77/Version.c
98         ln -sf ${.ALLSRC} ${.TARGET}
99 .endfor
100
101 ${E77OBJS}: f2cext.c
102         ${CC} ${CFLAGS} -c -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
103         @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
104         @mv ${.TARGET}.tmp ${.TARGET}
105
106 .if !defined(NOPIC)
107 ${E77OBJS:.o=.So}: f2cext.c
108         ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c -DL${.PREFIX} -o ${.TARGET} \
109             ${.ALLSRC:M*.c}
110         @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
111         @mv ${.TARGET}.tmp ${.TARGET}
112 .endif
113
114 .if !defined(NOPROFILE)
115 ${E77OBJS:.o=.po}: f2cext.c
116         ${CC} -p ${CFLAGS} -c -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
117         @${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
118         @mv ${.TARGET}.tmp ${.TARGET}
119 .endif
120
121 INCS=   g2c.h
122
123 .include <bsd.lib.mk>