bsd.lib.mk. Should address PR26628 where this package can't build on solaris. In addition, this cleans up some PLIST hacks.
100 lines
3.6 KiB
Text
100 lines
3.6 KiB
Text
$NetBSD: patch-ae,v 1.9 2004/09/14 22:09:40 dmcmahill Exp $
|
|
|
|
--- libF77/makefile.orig Tue Sep 14 18:38:32 2004
|
|
+++ libF77/makefile
|
|
@@ -1,7 +1,4 @@
|
|
-.SUFFIXES: .c .o
|
|
-CC = cc
|
|
-SHELL = /bin/sh
|
|
-CFLAGS = -O
|
|
+.SUFFIXES: .c .lo
|
|
|
|
# If your system lacks onexit() and you are not using an
|
|
# ANSI C compiler, then you should add -DNO_ONEXIT to CFLAGS,
|
|
@@ -12,11 +9,10 @@ CFLAGS = -O
|
|
# "CFLAGS =" line to
|
|
# CFLAGS = -O -Donexit=on_exit
|
|
|
|
-# compile, then strip unnecessary symbols
|
|
-.c.o:
|
|
- $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
|
|
- ld -r -x -o $*.xxx $*.o
|
|
- mv $*.xxx $*.o
|
|
+# compile
|
|
+.c.lo:
|
|
+ ${LIBTOOL} --mode=compile $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
|
|
+
|
|
## Under Solaris (and other systems that do not understand ld -x),
|
|
## omit -x in the ld line above.
|
|
## If your system does not have the ld command, comment out
|
|
@@ -41,12 +37,12 @@ INT = i_abs.o i_dim.o i_dnnt.o i_indx.o
|
|
HALF = h_abs.o h_dim.o h_dnnt.o h_indx.o h_len.o h_mod.o h_nint.o h_sign.o
|
|
CMP = l_ge.o l_gt.o l_le.o l_lt.o hl_ge.o hl_gt.o hl_le.o hl_lt.o
|
|
EFL = ef1asc_.o ef1cmc_.o
|
|
-CHAR = F77_aloc.o s_cat.o s_cmp.o s_copy.o
|
|
+CHAR = s_cat.o s_cmp.o s_copy.o
|
|
F90BIT = lbitbits.o lbitshft.o
|
|
QINT = pow_qq.o qbitbits.o qbitshft.o
|
|
TIME = dtime_.o etime_.o
|
|
|
|
-all: signal1.h libF77.a
|
|
+all: signal1.h libF77.la
|
|
|
|
# You may need to adjust signal1.h suitably for your system...
|
|
signal1.h: signal1.h0
|
|
@@ -59,45 +55,26 @@ signal1.h: signal1.h0
|
|
# For INTEGER*8 support (which requires system-dependent adjustments to
|
|
# f2c.h), add $(QINT) to the libf2c.a dependency list below...
|
|
|
|
-libF77.a : $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
|
|
+OBJS = $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
|
|
$(HALF) $(CMP) $(EFL) $(CHAR) $(F90BIT) $(TIME)
|
|
- ar r libF77.a $?
|
|
- ranlib libF77.a || true
|
|
+
|
|
+LTOBJS = ${OBJS:.o=.lo}
|
|
+
|
|
+libF77.la : $(LTOBJS)
|
|
+ ${LIBTOOL} --mode=link ${CC} -o $@ ${LTOBJS} ${LDFLAGS} -rpath ${LIBDIR} -version-info ${F2CMAJOR}:${F2CMINOR}
|
|
|
|
### If your system lacks ranlib, you don't need it; see README.
|
|
|
|
-Version.o: Version.c
|
|
- $(CC) -c Version.c
|
|
+Version.lo: Version.c
|
|
+ ${LIBTOOL} --mode=compile $(CC) ${CFLAGS} -c Version.c
|
|
|
|
# To compile with C++, first "make f2c.h"
|
|
f2c.h: f2ch.add
|
|
cat /usr/include/f2c.h f2ch.add >f2c.h
|
|
|
|
-install: libF77.a
|
|
- mv libF77.a $(LIBDIR)/libF77.a
|
|
- ranlib $(LIBDIR)/libF77.a || true
|
|
+install: libF77.la
|
|
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} libF77.la ${LIBDIR}
|
|
|
|
clean:
|
|
rm -f libF77.a *.o
|
|
|
|
-check:
|
|
- xsum F77_aloc.c Notice README Version.c abort_.c c_abs.c c_cos.c \
|
|
- c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c cabs.c d_abs.c d_acos.c \
|
|
- d_asin.c d_atan.c d_atn2.c d_cnjg.c d_cos.c d_cosh.c d_dim.c \
|
|
- d_exp.c d_imag.c d_int.c d_lg10.c d_log.c d_mod.c d_nint.c \
|
|
- d_prod.c d_sign.c d_sin.c d_sinh.c d_sqrt.c d_tan.c d_tanh.c \
|
|
- derf_.c derfc_.c dtime_.c \
|
|
- ef1asc_.c ef1cmc_.c erf_.c erfc_.c etime_.c exit_.c f2ch.add \
|
|
- getarg_.c getenv_.c h_abs.c h_dim.c h_dnnt.c h_indx.c h_len.c \
|
|
- h_mod.c h_nint.c h_sign.c hl_ge.c hl_gt.c hl_le.c hl_lt.c \
|
|
- i_abs.c i_dim.c i_dnnt.c i_indx.c i_len.c i_mod.c i_nint.c \
|
|
- i_sign.c iargc_.c l_ge.c l_gt.c l_le.c l_lt.c lbitbits.c lbitshft.c \
|
|
- main.c makefile pow_ci.c pow_dd.c pow_di.c pow_hh.c pow_ii.c \
|
|
- pow_qq.c pow_ri.c pow_zi.c pow_zz.c qbitbits.c qbitshft.c \
|
|
- 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 s_cat.c s_cmp.c s_copy.c \
|
|
- s_paus.c s_rnge.c s_stop.c sig_die.c signal1.h0 signal_.c system_.c \
|
|
- z_abs.c z_cos.c z_div.c z_exp.c z_log.c z_sin.c z_sqrt.c >zap
|
|
- cmp zap libF77.xsum && rm zap || diff libF77.xsum zap
|