source: freewrt/package/cgilib/patches/100-shared_lib.patch@ d419478

freewrt_1_0 freewrt_2_0
Last change on this file since d419478 was 475ad56, checked in by Waldemar Brodkorb <wbx@…>, 20 years ago

add OpenWrt trunk revision 3830.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@1 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[475ad56]1diff -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
Note: See TracBrowser for help on using the repository browser.