1335640Shselasky# Copyright (c) 1993, 1994, 1995, 1996 2335640Shselasky# The Regents of the University of California. All rights reserved. 3335640Shselasky# 4335640Shselasky# Redistribution and use in source and binary forms, with or without 5335640Shselasky# modification, are permitted provided that: (1) source code distributions 6335640Shselasky# retain the above copyright notice and this paragraph in its entirety, (2) 7335640Shselasky# distributions including binary code include the above copyright notice and 8335640Shselasky# this paragraph in its entirety in the documentation or other materials 9335640Shselasky# provided with the distribution, and (3) all advertising materials mentioning 10335640Shselasky# features or use of this software display the following acknowledgement: 11335640Shselasky# ``This product includes software developed by the University of California, 12335640Shselasky# Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 13335640Shselasky# the University nor the names of its contributors may be used to endorse 14335640Shselasky# or promote products derived from this software without specific prior 15335640Shselasky# written permission. 16335640Shselasky# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 17335640Shselasky# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 18335640Shselasky# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19335640Shselasky 20335640Shselasky# 21335640Shselasky# Various configurable paths (remember to edit Makefile.in, not Makefile) 22335640Shselasky# 23335640Shselasky 24335640Shselasky# Top level hierarchy 25335640Shselaskyprefix = @prefix@ 26335640Shselaskyexec_prefix = @exec_prefix@ 27335640Shselaskydatarootdir = @datarootdir@ 28335640Shselasky# Pathname of directory to install the configure program 29335640Shselaskybindir = @bindir@ 30335640Shselasky# Pathname of directory to install the rpcapd daemon 31335640Shselaskysbindir = @sbindir@ 32335640Shselasky# Pathname of directory to install the include files 33335640Shselaskyincludedir = @includedir@ 34335640Shselasky# Pathname of directory to install the library 35335640Shselaskylibdir = @libdir@ 36335640Shselasky# Pathname of directory to install the man pages 37335640Shselaskymandir = @mandir@ 38335640Shselasky 39335640Shselasky# VPATH 40335640Shselaskysrcdir = @srcdir@ 41335640ShselaskyVPATH = @srcdir@ 42335640Shselasky 43335640Shselasky# 44335640Shselasky# You shouldn't need to edit anything below. 45335640Shselasky# 46335640Shselasky 47335640ShselaskyLD = /usr/bin/ld 48335640ShselaskyCC = @CC@ 49335640ShselaskyAR = @AR@ 50335640ShselaskyLN_S = @LN_S@ 51335640ShselaskyMKDEP = @MKDEP@ 52335640ShselaskyCCOPT = @V_CCOPT@ 53335640ShselaskySHLIB_CCOPT = @V_SHLIB_CCOPT@ 54335640ShselaskyINCLS = -I. @V_INCLS@ 55335640ShselaskyDEFS = -DBUILDING_PCAP -Dpcap_EXPORTS @DEFS@ @V_DEFS@ 56335640ShselaskyADDLOBJS = @ADDLOBJS@ 57335640ShselaskyADDLARCHIVEOBJS = @ADDLARCHIVEOBJS@ 58335640ShselaskyLIBS = @LIBS@ 59335640ShselaskyCROSSFLAGS= 60335640ShselaskyCFLAGS = @CFLAGS@ ${CROSSFLAGS} 61335640ShselaskyLDFLAGS = @LDFLAGS@ ${CROSSFLAGS} 62335640ShselaskyDYEXT = @DYEXT@ 63335640ShselaskyV_RPATH_OPT = @V_RPATH_OPT@ 64335640ShselaskyDEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@ 65335640ShselaskyPROG=libpcap 66335640ShselaskyPTHREAD_LIBS=@PTHREAD_LIBS@ 67335640ShselaskyBUILD_RPCAPD=@BUILD_RPCAPD@ 68335640ShselaskyINSTALL_RPCAPD=@INSTALL_RPCAPD@ 69335640ShselaskyEXTRA_NETWORK_LIBS=@EXTRA_NETWORK_LIBS@ 70335640Shselasky 71335640Shselasky# Standard CFLAGS for building members of a shared library 72356341ScyFULL_CFLAGS = $(CCOPT) @V_LIB_CCOPT_FAT@ $(SHLIB_CCOPT) $(INCLS) $(DEFS) $(CFLAGS) 73335640Shselasky 74335640ShselaskyINSTALL = @INSTALL@ 75335640ShselaskyINSTALL_PROGRAM = @INSTALL_PROGRAM@ 76335640ShselaskyINSTALL_DATA = @INSTALL_DATA@ 77335640ShselaskyRANLIB = @RANLIB@ 78335640Shselasky 79335640ShselaskyLEX = @LEX@ 80335640ShselaskyYACC = @YACC@ 81335640Shselasky 82335640Shselasky# Explicitly define compilation rule since SunOS 4's make doesn't like gcc. 83335640Shselasky# Also, gcc does not remove the .o before forking 'as', which can be a 84335640Shselasky# problem if you don't own the file but can write to the directory. 85335640Shselasky.c.o: 86335640Shselasky @rm -f $@ 87335640Shselasky $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c 88335640Shselasky 89335640ShselaskyPSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @BT_MONITOR_SRC@ @NETFILTER_SRC@ @DBUS_SRC@ @NETMAP_SRC@ @RDMA_SRC@ 90335640ShselaskyFSRC = @V_FINDALLDEVS@ 91335640ShselaskySSRC = @SSRC@ 92335640ShselaskyCSRC = pcap.c gencode.c optimize.c nametoaddr.c etherent.c \ 93335640Shselasky fmtutils.c \ 94335640Shselasky savefile.c sf-pcap.c sf-pcapng.c pcap-common.c \ 95335640Shselasky bpf_image.c bpf_filter.c bpf_dump.c 96335640ShselaskyGENSRC = scanner.c grammar.c 97335640ShselaskyLIBOBJS = @LIBOBJS@ 98335640Shselasky 99335640ShselaskySRC = $(PSRC) $(FSRC) $(CSRC) $(SSRC) $(GENSRC) 100335640Shselasky 101335640Shselasky# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot 102335640Shselasky# hack the extra indirection 103335640ShselaskyOBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS) 104335640ShselaskyPUBHDR = \ 105335640Shselasky pcap.h \ 106335640Shselasky pcap-bpf.h \ 107335640Shselasky pcap-namedb.h \ 108335640Shselasky pcap/bpf.h \ 109335640Shselasky pcap/bluetooth.h \ 110335640Shselasky pcap/can_socketcan.h \ 111335640Shselasky pcap/compiler-tests.h \ 112335640Shselasky pcap/dlt.h \ 113335640Shselasky pcap/funcattrs.h \ 114335640Shselasky pcap/pcap-inttypes.h \ 115335640Shselasky pcap/ipnet.h \ 116335640Shselasky pcap/namedb.h \ 117335640Shselasky pcap/nflog.h \ 118335640Shselasky pcap/pcap.h \ 119335640Shselasky pcap/sll.h \ 120356341Scy pcap/socket.h \ 121335640Shselasky pcap/vlan.h \ 122335640Shselasky pcap/usb.h 123335640Shselasky 124335640ShselaskyHDR = $(PUBHDR) \ 125335640Shselasky arcnet.h \ 126335640Shselasky atmuni31.h \ 127335640Shselasky diag-control.h \ 128335640Shselasky ethertype.h \ 129335640Shselasky extract.h \ 130335640Shselasky fmtutils.h \ 131335640Shselasky ftmacros.h \ 132335640Shselasky gencode.h \ 133335640Shselasky ieee80211.h \ 134335640Shselasky llc.h \ 135335640Shselasky nametoaddr.h \ 136335640Shselasky nlpid.h \ 137335640Shselasky optimize.h \ 138335640Shselasky pcap-common.h \ 139335640Shselasky pcap-int.h \ 140335640Shselasky pcap-rpcap.h \ 141335640Shselasky pcap-types.h \ 142335640Shselasky portability.h \ 143335640Shselasky ppp.h \ 144335640Shselasky rpcap-protocol.h \ 145335640Shselasky sf-pcap.h \ 146335640Shselasky sf-pcapng.h \ 147335640Shselasky sunatmpos.h \ 148335640Shselasky varattrs.h 149335640Shselasky 150335640ShselaskyGENHDR = \ 151335640Shselasky scanner.h grammar.h 152335640Shselasky 153335640ShselaskyTAGFILES = \ 154335640Shselasky $(SRC) $(HDR) 155335640Shselasky 156335640ShselaskyCLEANFILES = $(OBJ) libpcap.a libpcap.so.`cat $(srcdir)/VERSION` \ 157335640Shselasky $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \ 158335640Shselasky lex.yy.c pcap-config libpcap.pc 159335640Shselasky 160335640ShselaskyMAN1 = pcap-config.1 161335640Shselasky 162335640ShselaskyMAN3PCAP_EXPAND = \ 163335640Shselasky pcap.3pcap.in \ 164335640Shselasky pcap_compile.3pcap.in \ 165335640Shselasky pcap_datalink.3pcap.in \ 166335640Shselasky pcap_dump_open.3pcap.in \ 167335640Shselasky pcap_get_tstamp_precision.3pcap.in \ 168335640Shselasky pcap_list_datalinks.3pcap.in \ 169335640Shselasky pcap_list_tstamp_types.3pcap.in \ 170335640Shselasky pcap_open_dead.3pcap.in \ 171335640Shselasky pcap_open_offline.3pcap.in \ 172356341Scy pcap_set_immediate_mode.3pcap.in \ 173335640Shselasky pcap_set_tstamp_precision.3pcap.in \ 174335640Shselasky pcap_set_tstamp_type.3pcap.in 175335640Shselasky 176335640ShselaskyMAN3PCAP_NOEXPAND = \ 177335640Shselasky pcap_activate.3pcap \ 178335640Shselasky pcap_breakloop.3pcap \ 179335640Shselasky pcap_can_set_rfmon.3pcap \ 180335640Shselasky pcap_close.3pcap \ 181335640Shselasky pcap_create.3pcap \ 182335640Shselasky pcap_datalink_name_to_val.3pcap \ 183335640Shselasky pcap_datalink_val_to_name.3pcap \ 184335640Shselasky pcap_dump.3pcap \ 185335640Shselasky pcap_dump_close.3pcap \ 186335640Shselasky pcap_dump_file.3pcap \ 187335640Shselasky pcap_dump_flush.3pcap \ 188335640Shselasky pcap_dump_ftell.3pcap \ 189335640Shselasky pcap_file.3pcap \ 190335640Shselasky pcap_fileno.3pcap \ 191335640Shselasky pcap_findalldevs.3pcap \ 192335640Shselasky pcap_freecode.3pcap \ 193335640Shselasky pcap_get_required_select_timeout.3pcap \ 194335640Shselasky pcap_get_selectable_fd.3pcap \ 195335640Shselasky pcap_geterr.3pcap \ 196335640Shselasky pcap_inject.3pcap \ 197335640Shselasky pcap_is_swapped.3pcap \ 198335640Shselasky pcap_lib_version.3pcap \ 199335640Shselasky pcap_lookupdev.3pcap \ 200335640Shselasky pcap_lookupnet.3pcap \ 201335640Shselasky pcap_loop.3pcap \ 202335640Shselasky pcap_major_version.3pcap \ 203335640Shselasky pcap_next_ex.3pcap \ 204335640Shselasky pcap_offline_filter.3pcap \ 205335640Shselasky pcap_open_live.3pcap \ 206335640Shselasky pcap_set_buffer_size.3pcap \ 207335640Shselasky pcap_set_datalink.3pcap \ 208335640Shselasky pcap_set_promisc.3pcap \ 209356341Scy pcap_set_protocol_linux.3pcap \ 210335640Shselasky pcap_set_rfmon.3pcap \ 211335640Shselasky pcap_set_snaplen.3pcap \ 212335640Shselasky pcap_set_timeout.3pcap \ 213335640Shselasky pcap_setdirection.3pcap \ 214335640Shselasky pcap_setfilter.3pcap \ 215335640Shselasky pcap_setnonblock.3pcap \ 216335640Shselasky pcap_snapshot.3pcap \ 217335640Shselasky pcap_stats.3pcap \ 218335640Shselasky pcap_statustostr.3pcap \ 219335640Shselasky pcap_strerror.3pcap \ 220335640Shselasky pcap_tstamp_type_name_to_val.3pcap \ 221335640Shselasky pcap_tstamp_type_val_to_name.3pcap 222335640Shselasky 223335640ShselaskyMAN3PCAP = $(MAN3PCAP_NOEXPAND) $(MAN3PCAP_EXPAND:.in=) 224335640Shselasky 225335640ShselaskyMANFILE = \ 226335640Shselasky pcap-savefile.manfile.in 227335640Shselasky 228335640ShselaskyMANMISC = \ 229335640Shselasky pcap-filter.manmisc.in \ 230335640Shselasky pcap-linktype.manmisc.in \ 231335640Shselasky pcap-tstamp.manmisc.in 232335640Shselasky 233335640ShselaskyEXTRA_DIST = \ 234335640Shselasky CHANGES \ 235335640Shselasky ChmodBPF/ChmodBPF \ 236335640Shselasky ChmodBPF/StartupParameters.plist \ 237335640Shselasky CREDITS \ 238335640Shselasky CMakeLists.txt \ 239356341Scy INSTALL.md \ 240335640Shselasky LICENSE \ 241335640Shselasky Makefile.in \ 242335640Shselasky Makefile-devel-adds \ 243356341Scy README.md \ 244356341Scy doc \ 245356341Scy CONTRIBUTING.md \ 246335640Shselasky TODO \ 247335640Shselasky VERSION \ 248335640Shselasky aclocal.m4 \ 249335640Shselasky chmod_bpf \ 250335640Shselasky cmake_uninstall.cmake.in \ 251335640Shselasky cmakeconfig.h.in \ 252335640Shselasky cmake/Modules/FindDAG.cmake \ 253335640Shselasky cmake/Modules/FindFseeko.cmake \ 254335640Shselasky cmake/Modules/FindLFS.cmake \ 255335640Shselasky cmake/Modules/FindPacket.cmake \ 256335640Shselasky cmake/Modules/FindSNF.cmake \ 257335640Shselasky cmake/Modules/FindTC.cmake \ 258335640Shselasky cmake/have_siocglifconf.c \ 259335640Shselasky config.guess \ 260335640Shselasky config.h.in \ 261335640Shselasky config.sub \ 262335640Shselasky configure \ 263335640Shselasky configure.ac \ 264335640Shselasky dlpisubs.c \ 265335640Shselasky dlpisubs.h \ 266335640Shselasky fad-getad.c \ 267335640Shselasky fad-gifc.c \ 268335640Shselasky fad-glifc.c \ 269335640Shselasky grammar.y \ 270335640Shselasky install-sh \ 271335640Shselasky lbl/os-aix4.h \ 272335640Shselasky lbl/os-aix7.h \ 273335640Shselasky lbl/os-hpux11.h \ 274335640Shselasky lbl/os-osf4.h \ 275335640Shselasky lbl/os-osf5.h \ 276335640Shselasky lbl/os-solaris2.h \ 277335640Shselasky lbl/os-sunos4.h \ 278335640Shselasky lbl/os-ultrix4.h \ 279335640Shselasky libpcap.pc.in \ 280356341Scy missing/asprintf.c \ 281335640Shselasky missing/getopt.c \ 282335640Shselasky missing/getopt.h \ 283335640Shselasky missing/snprintf.c \ 284356341Scy missing/strlcat.c \ 285356341Scy missing/strlcpy.c \ 286335640Shselasky missing/strtok_r.c \ 287356341Scy missing/win_asprintf.c \ 288335640Shselasky missing/win_snprintf.c \ 289335640Shselasky mkdep \ 290335640Shselasky msdos/bin2c.c \ 291335640Shselasky msdos/makefile \ 292335640Shselasky msdos/makefile.dj \ 293335640Shselasky msdos/makefile.wc \ 294335640Shselasky msdos/pkt_rx0.asm \ 295335640Shselasky msdos/pkt_rx1.s \ 296335640Shselasky msdos/pktdrvr.c \ 297335640Shselasky msdos/pktdrvr.h \ 298335640Shselasky msdos/readme.dos \ 299335640Shselasky nomkdep \ 300335640Shselasky org.tcpdump.chmod_bpf.plist \ 301335640Shselasky pcap-bpf.c \ 302335640Shselasky pcap-bt-linux.c \ 303335640Shselasky pcap-bt-linux.h \ 304335640Shselasky pcap-bt-monitor-linux.c \ 305335640Shselasky pcap-bt-monitor-linux.h \ 306335640Shselasky pcap-config.in \ 307335640Shselasky pcap-dag.c \ 308335640Shselasky pcap-dag.h \ 309335640Shselasky pcap-dbus.c \ 310335640Shselasky pcap-dbus.h \ 311335640Shselasky pcap-dll.rc \ 312335640Shselasky pcap-dlpi.c \ 313335640Shselasky pcap-dos.c \ 314335640Shselasky pcap-dos.h \ 315335640Shselasky pcap-enet.c \ 316335640Shselasky pcap-int.h \ 317335640Shselasky pcap-libdlpi.c \ 318335640Shselasky pcap-linux.c \ 319335640Shselasky pcap-namedb.h \ 320335640Shselasky pcap-new.c \ 321335640Shselasky pcap-netfilter-linux.c \ 322335640Shselasky pcap-netfilter-linux.h \ 323335640Shselasky pcap-netmap.c \ 324335640Shselasky pcap-netmap.h \ 325335640Shselasky pcap-nit.c \ 326335640Shselasky pcap-npf.c \ 327335640Shselasky pcap-null.c \ 328335640Shselasky pcap-pf.c \ 329335640Shselasky pcap-rdmasniff.c \ 330335640Shselasky pcap-rdmasniff.h \ 331335640Shselasky pcap-rpcap.c \ 332335640Shselasky pcap-rpcap-int.h \ 333335640Shselasky pcap-septel.c \ 334335640Shselasky pcap-septel.h \ 335335640Shselasky pcap-sita.h \ 336335640Shselasky pcap-sita.c \ 337335640Shselasky pcap-sita.html \ 338335640Shselasky pcap-snf.c \ 339335640Shselasky pcap-snf.h \ 340335640Shselasky pcap-snit.c \ 341335640Shselasky pcap-snoop.c \ 342335640Shselasky pcap-tc.c \ 343335640Shselasky pcap-tc.h \ 344335640Shselasky pcap-usb-linux.c \ 345335640Shselasky pcap-usb-linux.h \ 346335640Shselasky rpcap-protocol.c \ 347335640Shselasky rpcapd/CMakeLists.txt \ 348335640Shselasky rpcapd/Makefile.in \ 349335640Shselasky rpcapd/config_params.h \ 350335640Shselasky rpcapd/daemon.h \ 351335640Shselasky rpcapd/daemon.c \ 352335640Shselasky rpcapd/fileconf.c \ 353335640Shselasky rpcapd/fileconf.h \ 354335640Shselasky rpcapd/log.h \ 355356341Scy rpcapd/log.c \ 356335640Shselasky rpcapd/org.tcpdump.rpcapd.plist \ 357335640Shselasky rpcapd/rpcapd.c \ 358335640Shselasky rpcapd/rpcapd.h \ 359335640Shselasky rpcapd/rpcapd.inetd.conf \ 360335640Shselasky rpcapd/rpcapd.manadmin.in \ 361356341Scy rpcapd/rpcapd-config.manfile.in \ 362335640Shselasky rpcapd/rpcapd.rc \ 363335640Shselasky rpcapd/rpcapd.socket \ 364335640Shselasky rpcapd/rpcapd.xinetd.conf \ 365335640Shselasky rpcapd/rpcapd@.service \ 366356341Scy rpcapd/win32-svc.c \ 367335640Shselasky rpcapd/win32-svc.h \ 368335640Shselasky sockutils.c \ 369335640Shselasky sockutils.h \ 370335640Shselasky scanner.l \ 371335640Shselasky testprogs/CMakeLists.txt \ 372335640Shselasky testprogs/Makefile.in \ 373335640Shselasky testprogs/can_set_rfmon_test.c \ 374335640Shselasky testprogs/capturetest.c \ 375335640Shselasky testprogs/filtertest.c \ 376335640Shselasky testprogs/findalldevstest.c \ 377335640Shselasky testprogs/opentest.c \ 378335640Shselasky testprogs/reactivatetest.c \ 379335640Shselasky testprogs/selpolltest.c \ 380335640Shselasky testprogs/threadsignaltest.c \ 381335640Shselasky testprogs/unix.h \ 382335640Shselasky testprogs/valgrindtest.c \ 383335640Shselasky tests/shb-option-too-long.pcapng \ 384335640Shselasky Win32/Prj/wpcap.sln \ 385335640Shselasky Win32/Prj/wpcap.vcxproj \ 386335640Shselasky Win32/Prj/wpcap.vcxproj.filters 387335640Shselasky 388335640Shselaskyall: libpcap.a shared $(BUILD_RPCAPD) libpcap.pc pcap-config 389335640Shselasky 390335640Shselaskylibpcap.a: $(OBJ) 391335640Shselasky @rm -f $@ 392335640Shselasky $(AR) rc $@ $(OBJ) $(ADDLARCHIVEOBJS) 393335640Shselasky $(RANLIB) $@ 394335640Shselasky 395335640Shselaskyshared: libpcap.$(DYEXT) 396335640Shselasky 397335640Shselaskylibpcap.so: $(OBJ) 398335640Shselasky @rm -f $@ 399335640Shselasky VER=`cat $(srcdir)/VERSION`; \ 400335640Shselasky MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \ 401335640Shselasky @V_SHLIB_CMD@ $(LDFLAGS) @V_SHLIB_OPT@ @V_SONAME_OPT@$@.$$MAJOR_VER \ 402335640Shselasky -o $@.$$VER $(OBJ) $(ADDLOBJS) $(LIBS) 403335640Shselasky 404335640Shselasky# 405335640Shselasky# The following rule succeeds, but the result is untested. 406335640Shselasky# 407335640Shselasky# In macOS, the libpcap dylib has the name "libpcap.A.dylib", with its 408335640Shselasky# full path as the install_name, and with the compatibility and current 409335640Shselasky# version both set to 1. The compatibility version is set to 1 so that 410335640Shselasky# programs built with a newer version of the library will run against 411335640Shselasky# older versions if they don't use APIs available in the newer version 412335640Shselasky# but not in the older version. 413335640Shselasky# 414335640Shselasky# We also use "A" as the major version, and 1 as the compatibility version, 415335640Shselasky# but set the current version to the value in VERSION, with any non-numeric 416335640Shselasky# stuff stripped off (the compatibility and current version must be of the 417335640Shselasky# form X[.Y[.Z]], with Y and Z possibly absent, and with all components 418335640Shselasky# numeric). 419335640Shselasky# 420335640Shselaskylibpcap.dylib: $(OBJ) 421335640Shselasky rm -f libpcap*.dylib 422335640Shselasky VER=`cat $(srcdir)/VERSION`; \ 423335640Shselasky MAJOR_VER=A; \ 424335640Shselasky COMPAT_VER=1; \ 425335640Shselasky CURRENT_VER=`sed 's/[^0-9.].*$$//' $(srcdir)/VERSION`; \ 426356341Scy $(CC) -dynamiclib -undefined error $(LDFLAGS) @V_LIB_LDFLAGS_FAT@ \ 427335640Shselasky -o libpcap.$$VER.dylib $(OBJ) $(ADDLOBJS) $(LIBS) \ 428335640Shselasky -install_name $(libdir)/libpcap.$$MAJOR_VER.dylib \ 429335640Shselasky -compatibility_version $$COMPAT_VER \ 430335640Shselasky -current_version $$CURRENT_VER 431335640Shselasky 432335640Shselasky# 433335640Shselasky# The HP-UX linker manual says that the convention for a versioned library 434335640Shselasky# is libXXX.{number}, not libXXX.sl.{number}. That appears to be the case 435335640Shselasky# on at least one HP-UX 11.00 system; libXXX.sl is a symlink to 436335640Shselasky# libXXX.{number}. 437335640Shselasky# 438335640Shselasky# The manual also says "library-level versioning" (think "sonames") was 439335640Shselasky# added in HP-UX 10.0. 440335640Shselasky# 441335640Shselasky# XXX - this assumes we're using the HP linker, rather than the GNU 442335640Shselasky# linker, even with GCC. 443335640Shselasky# 444335640Shselaskylibpcap.sl: $(OBJ) 445335640Shselasky @MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \ 446335640Shselasky rm -f libpcap.$$MAJOR_VER 447335640Shselasky MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \ 448335640Shselasky ld -b $(LDFLAGS) -o libpcap.$$MAJOR_VER +h libpcap.$$MAJOR_VER \ 449335640Shselasky $(OBJ) $(ADDLOBJS) $(LIBS) 450335640Shselasky 451335640Shselasky# 452335640Shselasky# AIX is different from everybody else. A shared library is an archive 453335640Shselasky# library with one or more shared-object components. We still build a 454335640Shselasky# normal static archive library on AIX, for the benefit of the traditional 455335640Shselasky# scheme of building libpcap and tcpdump in subdirectories of the 456335640Shselasky# same directory, with tcpdump statically linked with the libpcap 457335640Shselasky# in question, but we also build a shared library as "libpcap.shareda" 458335640Shselasky# and install *it*, rather than the static library, as "libpcap.a". 459335640Shselasky# 460335640Shselaskylibpcap.shareda: $(OBJ) 461335640Shselasky @rm -f $@ shr.o 462335640Shselasky $(CC) $(LDFLAGS) @V_SHLIB_OPT@ -o shr.o $(OBJ) $(ADDLOBJS) $(LIBS) 463335640Shselasky $(AR) rc $@ shr.o 464335640Shselasky 465335640Shselasky# 466335640Shselasky# For platforms that don't support shared libraries (or on which we 467335640Shselasky# don't support shared libraries). 468335640Shselasky# 469335640Shselaskylibpcap.none: 470335640Shselasky 471335640Shselaskyscanner.c: $(srcdir)/scanner.l 472335640Shselasky $(LEX) -P pcap_ --header-file=scanner.h --nounput -o scanner.c $< 473335640Shselaskyscanner.h: scanner.c 474335640Shselasky## Recover from the removal of $@ 475335640Shselasky @if test -f $@; then :; else \ 476335640Shselasky rm -f scanner.c; \ 477335640Shselasky $(MAKE) $(MAKEFLAGS) scanner.c; \ 478335640Shselasky fi 479335640Shselasky 480335640Shselaskyscanner.o: scanner.c grammar.h 481335640Shselasky $(CC) $(FULL_CFLAGS) -c scanner.c 482335640Shselasky 483335640Shselaskygrammar.c: $(srcdir)/grammar.y 484335640Shselasky $(YACC) -p pcap_ -o grammar.c -d $< 485335640Shselaskygrammar.h: grammar.c 486335640Shselasky## Recover from the removal of $@ 487335640Shselasky @if test -f $@; then :; else \ 488335640Shselasky rm -f grammar.c; \ 489335640Shselasky $(MAKE) $(MAKEFLAGS) grammar.c; \ 490335640Shselasky fi 491335640Shselasky 492335640Shselaskygrammar.o: grammar.c scanner.h 493335640Shselasky $(CC) $(FULL_CFLAGS) -c grammar.c 494335640Shselasky 495335640Shselaskygencode.o: $(srcdir)/gencode.c grammar.h scanner.h 496335640Shselasky $(CC) $(FULL_CFLAGS) -c $(srcdir)/gencode.c 497335640Shselasky 498356341Scyasprintf.o: $(srcdir)/missing/asprintf.c 499356341Scy $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/asprintf.c 500356341Scy 501335640Shselaskysnprintf.o: $(srcdir)/missing/snprintf.c 502335640Shselasky $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c 503335640Shselasky 504356341Scystrlcat.o: $(srcdir)/missing/strlcat.c 505356341Scy $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c 506356341Scy 507356341Scystrlcpy.o: $(srcdir)/missing/strlcpy.c 508356341Scy $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c 509356341Scy 510335640Shselaskystrtok_r.o: $(srcdir)/missing/strtok_r.c 511335640Shselasky $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strtok_r.c 512335640Shselasky 513335640Shselasky# 514335640Shselasky# Generate the libpcap.pc file. 515335640Shselasky# 516335640Shselasky# Some Makes, e.g. AIX Make and Solaris Make, can't handle "--file=$@.tmp:$<"; 517335640Shselasky# for example, the Solaris 9 make man page says 518335640Shselasky# 519335640Shselasky# Because make assigns $< and $* as it would for implicit rules 520335640Shselasky# (according to the suffixes list and the directory contents), 521335640Shselasky# they may be unreliable when used within explicit target entries. 522335640Shselasky# 523335640Shselasky# and this is an explicit target entry. 524335640Shselasky# 525335640Shselasky# Therefore, instead of using $<, we explicitly put in $(srcdir)/libpcap.pc.in. 526335640Shselasky# 527335640Shselaskylibpcap.pc: $(srcdir)/libpcap.pc.in ./config.status 528335640Shselasky @rm -f $@ $@.tmp 529335640Shselasky ./config.status --file=$@.tmp:$(srcdir)/libpcap.pc.in 530335640Shselasky mv $@.tmp $@ 531335640Shselasky chmod a+x $@ 532335640Shselasky 533335640Shselasky# 534335640Shselasky# Generate the pcap-config script. See above. 535335640Shselasky# 536335640Shselaskypcap-config: $(srcdir)/pcap-config.in ./config.status 537335640Shselasky @rm -f $@ $@.tmp 538335640Shselasky ./config.status --file=$@.tmp:$(srcdir)/pcap-config.in 539335640Shselasky mv $@.tmp $@ 540335640Shselasky chmod a+x $@ 541335640Shselasky 542335640Shselasky# 543335640Shselasky# Remote pcap daemon. 544335640Shselasky# 545335640Shselaskybuild-rpcapd: libpcap.a 546335640Shselasky cd rpcapd; $(MAKE) 547335640Shselasky 548335640Shselasky# 549335640Shselasky# Test programs - not built by default, and not installed. 550335640Shselasky# 551335640Shselaskytestprogs: FORCE 552335640Shselasky cd testprogs; $(MAKE) 553335640Shselasky 554335640ShselaskyFORCE: 555335640Shselasky 556335640Shselaskyinstall: install-shared install-archive libpcap.pc pcap-config @INSTALL_RPCAPD@ 557335640Shselasky [ -d $(DESTDIR)$(libdir) ] || \ 558335640Shselasky (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) 559335640Shselasky [ -d $(DESTDIR)$(includedir) ] || \ 560335640Shselasky (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir)) 561335640Shselasky [ -d $(DESTDIR)$(includedir)/pcap ] || \ 562335640Shselasky (mkdir -p $(DESTDIR)$(includedir)/pcap; chmod 755 $(DESTDIR)$(includedir)/pcap) 563335640Shselasky [ -d $(DESTDIR)$(mandir)/man1 ] || \ 564335640Shselasky (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1) 565335640Shselasky [ -d $(DESTDIR)$(mandir)/man3 ] || \ 566335640Shselasky (mkdir -p $(DESTDIR)$(mandir)/man3; chmod 755 $(DESTDIR)$(mandir)/man3) 567335640Shselasky [ -d $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@ ] || \ 568335640Shselasky (mkdir -p $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@) 569335640Shselasky [ -d $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@ ] || \ 570335640Shselasky (mkdir -p $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@) 571335640Shselasky for i in $(PUBHDR); do \ 572335640Shselasky $(INSTALL_DATA) $(srcdir)/$$i \ 573335640Shselasky $(DESTDIR)$(includedir)/$$i; done 574335640Shselasky [ -d $(DESTDIR)$(bindir) ] || \ 575335640Shselasky (mkdir -p $(DESTDIR)$(bindir); chmod 755 $(DESTDIR)$(bindir)) 576335640Shselasky $(INSTALL_PROGRAM) pcap-config $(DESTDIR)$(bindir)/pcap-config 577335640Shselasky [ -d $(DESTDIR)$(libdir)/pkgconfig ] || \ 578335640Shselasky (mkdir -p $(DESTDIR)$(libdir)/pkgconfig; chmod 755 $(DESTDIR)$(libdir)/pkgconfig) 579335640Shselasky $(INSTALL_DATA) libpcap.pc $(DESTDIR)$(libdir)/pkgconfig/libpcap.pc 580335640Shselasky for i in $(MAN1); do \ 581335640Shselasky $(INSTALL_DATA) $(srcdir)/$$i \ 582335640Shselasky $(DESTDIR)$(mandir)/man1/$$i; done 583335640Shselasky for i in $(MAN3PCAP_NOEXPAND); do \ 584335640Shselasky $(INSTALL_DATA) $(srcdir)/$$i \ 585335640Shselasky $(DESTDIR)$(mandir)/man3/$$i; done 586335640Shselasky for i in $(MAN3PCAP_EXPAND:.in=); do \ 587335640Shselasky $(INSTALL_DATA) $$i \ 588335640Shselasky $(DESTDIR)$(mandir)/man3/$$i; done 589335640Shselasky (cd $(DESTDIR)$(mandir)/man3 && \ 590335640Shselasky rm -f pcap_datalink_val_to_description.3pcap && \ 591335640Shselasky $(LN_S) pcap_datalink_val_to_name.3pcap \ 592335640Shselasky pcap_datalink_val_to_description.3pcap && \ 593356341Scy rm -f pcap_datalink_val_to_description_or_dlt.3pcap && \ 594356341Scy $(LN_S) pcap_datalink_val_to_name.3pcap \ 595356341Scy pcap_datalink_val_to_description_or_dlt.3pcap && \ 596335640Shselasky rm -f pcap_dump_fopen.3pcap && \ 597335640Shselasky $(LN_S) pcap_dump_open.3pcap pcap_dump_fopen.3pcap && \ 598335640Shselasky rm -f pcap_freealldevs.3pcap && \ 599335640Shselasky $(LN_S) pcap_findalldevs.3pcap pcap_freealldevs.3pcap && \ 600335640Shselasky rm -f pcap_perror.3pcap && \ 601335640Shselasky $(LN_S) pcap_geterr.3pcap pcap_perror.3pcap && \ 602335640Shselasky rm -f pcap_sendpacket.3pcap && \ 603335640Shselasky $(LN_S) pcap_inject.3pcap pcap_sendpacket.3pcap && \ 604335640Shselasky rm -f pcap_free_datalinks.3pcap && \ 605335640Shselasky $(LN_S) pcap_list_datalinks.3pcap pcap_free_datalinks.3pcap && \ 606335640Shselasky rm -f pcap_free_tstamp_types.3pcap && \ 607335640Shselasky $(LN_S) pcap_list_tstamp_types.3pcap pcap_free_tstamp_types.3pcap && \ 608335640Shselasky rm -f pcap_dispatch.3pcap && \ 609335640Shselasky $(LN_S) pcap_loop.3pcap pcap_dispatch.3pcap && \ 610335640Shselasky rm -f pcap_minor_version.3pcap && \ 611335640Shselasky $(LN_S) pcap_major_version.3pcap pcap_minor_version.3pcap && \ 612335640Shselasky rm -f pcap_next.3pcap && \ 613335640Shselasky $(LN_S) pcap_next_ex.3pcap pcap_next.3pcap && \ 614335640Shselasky rm -f pcap_open_dead_with_tstamp_precision.3pcap && \ 615335640Shselasky $(LN_S) pcap_open_dead.3pcap \ 616335640Shselasky pcap_open_dead_with_tstamp_precision.3pcap && \ 617335640Shselasky rm -f pcap_open_offline_with_tstamp_precision.3pcap && \ 618335640Shselasky $(LN_S) pcap_open_offline.3pcap pcap_open_offline_with_tstamp_precision.3pcap && \ 619335640Shselasky rm -f pcap_fopen_offline.3pcap && \ 620335640Shselasky $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline.3pcap && \ 621335640Shselasky rm -f pcap_fopen_offline_with_tstamp_precision.3pcap && \ 622335640Shselasky $(LN_S) pcap_open_offline.3pcap pcap_fopen_offline_with_tstamp_precision.3pcap && \ 623335640Shselasky rm -f pcap_tstamp_type_val_to_description.3pcap && \ 624335640Shselasky $(LN_S) pcap_tstamp_type_val_to_name.3pcap pcap_tstamp_type_val_to_description.3pcap && \ 625335640Shselasky rm -f pcap_getnonblock.3pcap && \ 626335640Shselasky $(LN_S) pcap_setnonblock.3pcap pcap_getnonblock.3pcap) 627335640Shselasky for i in $(MANFILE); do \ 628335640Shselasky $(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \ 629335640Shselasky $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done 630335640Shselasky for i in $(MANMISC); do \ 631335640Shselasky $(INSTALL_DATA) `echo $$i | sed 's/.manmisc.in/.manmisc/'` \ 632335640Shselasky $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done 633335640Shselasky 634335640Shselaskyinstall-shared: install-shared-$(DYEXT) 635335640Shselaskyinstall-shared-so: libpcap.so 636335640Shselasky [ -d $(DESTDIR)$(libdir) ] || \ 637335640Shselasky (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) 638335640Shselasky VER=`cat $(srcdir)/VERSION`; \ 639335640Shselasky MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \ 640335640Shselasky $(INSTALL_PROGRAM) libpcap.so.$$VER $(DESTDIR)$(libdir)/libpcap.so.$$VER; \ 641335640Shselasky ln -sf libpcap.so.$$VER $(DESTDIR)$(libdir)/libpcap.so.$$MAJOR_VER; \ 642335640Shselasky ln -sf libpcap.so.$$MAJOR_VER $(DESTDIR)$(libdir)/libpcap.so 643335640Shselaskyinstall-shared-dylib: libpcap.dylib 644335640Shselasky [ -d $(DESTDIR)$(libdir) ] || \ 645335640Shselasky (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) 646335640Shselasky VER=`cat $(srcdir)/VERSION`; \ 647335640Shselasky MAJOR_VER=A; \ 648335640Shselasky $(INSTALL_PROGRAM) libpcap.$$VER.dylib $(DESTDIR)$(libdir)/libpcap.$$VER.dylib; \ 649335640Shselasky ln -sf libpcap.$$VER.dylib $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER.dylib; \ 650335640Shselasky ln -sf libpcap.$$MAJOR_VER.dylib $(DESTDIR)$(libdir)/libpcap.dylib 651335640Shselaskyinstall-shared-sl: libpcap.sl 652335640Shselasky [ -d $(DESTDIR)$(libdir) ] || \ 653335640Shselasky (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) 654335640Shselasky MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \ 655335640Shselasky $(INSTALL_PROGRAM) libpcap.$$MAJOR_VER $(DESTDIR)$(libdir) 656335640Shselasky ln -sf libpcap.$$MAJOR_VER $(DESTDIR)$(libdir)/libpcap.sl 657335640Shselaskyinstall-shared-shareda: libpcap.shareda 658335640Shselasky # 659335640Shselasky # AIX shared libraries are weird. They're archive libraries 660335640Shselasky # with one or more shared object components. 661335640Shselasky # 662335640Shselasky [ -d $(DESTDIR)$(libdir) ] || \ 663335640Shselasky (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) 664335640Shselasky $(INSTALL_PROGRAM) libpcap.shareda $(DESTDIR)$(libdir)/libpcap.a 665335640Shselaskyinstall-shared-none: 666335640Shselasky 667335640Shselaskyinstall-archive: install-archive-$(DYEXT) 668335640Shselaskyinstall-archive-so install-archive-dylib install-archive-sl install-archive-none: libpcap.a 669335640Shselasky # 670335640Shselasky # Most platforms have separate suffixes for shared and 671335640Shselasky # archive libraries, so we install both. 672335640Shselasky # 673335640Shselasky [ -d $(DESTDIR)$(libdir) ] || \ 674335640Shselasky (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) 675335640Shselasky $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a 676335640Shselasky $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a 677335640Shselaskyinstall-archive-shareda: 678335640Shselasky # 679335640Shselasky # AIX, however, doesn't, so we don't install the archive 680335640Shselasky # library on AIX. 681335640Shselasky # 682335640Shselasky 683335640Shselaskyinstall-rpcapd: 684335640Shselasky cd rpcapd; $(MAKE) DESTDIR=$(DESTDIR) install 685335640Shselasky 686335640Shselaskyuninstall: uninstall-shared uninstall-rpcapd 687335640Shselasky rm -f $(DESTDIR)$(libdir)/libpcap.a 688335640Shselasky for i in $(PUBHDR); do \ 689335640Shselasky rm -f $(DESTDIR)$(includedir)/$$i; done 690335640Shselasky -rmdir $(DESTDIR)$(includedir)/pcap 691335640Shselasky rm -f $(DESTDIR)/$(libdir)/pkgconfig/libpcap.pc 692335640Shselasky rm -f $(DESTDIR)/$(bindir)/pcap-config 693335640Shselasky for i in $(MAN1); do \ 694335640Shselasky rm -f $(DESTDIR)$(mandir)/man1/$$i; done 695335640Shselasky for i in $(MAN3PCAP); do \ 696335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/$$i; done 697335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_datalink_val_to_description.3pcap 698335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_dump_fopen.3pcap 699335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_freealldevs.3pcap 700335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_perror.3pcap 701335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_sendpacket.3pcap 702335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_free_datalinks.3pcap 703335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_free_tstamp_types.3pcap 704335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_dispatch.3pcap 705335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_minor_version.3pcap 706335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_next.3pcap 707335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_open_dead_with_tstamp_precision.3pcap 708335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_open_offline_with_tstamp_precision.3pcap 709335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline.3pcap 710335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_fopen_offline_with_tstamp_precision.3pcap 711335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_getnonblock.3pcap 712335640Shselasky rm -f $(DESTDIR)$(mandir)/man3/pcap_tstamp_type_val_to_description.3pcap 713335640Shselasky for i in $(MANFILE); do \ 714335640Shselasky rm -f $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done 715335640Shselasky for i in $(MANMISC); do \ 716335640Shselasky rm -f $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done 717335640Shselasky 718335640Shselaskyuninstall-shared: uninstall-shared-$(DYEXT) 719335640Shselaskyuninstall-shared-so: 720335640Shselasky VER=`cat $(srcdir)/VERSION`; \ 721335640Shselasky MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \ 722335640Shselasky rm -f $(DESTDIR)$(libdir)/libpcap.so.$$VER; \ 723335640Shselasky rm -f $(DESTDIR)$(libdir)/libpcap.so.$$MAJOR_VER; \ 724335640Shselasky rm -f $(DESTDIR)$(libdir)/libpcap.so 725335640Shselaskyuninstall-shared-dylib: 726335640Shselasky VER=`cat $(srcdir)/VERSION`; \ 727335640Shselasky MAJOR_VER=A; \ 728335640Shselasky rm -f $(DESTDIR)$(libdir)/libpcap.$$VER.dylib; \ 729335640Shselasky rm -f $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER.dylib; \ 730335640Shselasky rm -f $(DESTDIR)$(libdir)/libpcap.dylib 731335640Shselaskyuninstall-shared-sl: 732335640Shselasky MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \ 733335640Shselasky rm -f $(DESTDIR)$(libdir)/libpcap.$$MAJOR_VER; \ 734335640Shselasky rm -f $(DESTDIR)$(libdir)/libpcap.sl 735335640Shselaskyuninstall-shared-shareda: 736335640Shselasky rm -f $(DESTDIR)$(libdir)/libpcap.a 737335640Shselaskyuninstall-shared-none: 738335640Shselasky 739335640Shselaskyuninstall-rpcapd: 740335640Shselasky cd rpcapd; $(MAKE) DESTDIR=$(DESTDIR) uninstall 741335640Shselasky 742335640Shselaskyclean: 743335640Shselasky rm -f $(CLEANFILES) 744335640Shselasky cd rpcapd; $(MAKE) clean 745335640Shselasky cd testprogs; $(MAKE) clean 746335640Shselasky 747335640Shselaskydistclean: clean 748335640Shselasky rm -f Makefile config.cache config.log config.status \ 749335640Shselasky config.h gnuc.h net os-proto.h libpcap.pc \ 750335640Shselasky pcap-config stamp-h stamp-h.in 751335640Shselasky rm -f $(MAN3PCAP_EXPAND:.in=) $(MANFILE:.in=) $(MANMISC:.in=) 752335640Shselasky rm -rf autom4te.cache 753335640Shselasky cd rpcapd; $(MAKE) distclean 754335640Shselasky cd testprogs; $(MAKE) distclean 755335640Shselasky 756335640Shselaskyextags: $(TAGFILES) 757335640Shselasky ctags $(TAGFILES) 758335640Shselasky 759335640Shselaskytags: $(TAGFILES) 760335640Shselasky ctags -wtd $(TAGFILES) 761335640Shselasky 762335640Shselaskyreleasetar: 763335640Shselasky @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \ 764335640Shselasky mkdir $$name; \ 765356341Scy tar -c --exclude='*~' -f - $(CSRC) $(HDR) $(MAN1) $(MAN3PCAP_EXPAND) \ 766335640Shselasky $(MAN3PCAP_NOEXPAND) $(MANFILE) $(MANMISC) $(EXTRA_DIST) | \ 767335640Shselasky (cd $$name; tar xf -); \ 768335640Shselasky tar -c -z -f $$name.tar.gz $$name; \ 769335640Shselasky rm -rf $$name 770335640Shselasky 771335640Shselaskydepend: $(GENSRC) $(GENHDR) 772335640Shselasky $(MKDEP) -c "$(CC)" -m "$(DEPENDENCY_CFLAG)" $(CFLAGS) $(DEFS) $(INCLS) $(SRC) 773335640Shselasky cd rpcapd; $(MAKE) depend 774335640Shselasky cd testprogs; $(MAKE) depend 775