1 Index: libpcap-0.9.4/Makefile.in
2 ===================================================================
3 --- libpcap-0.9.4.orig/Makefile.in 2007-06-04 13:22:03.547316008 +0200
4 +++ libpcap-0.9.4/Makefile.in 2007-06-04 13:22:03.614305824 +0200
9 +# some defines for shared library compilation
12 +VERSION=$(MAJ).$(MIN)
14 +LIBRARY=lib$(LIBNAME).a
15 +SOLIBRARY=lib$(LIBNAME).so
16 +SHAREDLIB=$(SOLIBRARY).$(VERSION)
19 # You shouldn't need to edit anything below.
24 CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
25 +CFLAGS_SHARED = -shared -Wl,-soname,$(SOLIBRARY).$(MAJ)
28 INSTALL_PROGRAM = @INSTALL_PROGRAM@
32 $(CC) $(CFLAGS) -c $(srcdir)/$*.c
33 + $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c
37 + $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c
39 PSRC = pcap-@V_PCAP@.c
40 FSRC = fad-@V_FINDALLDEVS@.c
43 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
44 # hack the extra indirection
45 OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS)
46 +OBJ_PIC = $(PSRC:.c=_pic.o) $(FSRC:.c=_pic.o) $(CSRC:.c=_pic.o) $(SSRC:.c=_pic.o) $(GENSRC:.c=_pic.o)
47 HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \
48 ethertype.h gencode.h gnuc.h
52 $(SRC) $(HDR) $(TAGHDR)
54 -CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
55 +CLEANFILES = $(OBJ) $(OBJ_PIC) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so*
58 +all: libpcap.a $(SHAREDLIB)
62 ar rc $@ $(OBJ) $(LIBS)
65 +$(SHAREDLIB): $(OBJ_PIC)
67 + -@rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ)
68 + $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc
69 + ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ)
70 + ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY)
73 shared: libpcap.$(DYEXT)
77 scanner.o: scanner.c tokdefs.h
78 $(CC) $(CFLAGS) -c scanner.c
80 +scanner_pic.o: scanner.c tokdefs.h
81 + $(CC) -fPIC $(CFLAGS) -o $@ -c scanner.c
89 $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c
91 +grammar_pic.o: grammar.c
93 + $(CC) -fPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c
96 $(CC) $(CFLAGS) -c version.c
98 +version_pic.o: version.c
99 + $(CC) -fPIC $(CFLAGS) -c version.c -o $@
101 snprintf.o: $(srcdir)/missing/snprintf.c
102 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
104 @@ -170,10 +205,17 @@
105 bpf_filter.o: bpf_filter.c
106 $(CC) $(CFLAGS) -c bpf_filter.c
108 +bpf_filter_pic.o: bpf_filter.c
109 + $(CC) -fPIC $(CFLAGS) -c bpf_filter.c -o $@
113 [ -d $(DESTDIR)$(libdir) ] || \
114 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
115 $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
116 + $(INSTALL_DATA) $(SHAREDLIB) $(DESTDIR)$(libdir)/
117 + ln -sf $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SOLIBRARY).$(MAJ)
118 + ln -sf $(SOLIBRARY).$(MAJ) $(DESTDIR)$(libdir)/$(SOLIBRARY)
119 $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
120 [ -d $(DESTDIR)$(includedir) ] || \
121 (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))