blob: 981c414822362ffe2f6f42ae7752da4e55376dd1 (
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
|
$NetBSD: patch-aa,v 1.17 2007/08/16 00:31:22 joerg Exp $
--- Makefile.orig Tue Sep 14 16:47:52 2004
+++ Makefile
@@ -0,0 +1,47 @@
+# Top level Makefile for f2c, libF77, and libI77
+
+all: f2c libF77/libF77.la libI77/libI77.la f2c-f77 man
+
+
+f2c:
+ @echo Making all in 'src'
+ cd src; ${MAKE} all
+ cp src/f2c f2c
+
+libF77/libF77.la:
+ @echo Making all in 'libF77'
+ cd libF77 && ${MAKE} all LIBDIR=${PREFIX}/lib
+
+libI77/libI77.la:
+ @echo Making all in 'libI77'
+ cd libI77 && ${MAKE} all LIBDIR=${PREFIX}/lib
+
+man: f2c.0
+
+f2c.0: f2c.1t
+ rm f2c.1
+ sed 's!/usr!${PREFIX}!g' f2c.1t | sed 's!lib/libc.a!usr/lib/libc.a!g' > f2c.1
+ nroff -man f2c.1 > f2c.0
+
+
+install::
+ -@mkdir -p ${DESTDIR}${PREFIX}/bin
+ ${BSD_INSTALL_PROGRAM} ./src/f2c ${DESTDIR}${PREFIX}/bin
+ ${BSD_INSTALL_SCRIPT} ./f2c-f77 ${DESTDIR}${PREFIX}/bin
+ -@mkdir -p ${DESTDIR}${PREFIX}/lib
+ @cd libI77 && ${MAKE} install LIBDIR=${DESTDIR}${PREFIX}/lib
+ @cd libF77 && ${MAKE} install LIBDIR=${DESTDIR}${PREFIX}/lib
+ -@mkdir -p ${DESTDIR}${PREFIX}/include
+ ${BSD_INSTALL_DATA} ./f2c.h ${DESTDIR}${PREFIX}/include
+ -@mkdir -p ${DESTDIR}${PREFIX}/share/doc/f2c
+ ${BSD_INSTALL_DATA} ./f2c.ps ${DESTDIR}${PREFIX}/share/doc/f2c
+ ${BSD_INSTALL_DATA} ./changes ${DESTDIR}${PREFIX}/share/doc/f2c
+ ${BSD_INSTALL_MAN} ./f2c.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+ ${BSD_INSTALL_MAN} ./f2c.0 ${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1
+
+f2c-f77: ${F2C_F77_IN} f2c hello.f
+ ./src/f2c -Aw8 -Nn802 -Nx400 hello.f
+ $(CC) $(CFLAGS) -c hello.c
+ main=`$(NM) hello.o | ${AWK} 'BEGIN{x=""} {gsub(/\|/,""); for(i=1; i<=NF; i=i+1){if($$i ~ /MAIN/){x="-u " $$i}}} END{print x}'` ; \
+ ${ECHO} "Adding $$main to f2c-f77 script" ; \
+ sed -e 's;@PREFIX@;${PREFIX};g' -e 's;@CC@;${CC};g' -e 's;@CPP@;${CPP};g' -e "s;@MAIN@;$$main;g" -e "s;@SHELL@;${SCRIPT_SHELL};g" ${F2C_F77_IN} > f2c-f77
|