summaryrefslogtreecommitdiff
path: root/textproc/sp/files/patch-ad
blob: 92758bbdcd1ed15a48eac132de62b72a2d47bbc3 (plain) (blame)
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
--- Makefile.lib.orig	Sun Dec 21 05:07:22 1997
+++ Makefile.lib	Wed Jun  2 16:00:57 1999
@@ -1,16 +1,30 @@
-CLEANFILES=lib$(LIB).a $(OBJS) $(COBJS) core
+prefix=/usr/local
+exec_prefix=$(prefix)
+# Where to install the binaries
+bindir=$(exec_prefix)/bin
+libdir=$(exec_prefix)/lib
+#INSTALL=cp
+# You might want to change this to uncomment this on BSD systems
+INSTALL=install -c
+VERSION=1
+CLEANFILES=lib$(LIB).a lib$(LIB).so.$(VERSION) $(OBJS) $(COBJS) core
 ALL_CXXFLAGS=$(CXXFLAGS) -I$(srcdir) -I$(srcdir)/../include $(INCLUDE) \
   $(DEFINES) $(PIC_FLAG)
 ALL_CFLAGS=$(CFLAGS) $(DEBUG) $(OPTIMIZE) $(INCLUDE) $(DEFINES) $(PIC_FLAG)
 
-all: lib$(LIB).a
+all: lib$(LIB).a lib$(LIB).so.$(VERSION)
 pure: all
 
 lib$(LIB).a: $(OBJS) $(COBJS)
 	$(AR) r $@ $?
 	$(RANLIB) $@
 
+lib$(LIB).so.$(VERSION): $(SOBJS) $(SCOBJS)
+	$(CC) -shared -soname lib$(LIB).so.$(VERSION) -o lib$(LIB).so.$(VERSION) $(SOBJS) $(SCOBJS)
+
 install:
+	$(INSTALL) lib$(LIB).a $(libdir)
+	$(INSTALL) lib$(LIB).so.$(VERSION) $(libdir)
 install-man:
 depend: depend_src
 depend.temp: $(GENSRCS)