1 --- libpcap-0.8.3-orig/Makefile.in 2003-12-15 02:42:23.000000000 +0100
2 +++ libpcap-0.8.3-7/Makefile.in 2005-03-08 03:38:22.000000000 +0100
7 +# some defines for shared library compilation
10 +VERSION=$(MAJ).$(MIN)
12 +LIBRARY=lib$(LIBNAME).a
13 +SOLIBRARY=lib$(LIBNAME).so
14 +SHAREDLIB=$(SOLIBRARY).$(VERSION)
17 # You shouldn't need to edit anything below.
22 CFLAGS = $(CCOPT) $(INCLS) $(DEFS)
23 +CFLAGS_SHARED = -shared -Wl,-soname,$(SOLIBRARY).$(MAJ)
26 INSTALL_PROGRAM = @INSTALL_PROGRAM@
28 # problem if you don't own the file but can write to the directory.
31 - $(CC) $(CFLAGS) -c $(srcdir)/$*.c
32 + $(CC) $(CFLAGS) -c -o $@ $(srcdir)/$*.c
36 + $(CC) -fPIC $(CFLAGS) -c -o $@ $(srcdir)/$*.c
38 PSRC = pcap-@V_PCAP@.c
39 FSRC = fad-@V_FINDALLDEVS@.c
41 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
42 # hack the extra indirection
43 OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS)
44 +OBJ_PIC = $(PSRC:.c=_pic.o) $(FSRC:.c=_pic.o) $(CSRC:.c=_pic.o) $(SSRC:.c=_pic.o) $(GENSRC:.c=_pic.o)
45 HDR = pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \
46 ethertype.h gencode.h gnuc.h
50 $(SRC) $(HDR) $(TAGHDR)
52 -CLEANFILES = $(OBJ) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c
53 +CLEANFILES = $(OBJ) $(OBJ_PIC) libpcap.a $(GENSRC) $(GENHDR) lex.yy.c libpcap.so*
56 +all: libpcap.a $(SHAREDLIB)
60 ar rc $@ $(OBJ) $(LIBS)
63 +$(SHAREDLIB): $(OBJ_PIC)
65 + -@rm -f $(SOLIBRARY) $(SOLIBRARY).$(MAJ)
66 + $(CC) $(CFLAGS_SHARED) -o $(SHAREDLIB) $(OBJ_PIC) -lc
67 + ln -s $(SHAREDLIB) $(SOLIBRARY).$(MAJ)
68 + ln -s $(SOLIBRARY).$(MAJ) $(SOLIBRARY)
70 scanner.c: $(srcdir)/scanner.l
72 $(LEX) -t $< > $$$$.$@; mv $$$$.$@ $@
74 scanner.o: scanner.c tokdefs.h
75 $(CC) $(CFLAGS) -c scanner.c
77 +scanner_pic.o: scanner.c tokdefs.h
78 + $(CC) -fPIC $(CFLAGS) -o $@ -c scanner.c
85 $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c
87 +grammar_pic.o: grammar.c
89 + $(CC) -fPIC $(CFLAGS) -Dyylval=pcap_lval -o $@ -c grammar.c
92 $(CC) $(CFLAGS) -c version.c
94 +version_pic.o: version.c
95 + $(CC) -fPIC $(CFLAGS) -c version.c -o $@
98 snprintf.o: $(srcdir)/missing/snprintf.c
99 $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
101 @@ -151,10 +184,16 @@
102 bpf_filter.o: bpf_filter.c
103 $(CC) $(CFLAGS) -c bpf_filter.c
105 +bpf_filter_pic.o: bpf_filter.c
106 + $(CC) -fPIC $(CFLAGS) -c bpf_filter.c -o $@
109 [ -d $(DESTDIR)$(libdir) ] || \
110 (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
111 $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
112 + $(INSTALL_DATA) $(SHAREDLIB) $(DESTDIR)$(libdir)/
113 + ln -sf $(SHAREDLIB) $(DESTDIR)$(libdir)/$(SOLIBRARY).$(MAJ)
114 + ln -sf $(SOLIBRARY).$(MAJ) $(DESTDIR)$(libdir)/$(SOLIBRARY)
115 $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
116 [ -d $(DESTDIR)$(includedir) ] || \
117 (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))