source:
freewrt/package/libpcap/patches/100-shared-lib.patch@
428f140
| Last change on this file since 428f140 was 475ad56, checked in by , 20 years ago | |
|---|---|
|
|
| File size: 3.2 KB | |
-
libpcap-0.9.4
diff -urN libpcap-0.9.4.orig/Makefile.in libpcap-0.9.4/Makefile.in
old new 37 37 srcdir = @srcdir@ 38 38 VPATH = @srcdir@ 39 39 40 # some defines for shared library compilation 41 MAJ=0.9 42 MIN=4 43 VERSION=$(MAJ).$(MIN) 44 LIBNAME=pcap 45 LIBRARY=lib$(LIBNAME).a 46 SOLIBRARY=lib$(LIBNAME).so 47 SHAREDLIB=$(SOLIBRARY).$(VERSION) 48 40 49 # 41 50 # You shouldn't need to edit anything below. 42 51 # … … 50 59 51 60 # Standard CFLAGS 52 61 CFLAGS = $(CCOPT) $(INCLS) $(DEFS) 62 CFLAGS_SHARED = -shared -Wl,-soname,$(SOLIBRARY).$(MAJ) 53 63 54 64 INSTALL = @INSTALL@ 55 65 INSTALL_PROGRAM = @INSTALL_PROGRAM@ … … 70 80 .c.o: 71 81 @rm -f $@ 72 82 $(CC) $(CFLAGS) -c $(srcdir)/$*.c 83 $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c 73 84 85 %_pic.o: %.c 86 @rm -f $@ 87 $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c 88 74 89 PSRC = pcap-@V_PCAP@.c 75 90 FSRC = fad-@V_FINDALLDEVS@.c 76 91 SSRC = @SSRC@ … … 84 99 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot 85 100 # hack the extra indirection 86 101 OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS) 102 OBJ_PIC = $(PSRC:.c=_pic.o) $(FSRC:.c=_pic.o) $(CSRC:.c=_pic.o) $(SSRC:.c=_pic.o) $(GENSRC:.c=_pic.o) 87 103 HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \ 88 104 ethertype.h gencode.h gnuc.h 89 105 GENHDR = \ … … 95 111 TAGFILES = \ 96 112 $(SRC) $(HDR) $(TAGHDR) 97 113 98 CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c114 CLEANFILES = $(OBJ) $(OBJ_PIC) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so* 99 115 100 all: libpcap.a 116 all: libpcap.a $(SHAREDLIB) 101 117 102 118 libpcap.a: $(OBJ) 103 119 @rm -f $@ 104 120 ar rc $@ $(OBJ) $(LIBS) 105 121 $(RANLIB) $@ 106 122 123 $(SHAREDLIB): $(OBJ_PIC) 124 -@rm -f $@ 125 -@rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ) 126 $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc 127 ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ) 128 ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY) 129 130 107 131 shared: libpcap.$(DYEXT) 108 132 109 133 # … … 129 153 scanner.o: scanner.c tokdefs.h 130 154 $(CC) $(CFLAGS) -c scanner.c 131 155 156 scanner_pic.o: scanner.c tokdefs.h 157 $(CC) -fPIC $(CFLAGS) -o $@ -c scanner.c 158 159 132 160 pcap.o: version.h 133 161 134 162 tokdefs.h: grammar.c … … 142 170 @rm -f $@ 143 171 $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c 144 172 173 grammar_pic.o: grammar.c 174 @rm -f $@ 175 $(CC) -fPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c 176 145 177 version.o: version.c 146 178 $(CC) $(CFLAGS) -c version.c 147 179 180 version_pic.o: version.c 181 $(CC) -fPIC $(CFLAGS) -c version.c -o $@ 182 148 183 snprintf.o: $(srcdir)/missing/snprintf.c 149 184 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c 150 185 … … 170 205 bpf_filter.o: bpf_filter.c 171 206 $(CC) $(CFLAGS) -c bpf_filter.c 172 207 208 bpf_filter_pic.o: bpf_filter.c 209 $(CC) -fPIC $(CFLAGS) -c bpf_filter.c -o $@ 210 211 173 212 install: libpcap.a 174 213 [ -d $(DESTDIR)$(libdir) ] || \ 175 214 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) 176 215 $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a 216 $(INSTALL_DATA) $(SHAREDLIB) $(DESTDIR)$(libdir)/ 217 ln -sf $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SOLIBRARY).$(MAJ) 218 ln -sf $(SOLIBRARY).$(MAJ) $(DESTDIR)$(libdir)/$(SOLIBRARY) 177 219 $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a 178 220 [ -d $(DESTDIR)$(includedir) ] || \ 179 221 (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))
Note:
See TracBrowser
for help on using the repository browser.
