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

freewrt_1_0 freewrt_2_0
Last change on this file since 9df7618 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
  • Makefile

    diff -ruN cgilib-0.5-orig/Makefile cgilib-0.5-1/Makefile
    old new  
    1414#   along with this program; if not, write to the Free Software
    1515#   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
    1616
    17 CFLAGS = -I. -Wall -O2 -g
     17OFLAGS = -O2 -g
     18CFLAGS = -I. -Wall $(OFLAGS)
    1819LDFLAGS = -L.
    1920LIBS = -lcgi
    2021
     22SOVER_MAJ := 0
     23SOVER_MIN := 0
     24SOVER_REV := 0
     25SONAME := libcgi.so.$(SOVER_MAJ)
     26SOREAL := libcgi.so.$(SOVER_MAJ).$(SOVER_MIN).$(SOVER_REV)
     27
    2128OBJS = cgi.o cookies.o
    2229
    2330libcgi.a: $(OBJS)
    24         ar rc $@ $^
     31        $(AR) rc $@ $^
     32
     33libcgi.so: $(OBJS)
     34        $(CC) -shared -o $(SOREAL) $(LDFLAGS) -Wl,-soname,$(SONAME) $^
     35        ln -sf $(SOREAL) $(SONAME)
     36        ln -sf $(SONAME) libcgi.so
    2537
    2638cgitest: cgitest.o libcgi.a
    2739        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
     
    2941jumpto: jumpto.o libcgi.a
    3042        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
    3143
    32 all: libcgi.a cgitest jumpto
     44all: libcgi.a libcgi.so cgitest jumpto
    3345
    3446install: cgitest
    3547        install -m 755 cgitest /usr/lib/cgi-bin
Note: See TracBrowser for help on using the repository browser.