summaryrefslogtreecommitdiff
blob: d3de94b38380a99386e44014ab58d3d2203dff78 (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
--- a/makefile.u
+++ b/makefile.u
@@ -12,16 +12,12 @@
 #	-fPIC
 # to the CFLAGS = line below.
 
-.SUFFIXES: .c .o
-CC = cc
 SHELL = /bin/sh
-CFLAGS = -O
 
 # compile, then strip unnecessary symbols
 .c.o:
-	$(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
-	ld -r -x -o $*.xxx $*.o
-	mv $*.xxx $*.o
+	$(CC) -c $(CPPFLAGS) $(CFLAGS) -DSkip_f2c_Undefs $< -o $@
+
 ## 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
@@ -74,8 +70,8 @@
 $(OFILES): f2c.h signal1.h sysdep1.h
 
 libf2c.a: $(OFILES)
-	ar r libf2c.a $?
-	-ranlib libf2c.a
+	$(AR) r libf2c.a $?
+	$(RANLIB) libf2c.a
 
 ## Shared-library variant: the following rule works on Linux
 ## systems.  Details are system-dependent.  Under Linux, -fPIC
@@ -92,12 +88,6 @@
 
 ### If your system lacks ranlib, you don't need it; see README.
 
-f77vers.o: f77vers.c
-	$(CC) -c f77vers.c
-
-i77vers.o: i77vers.c
-	$(CC) -c i77vers.c
-
 # To get an "f2c.h" for use with "f2c -C++", first "make hadd"
 hadd: f2c.h0 f2ch.add
 	cat f2c.h0 f2ch.add >f2c.h
@@ -125,7 +115,7 @@
 
 install: libf2c.a
 	cp libf2c.a $(LIBDIR)
-	-ranlib $(LIBDIR)/libf2c.a
+	$(RANLIB) $(LIBDIR)/libf2c.a
 
 clean:
 	rm -f libf2c.a *.o arith.h signal1.h sysdep1.h
@@ -185,8 +175,8 @@
 xwsne.o:	fmt.h
 
 arith.h: arithchk.c
-	$(CC) $(CFLAGS) -DNO_FPINIT arithchk.c -lm ||\
-	 $(CC) -DNO_LONG_LONG $(CFLAGS) -DNO_FPINIT arithchk.c -lm
+	$(CC) $(CPPFLAGS) $(CFLAGS) -DNO_FPINIT arithchk.c -lm ||\
+	 $(CC) -DNO_LONG_LONG $(CPPFLAGS) $(CFLAGS) -DNO_FPINIT arithchk.c -lm
 	./a.out >arith.h
 	rm -f a.out arithchk.o