]> git.pld-linux.org Git - packages/libpcap.git/blame - libpcap-shared.patch
- changed all BuildRoot definitons
[packages/libpcap.git] / libpcap-shared.patch
CommitLineData
9abcb44b 1diff -Nru libpcap-0.4/Makefile.in libpcap-0.4.new/Makefile.in
2--- libpcap-0.4/Makefile.in Sat Nov 27 03:36:49 1999
3+++ libpcap-0.4.new/Makefile.in Sat Nov 27 03:34:41 1999
4@@ -35,12 +35,20 @@
5
6 # VPATH
7 srcdir = @srcdir@
8-VPATH = @srcdir@
9+# VPATH = @srcdir@
10
11 #
12 # You shouldn't need to edit anything below.
13 #
14
15+MAJ=0
16+MIN=4
17+VERSION=$(MAJ).$(MIN)
18+LIBNAME=pcap
19+LIBRARY=lib$(LIBNAME).a
20+SOLIBRARY=lib$(LIBNAME).so
21+SHAREDLIB=lib$(LIBNAME).so.$(VERSION)
22+
23 CC = @CC@
24 CCOPT = @V_CCOPT@
25 INCLS = -I. @V_INCLS@
26@@ -48,6 +56,7 @@
27
28 # Standard CFLAGS
29 CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
30+CFLAGS_SHAREDLIB = -shared -Wl,-soname,$(SOLIBRARY).$(MAJ)
31
32 INSTALL = @INSTALL@
33 RANLIB = @V_RANLIB@
34@@ -65,7 +74,11 @@
35 # problem if you don't own the file but can write to the directory.
36 .c.o:
37 @rm -f $@
38- $(CC) $(CFLAGS) -c $(srcdir)/$*.c
39+ $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c
40+
41+%_pic.o: %.c
42+ @rm -f $@
43+ $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c
44
45 PSRC = pcap-@V_PCAP@.c
46 CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c \
47@@ -77,6 +90,7 @@
48 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
49 # hack the extra indirection
50 OBJ = $(PSRC:.c=.o) $(CSRC:.c=.o) $(GENSRC:.c=.o)
51+OBJ_PIC = $(PSRC:.c=_pic.o) $(CSRC:.c=_pic.o) $(GENSRC:.c=_pic.o)
52 HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \
53 ethertype.h gencode.h gnuc.h
54 GENHDR = \
55@@ -88,14 +102,21 @@
56 TAGFILES = \
57 $(SRC) $(HDR) $(TAGHDR)
58
59-CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
60+CLEANFILES = $(OBJ) $(OBJ_PIC) libpcap.* $(GENSRC) $(GENHDR) lex.yy.c
61
62-all: libpcap.a
63+all: $(LIBRARY) $(SHAREDLIB)
64
65-libpcap.a: $(OBJ)
66+$(LIBRARY): $(OBJ)
67 @rm -f $@
68 ar rc $@ $(OBJ)
69 $(RANLIB) $@
70+
71+$(SHAREDLIB): $(OBJ_PIC)
72+ -@rm -f $@
73+ -@rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ)
74+ $(CC) $(CFLAGS_SHAREDLIB) -o $(SHAREDLIB) $(OBJ_PIC) -lc
75+ ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ)
76+ ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY)
77
78 scanner.c: $(srcdir)/scanner.l
79 @rm -f $@
80@@ -111,16 +132,22 @@
81
82 grammar.o: grammar.c
83 @rm -f $@
84- $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c
85+ $(CC) $(CFLAGS) -Dyylval=pcap_lval -c -o $@ grammar.c
86+grammar_pic.o: grammar.c
87+ @rm -f $@
88+ $(CC) -fPIC $(CFLAGS) -Dyylval=pcap_lval -c -o $@ grammar.c
89+
90
91 version.o: version.c
92 version.c: $(srcdir)/VERSION
93 @rm -f $@
94 sed -e 's/.*/char pcap_version[] = "&";/' $(srcdir)/VERSION > $@
95
96-install: force
97+install: $(LIBRARY) $(SHAREDLIB)
98 $(INSTALL) -m 444 libpcap.a $(DESTDIR)$(LIBDEST)/libpcap.a
99 $(RANLIB) $(DESTDIR)$(LIBDEST)/libpcap.a
100+ $(INSTALL) -m 755 $(SHAREDLIB) $(DESTDIR)$(LIBDEST)
101+ ln -sf $(SHAREDLIB) $(DESTDIR)$(LIBDEST)/$(SOLIBRARY)
102
103 install-incl: force
104 $(INSTALL) -m 444 $(srcdir)/pcap.h \
This page took 0.066642 seconds and 4 git commands to generate.