]> The Tcpdump Group git mirrors - libpcap/commitdiff
(install): install everything
authorassar <assar>
Sat, 29 Jul 2000 07:05:20 +0000 (07:05 +0000)
committerassar <assar>
Sat, 29 Jul 2000 07:05:20 +0000 (07:05 +0000)
(uninstall): add
(force): remove

Makefile.in

index ae77170850fbce2beb1667ca6df82280c35989b7..015857a906e89f217445721ebec223bc29e7caae 100644 (file)
@@ -17,7 +17,7 @@
 #  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 #  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 #
-# @(#) $Header: /tcpdump/master/libpcap/Makefile.in,v 1.79 2000-07-16 19:08:29 guy Exp $ (LBL)
+# @(#) $Header: /tcpdump/master/libpcap/Makefile.in,v 1.80 2000-07-29 07:05:20 assar Exp $ (LBL)
 
 #
 # Various configurable paths (remember to edit Makefile.in, not Makefile)
@@ -71,12 +71,13 @@ PSRC =      pcap-@[email protected]
 CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c \
        etherent.c savefile.c bpf_filter.c bpf_image.c bpf_dump.c
 GENSRC = scanner.c grammar.c version.c
+LIBOBJS = @LIBOBJS@
 
 SRC =  $(PSRC) $(CSRC) $(GENSRC)
 
 # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
 # hack the extra indirection
-OBJ =  $(PSRC:.c=.o) $(CSRC:.c=.o) $(GENSRC:.c=.o)
+OBJ =  $(PSRC:.c=.o) $(CSRC:.c=.o) $(GENSRC:.c=.o) # $(LIBOBJS)
 HDR =  pcap.h pcap-int.h pcap-namedb.h pcap-nit.h pcap-pf.h \
        ethertype.h gencode.h gnuc.h
 GENHDR = \
@@ -118,6 +119,9 @@ grammar.o: grammar.c
 version.o: version.c
        $(CC) $(CFLAGS) -c version.c
 
+snprintf.o: $(srcdir)/../tcpdump/missing/snprintf.c
+       $(CC) $(CFLAGS) -o $@ -c $(srcdir)/../tcpdump/missing/snprintf.c
+
 version.c: $(srcdir)/VERSION
        @rm -f $@
        sed -e 's/.*/char pcap_version[] = "&";/' $(srcdir)/VERSION > $@
@@ -129,22 +133,28 @@ bpf_filter.c: $(srcdir)/bpf/net/bpf_filter.c
 bpf_filter.o: bpf_filter.c
        $(CC) $(CFLAGS) -c bpf_filter.c
 
-install: force
+install:
+       [ -d $(DESTDIR)$(LIBDEST) ] || mkdir -p $(DESTDIR)$(LIBDEST)
        $(INSTALL) -m 444 -o bin -g bin libpcap.a $(DESTDIR)$(LIBDEST)/libpcap.a
        $(RANLIB) $(DESTDIR)$(LIBDEST)/libpcap.a
-
-install-incl: force
+       [ -d $(DESTDIR)$(LIBDEST) ] || mkdir -p $(DESTDIR)$(INCLDEST)
        $(INSTALL) -m 444 -o bin -g bin $(srcdir)/pcap.h \
            $(DESTDIR)$(INCLDEST)/pcap.h
        $(INSTALL) -m 444 -o bin -g bin $(srcdir)/pcap-namedb.h \
            $(DESTDIR)$(INCLDEST)/pcap-namedb.h
+       [ -d $(DESTDIR)$(LIBDEST) ] || mkdir -p $(DESTDIR)$(INCLDEST)/net
        $(INSTALL) -m 444 -o bin -g bin $(srcdir)/bpf/net/bpf.h \
            $(DESTDIR)$(INCLDEST)/net/bpf.h
-
-install-man: force
        $(INSTALL) -m 444 -o bin -g bin $(srcdir)/pcap.3 \
            $(DESTDIR)$(MANDEST)/man3/pcap.3
 
+uninstall:
+       rm -f $(DESTDIR)$(LIBDEST)/libpcap.a
+       rm -f $(DESTDIR)$(INCLDEST)/pcap.h
+       rm -f $(DESTDIR)$(INCLDEST)/pcap-namedb.h
+       rm -f $(DESTDIR)$(INCLDEST)/net/bpf.h
+       rm -f $(DESTDIR)$(MANDEST)/man3/pcap.3
+
 clean:
        rm -f $(CLEANFILES)
 
@@ -155,7 +165,7 @@ distclean:
 tags: $(TAGFILES)
        ctags -wtd $(TAGFILES)
 
-tar:   force
+tar:
        @cwd=`pwd` ; dir=`basename $$cwd` ; name=libpcap-`cat VERSION` ; \
            list="" ; tar="tar chf" ; \
            for i in `cat FILES` ; do list="$$list $$name/$$i" ; done; \
@@ -169,6 +179,5 @@ tar:        force
            "rm -f ../$$name" ; \
             rm -f ../$$name
 
-force: /tmp
 depend:        $(GENSRC) force
        ./mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)