aboutsummaryrefslogtreecommitdiffstats
path: root/archivers/libarc/files/patch-Makefile
blob: 50787c4184f188050dc1d65aac28925850622c21 (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
36
37
38
39
40
41
--- Makefile.orig   2000-06-13 04:21:19 UTC
+++ Makefile
@@ -14,23 +14,33 @@ OBJS = inflate.o url.o url_file.o url_in
        url_hqxdecode.o url_qsdecode.o url_news.o url_newsgroup.o url_cgiesc.o \
        arc_mime.o
 
+SOOBJS = $(OBJS:S/.o/.so/g)
+
 # readdir_win.o (for Windows)
 
 LIB=libarc.a
 
-
-all:: $(LIB)
+all:: $(LIB) $(SOLIB) arccat
 
 $(LIB): $(OBJS)
    $(AR) $@ $(OBJS)
    $(RANLIB) $@
 
-arccat: arccat.o $(LIB)
-   $(CC) -o $@ arccat.o $(LIB)
+$(SOLIB): $(SOOBJS)
+   $(CC) -shared -Wl,-soname -Wl,$@.$(SOVERSION) -o $@.$(SOVERSION) $(SOOBJS)
+   $(LN) $@.$(SOVERSION) $@
+
+arccat: arccat.o $(SOLIB)
+   $(CC) $(CFLAGS) -o $@ arccat.o -L. -larc
 
 clean::
-   $(RM) $(LIB) *.o arccat *~ libarc/*~
+   $(RM) $(LIB) $(SOLIB).$(SOVERSION) *.o *.so arccat *~ libarc/*~
 
+
+.SUFFIXES: .so .c
+
+.c.so:
+   $(CC) $(CFLAGS) -fPIC -fpic -DPIC -c $(.IMPSRC) -o $(.TARGET)
 install::
    test -d $(PREFIX)/lib || mkdir -p $(PREFIX)/lib
    $(INSTALL) -m 444 $(LIB) $(PREFIX)/lib
013-08-03 02:52:07 +0800'>2013-08-031-6/+3 * - Assign clsung's p5- ports to perl@swills2012-05-011-1/+1 * - remove MD5ohauer2011-07-031-1/+0 * - only 13% of the p5- ports embed @comment $FreeBSD$:pgollucci2010-09-241-1/+0 * - Update to 0.09pgollucci2009-06-06