blob: baab44a6bd5aafeacf15fef26d6183e021efe61b (
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
|
--- makefile.u.orig 2004-06-30 23:30:44.980603208 +0200
+++ makefile.u 2004-06-30 23:33:28.220786928 +0200
@@ -17,6 +17,7 @@
# compile, then strip unnecessary symbols
.c.o:
$(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
+ $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) -fPIC $*.c -o shared/$*.o
ld -r -x -o $*.xxx $*.o
mv $*.xxx $*.o
## Under Solaris (and other systems that do not understand ld -x),
@@ -63,7 +64,14 @@
# For INTEGER*8 support (which requires system-dependent adjustments to
# f2c.h), add $(QINT) to the libf2c.a dependency list below...
-all: f2c.h signal1.h sysdep1.h libf2c.a
+dirs:
+ mkdir -p shared
+
+libf2c.so: $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
+ $(HALF) $(CMP) $(EFL) $(CHAR) $(I77) $(TIME)
+ gcc -shared -o libf2c.so shared/*.o
+
+all: dirs f2c.h signal1.h sysdep1.h libf2c.a libf2c.so
libf2c.a: $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
$(HALF) $(CMP) $(EFL) $(CHAR) $(I77) $(TIME)
@@ -74,9 +82,11 @@
f77vers.o: f77vers.c
$(CC) -c f77vers.c
+ $(CC) -fPIC -c f77vers.c -o shared/f77vers.o
i77vers.o: i77vers.c
$(CC) -c i77vers.c
+ $(CC) -fPIC -c i77vers.c -o shared/i77vers.o
# To get an "f2c.h" for use with "f2c -C++", first "make hadd"
hadd: f2c.h0 f2ch.add
@@ -108,7 +118,7 @@
-ranlib $(LIBDIR)/libf2c.a
clean:
- rm -f libf2c.a *.o arith.h signal1.h sysdep1.h
+ rm -f libf2c.a *.o shared/*.o arith.h signal1.h sysdep1.h
backspac.o: fio.h
close.o: fio.h
|