add libvorbisidec package (thanks to David Collet)
[openwrt.git] / package / cgilib / patches / 100-shared_lib.patch
1 diff -ruN cgilib-0.5-orig/Makefile cgilib-0.5-1/Makefile
2 --- cgilib-0.5-orig/Makefile 1999-08-20 23:14:07.000000000 +0200
3 +++ cgilib-0.5-1/Makefile 2005-08-10 20:28:17.000000000 +0200
4 @@ -14,14 +14,26 @@
5 # along with this program; if not, write to the Free Software
6 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
7
8 -CFLAGS = -I. -Wall -O2 -g
9 +OFLAGS = -O2 -g
10 +CFLAGS = -I. -Wall $(OFLAGS)
11 LDFLAGS = -L.
12 LIBS = -lcgi
13
14 +SOVER_MAJ := 0
15 +SOVER_MIN := 0
16 +SOVER_REV := 0
17 +SONAME := libcgi.so.$(SOVER_MAJ)
18 +SOREAL := libcgi.so.$(SOVER_MAJ).$(SOVER_MIN).$(SOVER_REV)
19 +
20 OBJS = cgi.o cookies.o
21
22 libcgi.a: $(OBJS)
23 - ar rc $@ $^
24 + $(AR) rc $@ $^
25 +
26 +libcgi.so: $(OBJS)
27 + $(CC) -shared -o $(SOREAL) $(LDFLAGS) -Wl,-soname,$(SONAME) $^
28 + ln -sf $(SOREAL) $(SONAME)
29 + ln -sf $(SONAME) libcgi.so
30
31 cgitest: cgitest.o libcgi.a
32 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
33 @@ -29,7 +41,7 @@
34 jumpto: jumpto.o libcgi.a
35 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
36
37 -all: libcgi.a cgitest jumpto
38 +all: libcgi.a libcgi.so cgitest jumpto
39
40 install: cgitest
41 install -m 755 cgitest /usr/lib/cgi-bin
This page took 0.053593 seconds and 5 git commands to generate.