summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libg2c/Makefile
blob: 44316aa2273828e1f5c37891a8f459ec1ca2b317 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#  $Id: Makefile,v 1.1 1999/04/18 09:48:40 obrien Exp $

EGCSDIR=	${.CURDIR}/../../../contrib/egcs

.PATH: ${EGCSDIR}/libf2c ${EGCSDIR}/libf2c/libU77 ${EGCSDIR}/libf2c/libF77 \
       ${EGCSDIR}/libf2c/libI77

LIB=		g2c
SHLIB_MAJOR=	1
SHLIB_MINOR=	0

# Traditional FORTRAN Library members defined in libF77

F77MISC=	F77_aloc.c main.c s_rnge.c abort_.c getarg_.c \
		iargc_.c getenv_.c signal_.c s_stop.c s_paus.c system_.c \
		cabs.c derf_.c derfc_.c erf_.c erfc_.c sig_die.c exit_.c \
		setarg.c setsig.c

F77POW=		pow_ci.c pow_dd.c pow_di.c pow_hh.c pow_ii.c pow_ri.c pow_zi.c \
		pow_zz.c

F77CX=		c_abs.c c_cos.c c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c
F77DCX=		${F77CX:S/^c_/z_/g}

F77REAL=	r_abs.c r_acos.c r_asin.c r_atan.c r_atn2.c r_cnjg.c r_cos.c \
		r_cosh.c r_dim.c r_exp.c r_imag.c r_int.c r_lg10.c r_log.c \
		r_mod.c r_nint.c r_sign.c r_sin.c r_sinh.c r_sqrt.c r_tan.c \
		r_tanh.c
F77DBL=		${F77REAL:S/^r_/d_/g} d_prod.c

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

F77EFL=		ef1asc_.c ef1cmc_.c

F77CHAR=	s_cat.c s_cmp.c s_copy.c

F77F90BIT=	lbitbits.c lbitshft.c qbitbits.c qbitshft.c

F77SRCS=	${F77MISC} ${F77POW} ${F77CX} ${F77DCX} ${F77REAL} ${F77DBL} \
		${F77CMP} ${F77EFL} ${F77CHAR} ${F77F90BIT}

# I/O Library members defined in libI77

I77SRCS=	backspace.c close.c dfe.c dolio.c due.c endfile.c \
		err.c fmt.c fmtlib.c iio.c ilnw.c inquire.c lread.c lwrite.c \
		open.c rdfmt.c rewind.c rsfe.c rsli.c rsne.c sfe.c sue.c \
		typesize.c uio.c util.c wref.c wrtfmt.c wsfe.c wsle.c wsne.c \
		xwsne.c ftell_.c

# UNIX Library members defined in libU77

U77SRCS=	gerror_.c perror_.c ierrno_.c itime_.c time_.c \
		unlink_.c fnum_.c getpid_.c getuid_.c getgid_.c kill_.c \
		rand_.c srand_.c irand_.c sleep_.c idate_.c ctime_.c \
		etime_.c dtime_.c isatty_.c ltime_.c fstat_.c stat_.c \
		lstat_.c access_.c link_.c getlog_.c ttynam_.c getcwd_.c \
		symlnk_.c vxttime_.c vxtidate_.c gmtime_.c fdate_.c \
		secnds_.c bes.c dbes.c chdir_.c chmod_.c lnblnk_.c \
		hostnm_.c rename_.c fgetc_.c fputc_.c umask_.c \
		sys_clock_.c date_.c second_.c flush1_.c mclock_.c \
		alarm_.c datetime_.c

# Library members refered to as libE77 by EGCS

E77OBJS=	abort.o access.o alarm.o besj0.o besj1.o besjn.o \
		besy0.o besy1.o besyn.o chdir.o chmod.o ctime.o date.o \
		dbesj0.o dbesj1.o dbesjn.o dbesy0.o dbesy1.o dbesyn.o derf.o \
		derfc.o dtime.o ef1asc.o ef1cmc.o erf.o erfc.o etime.o exit.o \
		fdate.o fget.o fgetc.o flush.o flush1.o fnum.o fput.o fputc.o \
		fseek.o fstat.o ftell.o gerror.o getarg.o getcwd.o getenv.o \
		getgid.o getlog.o getpid.o getuid.o gmtime.o hostnm.o iargc.o \
		idate.o ierrno.o irand.o isatty.o itime.o kill.o link.o \
		lnblnk.o lstat.o ltime.o mclock.o perror.o rand.o rename.o \
		secnds.o second.o signal.o sleep.o srand.o stat.o symlnk.o \
		system.o time.o ttynam.o umask.o unlink.o vxtidt.o vxttim.o

LIBF77SRCS=	${F77SRCS} ${I77SRCS} ${U77SRCS} ${E77SRCS} MAIN.c

SRCS=		${LIBF77SRCS}
OBJS=		${E77OBJS}

CFLAGS+=	-DHAVE_CONFIG_H=1 -DSTDC_HEADERS=1 -DHAVE_TEMPNAM=1
CFLAGS+=	-DNO_EOF_CHAR_CHECK=1 -DRETSIGTYPE=void
CFLAGS+=	-DSkip_f2c_Undefs=1 -DIEEE_drem=1 -DAllow_TYQUAD -DPedantic
CFLAGS+=	-I${EGCSDIR}/libf2c -I${EGCSDIR}/libf2c/libF77
CFLAGS+=	-I${EGCSDIR}/libf2c/libI77 -I${EGCSDIR}/libf2c/libU77
CFLAGS+=	-I${EGCSDIR}/gcc/f -I${EGCSDIR}/gcc -I${EGCSDIR}/gcc/config
CFLAGS+=	-I${.CURDIR}

.for x in F I U
${x}77SRCS+=	Version${x}.c
CLEANFILES+=	Version${x}.c
Version${x}.c: ${EGCSDIR}/libf2c/lib${x}77/Version.c
	ln -sf ${.ALLSRC} ${.TARGET}
.endfor

${E77OBJS}: f2cext.c
	${CC} ${CFLAGS} -c -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
	@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
	@mv ${.TARGET}.tmp ${.TARGET}

.if !defined(NOPIC)
${E77OBJS:.o=.So}: f2cext.c
	${CC} ${PICFLAG} -DPIC ${CFLAGS} -c -DL${.PREFIX} -o ${.TARGET} \
	    ${.ALLSRC:M*.c}
	@${LD} -o ${.TARGET}.tmp -x -r ${.TARGET}
	@mv ${.TARGET}.tmp ${.TARGET}
.endif

.if !defined(NOPROFILE)
${E77OBJS:.o=.po}: f2cext.c
	${CC} -p ${CFLAGS} -c -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
	@${LD} -o ${.TARGET}.tmp -X -r ${.TARGET}
	@mv ${.TARGET}.tmp ${.TARGET}
.endif

.include <bsd.lib.mk>
OpenPOWER on IntegriCloud