Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > b9638a4829e60c205a6b2f401ca23f74 > files > 1

f2c-20090411-6.fc14.src.rpm

--- libf2c/makefile.old	2009-12-03 18:18:51.000000000 -0800
+++ libf2c/makefile.u	2009-12-03 18:17:43.000000000 -0800
@@ -16,12 +16,14 @@
 CC = cc
 SHELL = /bin/sh
 CFLAGS = -O
+SHARED = libf2c.so.0.22
 
 # compile, then strip unnecessary symbols
 .c.o:
 	$(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
-	ld -r -x -o $*.xxx $*.o
-	mv $*.xxx $*.o
+%.o : %.c
+	$(CC) -c $(CFLAGS) $(CPPFLAGS) -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
@@ -69,11 +71,12 @@
 OFILES = $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
 	$(HALF) $(CMP) $(EFL) $(CHAR) $(I77) $(TIME)
 
-all: f2c.h signal1.h sysdep1.h libf2c.a
+all: f2c.h signal1.h sysdep1.h libf2c.a $(SHARED)
 
 libf2c.a: $(OFILES)
-	ar r libf2c.a $?
-	-ranlib libf2c.a
+	ar r $@ $?
+	-ranlib $@
+
 
 ## Shared-library variant: the following rule works on Linux
 ## systems.  Details are system-dependent.  Under Linux, -fPIC
@@ -85,8 +88,8 @@
 ## instead of "$(CC) -shared", and when running programs linked against libf2c.so,
 ## arrange for $DYLD_LIBRARY_PATH to include the directory containing libf2c.so.
 
-libf2c.so: $(OFILES)
-	$(CC) -shared -o libf2c.so $(OFILES)
+$(SHARED): $(OFILES)
+	$(CC) -shared -Wl,-soname,libf2c.so.0 -o $@ $(OFILES) -lm -lc
 
 ### If your system lacks ranlib, you don't need it; see README.
 
@@ -126,7 +129,7 @@
 	-ranlib $(LIBDIR)/libf2c.a
 
 clean:
-	rm -f libf2c.a *.o arith.h signal1.h sysdep1.h
+	rm -f libf2c.a *.o arith.h signal1.h sysdep1.h $(SHARED)
 
 backspac.o:	fio.h
 close.o:	fio.h