blob: 54d3fac9d257c7485d80704a7e4437c1d673b2a1 (
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.16 2007/03/17 16:10:13 rillig 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 ${PREFIX}/bin
+ ${BSD_INSTALL_PROGRAM} ./src/f2c ${PREFIX}/bin
+ ${BSD_INSTALL_SCRIPT} ./f2c-f77 ${PREFIX}/bin
+ -@mkdir -p ${PREFIX}/lib
+ @cd libI77 && ${MAKE} install LIBDIR=${PREFIX}/lib
+ @cd libF77 && ${MAKE} install LIBDIR=${PREFIX}/lib
+ -@mkdir -p ${PREFIX}/include
+ ${BSD_INSTALL_DATA} ./f2c.h ${PREFIX}/include
+ -@mkdir -p ${PREFIX}/share/doc/f2c
+ ${BSD_INSTALL_DATA} ./f2c.ps ${PREFIX}/share/doc/f2c
+ ${BSD_INSTALL_DATA} ./changes ${PREFIX}/share/doc/f2c
+ ${BSD_INSTALL_MAN} ./f2c.1 ${PREFIX}/${PKGMANDIR}/man1
+ ${BSD_INSTALL_MAN} ./f2c.0 ${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
|