freebsd-ports/graphics/libwmf/files/patch-ac
Chris Piazza ad143f96cf - Remove dependency on gd - it uses it's own heavily customized version
- Optimize procedure of building shared libraries
- Avoid a few compiler warnings

Submitted by:	KATO Tsuguru <tkato@prontomail.ne.jp>
2000-05-30 19:47:17 +00:00

42 lines
862 B
Plaintext

--- libxfig/Makefile.in.orig Tue Jul 13 22:16:20 1999
+++ libxfig/Makefile.in Tue May 30 19:22:25 2000
@@ -28,21 +28,25 @@
SHELL = /bin/sh
-.SUFFIXES: .C .o
+.SUFFIXES: .c .o .so
MYOBJECTS = \
color.o \
objlist.o \
fileops.o
-all: libxfig.a
+all: libxfig.a libxfig.so.1
libxfig.a: $(MYOBJECTS)
$(AR) rc libxfig.a $(MYOBJECTS)
$(RANLIB) libxfig.a
-%.o: %.c
- $(CC) $(CFLAGS) -c $*.c
+libxfig.so.1: $(MYOBJECTS:.o=.so)
+ $(CC) -shared -Wl,-soname,$@ -o $@ $(MYOBJECTS:.o=.so) $(LIBS)
+ ln -sf libxfig.so.1 libxfig.so
+
+.c.so:
+ $(CC) $(CFLAGS) -fPIC -DPIC -o $@ -c $<
clean:
rm -rf *.o *.a core
@@ -52,6 +56,8 @@
install: all installdirs
$(INSTALL_DATA) libxfig.a @libdir@/libxfig.a
+ $(INSTALL_DATA) libxfig.so.1 @libdir@/libxfig.so.1
+ ln -sf libxfig.so.1 @libdir@/libxfig.so
installdirs:
$(MKINSTALLDIRS) @libdir@ \