aboutsummaryrefslogtreecommitdiff
path: root/archivers/libarc/files/patch-Makefile
blob: 6601419ad2df1509b8fa2503943efd0b9e94eb39 (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
--- Makefile	Tue Jun 13 07:21:19 2000
+++ Makefile	Tue Jun 20 17:44:24 2000
@@ -14,20 +15,30 @@
        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)