wireshark/Makefile.nmake

781 lines
19 KiB
Makefile
Raw Normal View History

## Makefile for building ethereal.exe with Microsoft C and nmake
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#
# $Id: Makefile.nmake,v 1.370 2003/12/05 16:00:34 gerald Exp $
include config.nmake
include <win32.mak>
############### no need to modify below this line #########
CC = cl
LINK= link
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
CFLAGS=-DHAVE_CONFIG_H $(LOCAL_CFLAGS) $(GTK_CFLAGS) /I. /Iwiretap \
$(ZLIB_CFLAGS) /I$(PCAP_DIR)\include \
/I$(NET_SNMP_DIR)\include /I$(NET_SNMP_DIR)\win32 \
$(ADNS_CFLAGS) -D_U_=""
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
DISSECTOR_SRC = \
packet-aarp.c \
packet-acap.c \
packet-afp.c \
packet-afs.c \
packet-aim.c \
packet-ajp13.c \
packet-alcap.c \
packet-ans.c \
packet-ansi_a.c \
packet-ansi_637.c \
packet-ansi_683.c \
packet-ansi_map.c \
packet-aodv.c \
packet-arcnet.c \
packet-arp.c \
packet-asap.c \
Add a "proto_register_dcerpc_smb()" which registers ett_ values for "packet-dcerpc-nt.c", and registers "dcerpc_smb_init()" as an initialization routine. Take the ett_ registration out of the latter routine, and also take out the "do this only once" stuff. Get rid of the initialization routines for netlogon, samr, and spoolss; they just call "dcerpc_smb_init()", which is now an initialization routine of its own. The policy hash initialization should be done before every capture, so it should be done in an initialization routine, and should not do any "do this only once" stuff. It should also be called only once before every capture, rather than 3 times. The ett_ initialization should, however, be done at the same time all other ett_ initialization is done - at protocol registration time - so it should be done in a "proto_register_" routine. This fixes a bug I saw wherein 1) the tree for Unicode strings was open by default and 2) if you closed one and then exited, Ethereal would crash. The problem is that "proto_register_subtree_array()" doesn't expand the array, it just bumps the number of registered ett_ values; the array is allocated in "proto_init()". As such, if you register ett_ values with "proto_register_subtree_array()" *after* "proto_init()" is called - and, even for the first capture, initialization routines are called after "proto_init()" is called - you will get ett_ numbers that go past the number of elements in the array. Move the declaration of "ett_nt_unicode_string" to "packet-dcerpc-nt.h", as it's exported from "packet-dcerpc-nt.c". Get rid of the declaration of "dcerpc_smb_init()" in "packet-dcerpc-nt.h", and make it static, as it's no longer called from outside "packet-dcerpc-nt.c". svn path=/trunk/; revision=5196
2002-04-18 00:29:17 +00:00
packet-ascend.c\
packet-asf.c \
packet-atalk.c \
packet-atm.c \
packet-auto_rp.c \
packet-bacapp.c \
packet-bacnet.c \
packet-beep.c \
packet-bfd.c \
packet-bgp.c \
packet-bofl.c \
packet-bootp.c \
packet-bootparams.c \
packet-bpdu.c \
packet-brdwlk.c \
packet-bssap.c \
packet-bssgp.c \
packet-bvlc.c \
packet-ccsds.c \
packet-cdp.c \
packet-cgmp.c \
packet-chdlc.c \
packet-cisco-oui.c \
packet-clearcase.c \
packet-clip.c \
packet-clnp.c \
packet-cops.c \
packet-cosine.c \
packet-cpfi.c \
packet-cpha.c \
packet-cups.c \
packet-data.c \
packet-dccp.c \
packet-dcerpc.c \
packet-dcerpc-afs4int.c \
packet-dcerpc-atsvc.c \
packet-dcerpc-bossvr.c \
packet-dcerpc-browser.c \
packet-dcerpc-budb.c \
packet-dcerpc-butc.c \
packet-dcerpc-cds_clerkserver.c \
packet-dcerpc-cds_solicit.c \
packet-dcerpc-conv.c \
packet-dcerpc-cprpc_server.c \
packet-dcerpc-dce122.c \
packet-dcerpc-dfs.c \
packet-dcerpc-dnsserver.c \
packet-dcerpc-drsuapi.c \
packet-dcerpc-dtsprovider.c \
packet-dcerpc-dtsstime_req.c \
packet-dcerpc-epm.c \
packet-dcerpc-epm4.c \
packet-dcerpc-fldb.c \
packet-dcerpc-ftserver.c \
packet-dcerpc-icl_rpc.c \
packet-dcerpc-initshutdown.c \
packet-dcerpc-krb5rpc.c \
packet-dcerpc-lsa.c \
packet-dcerpc-lsa-ds.c \
packet-dcerpc-mapi.c \
packet-dcerpc-messenger.c \
packet-dcerpc-mgmt.c \
packet-dcerpc-ndr.c \
packet-dcerpc-netlogon.c \
packet-dcerpc-nspi.c \
packet-dcerpc-oxid.c \
packet-dcerpc-reg.c \
packet-dcerpc-remact.c \
packet-dcerpc-rep_proc.c \
packet-dcerpc-roverride.c \
packet-dcerpc-rpriv.c \
packet-dcerpc-rs_acct.c \
packet-dcerpc-rs_attr.c \
packet-dcerpc-rs_bind.c \
packet-dcerpc-rs_misc.c \
packet-dcerpc-rs_plcy.c \
packet-dcerpc-rs_pgo.c \
packet-dcerpc-rs_prop_acct.c \
packet-dcerpc-rs_repadm.c \
packet-dcerpc-rs_replist.c \
packet-dcerpc-rs_unix.c \
packet-dcerpc-rsec_login.c \
packet-dcerpc-samr.c \
packet-dcerpc-secidmap.c \
packet-dcerpc-spoolss.c \
packet-dcerpc-srvsvc.c \
packet-dcerpc-svcctl.c \
packet-dcerpc-tapi.c \
packet-dcerpc-tkn4int.c \
packet-dcerpc-ubikdisk.c \
packet-dcerpc-ubikvote.c \
packet-dcerpc-update.c \
packet-dcerpc-wkssvc.c \
packet-ddtp.c \
packet-dec-bpdu.c \
packet-dhcpv6.c \
packet-diameter.c \
packet-diffserv-mpls-common.c \
packet-distcc.c \
packet-dlsw.c \
packet-dns.c \
packet-dsi.c \
packet-dvmrp.c \
packet-eap.c \
packet-eapol.c \
packet-echo.c \
packet-edonkey.c \
packet-eigrp.c \
packet-enc.c \
packet-enip.c \
packet-esis.c \
packet-eth.c \
packet-etherip.c \
packet-ethertype.c \
packet-fc.c \
packet-fcct.c \
packet-fcdns.c \
packet-fcels.c \
packet-fcfcs.c \
packet-fcfzs.c \
packet-fcip.c \
packet-fclctl.c \
packet-fcp.c \
packet-fcsb3.c \
packet-fcsp.c \
packet-fcswils.c \
packet-fddi.c \
packet-fix.c \
packet-fr.c \
packet-frame.c \
packet-ftp.c \
packet-fw1.c \
packet-giop.c \
packet-gmrp.c \
packet-gnutella.c \
packet-gprs-ns.c \
packet-gre.c \
packet-gsm_a.c \
packet-gsm_map.c \
packet-gsm_sms.c \
packet-gssapi.c \
packet-gtp.c \
packet-gvrp.c \
packet-h1.c \
packet-h225.c \
packet-h245.c \
packet-h261.c \
packet-h263.c \
packet-h450.c \
packet-hclnfsd.c \
packet-hpext.c \
packet-hsrp.c \
packet-http.c \
packet-hyperscsi.c \
packet-iapp.c \
packet-ib.c \
packet-icap.c \
packet-icmpv6.c\
packet-icp.c \
packet-icq.c \
packet-ieee80211.c \
packet-ieee8023.c \
packet-igmp.c \
packet-igrp.c \
packet-imap.c \
packet-ip.c \
packet-ipfc.c \
packet-ipmi.c \
packet-ipp.c \
packet-ipsec.c \
packet-ipsec-udp.c \
packet-ipv6.c \
packet-ipx.c \
packet-ipxwan.c \
packet-irc.c \
packet-isakmp.c\
packet-iscsi.c \
packet-isdn.c \
packet-isis.c \
packet-isis-clv.c \
packet-isis-hello.c \
packet-isis-lsp.c \
packet-isis-snp.c \
packet-isl.c \
packet-isns.c \
packet-isup.c \
packet-iua.c \
packet-jabber.c \
packet-kadm5.c \
packet-kerberos.c \
packet-klm.c \
packet-kpasswd.c \
packet-l2tp.c \
packet-lapb.c \
packet-lapbether.c \
packet-lapd.c \
packet-laplink.c \
packet-ldap.c \
packet-ldp.c \
packet-llc.c \
packet-lmi.c \
packet-lmp.c \
packet-lpd.c \
packet-lwapp.c \
packet-m2pa.c \
packet-m2tp.c \
packet-m2ua.c \
packet-m3ua.c \
packet-mbtcp.c \
packet-mdshdr.c \
packet-mip.c \
packet-mip6.c \
packet-mmse.c \
packet-mount.c \
packet-mpeg1.c \
packet-mpls.c \
packet-mrdisc.c \
packet-msdp.c \
packet-msn-messenger.c \
packet-msnip.c \
packet-msproxy.c \
packet-mtp2.c \
packet-mtp3.c \
packet-mtp3mg.c \
packet-mysql.c \
packet-nbipx.c \
packet-nbns.c \
packet-ncp.c \
packet-ncp2222.c \
packet-ndmp.c \
packet-ndps.c \
packet-netbios.c \
packet-netflow.c \
packet-nfs.c \
packet-nfsacl.c \
packet-nfsauth.c \
packet-nisplus.c \
packet-nlm.c \
packet-nlsp.c \
packet-nntp.c \
packet-nt-oui.c \
packet-nt-sonmp.c \
packet-nt-tpcp.c \
packet-ntlmssp.c \
packet-ntp.c \
packet-null.c \
packet-osi.c \
packet-osi-options.c \
packet-ospf.c \
packet-pcnfsd.c \
packet-per.c \
packet-pflog.c \
packet-pgm.c \
packet-pim.c \
packet-pop.c \
packet-portmap.c \
packet-ppp.c \
packet-pppoe.c \
packet-pptp.c \
packet-prism.c \
packet-q2931.c \
packet-q931.c \
packet-q933.c \
packet-qllc.c \
packet-quake.c \
packet-quake2.c \
packet-quake3.c \
packet-quakeworld.c \
packet-radius.c\
packet-ranap.c \
packet-raw.c \
packet-rip.c \
packet-ripng.c \
packet-rlogin.c \
packet-rmcp.c \
packet-rmi.c \
packet-rmp.c \
packet-rpc.c \
packet-rpl.c \
packet-rquota.c \
packet-rsh.c \
packet-rstat.c \
packet-rsvp.c \
packet-rsync.c \
packet-rtcp.c \
packet-rtp.c \
packet-rtp-events.c \
packet-rtsp.c \
packet-rwall.c \
packet-rx.c \
packet-sadmind.c \
packet-sap.c \
packet-sccp.c \
packet-sccpmg.c \
packet-scsi.c \
packet-sctp.c \
packet-sdlc.c \
packet-sdp.c \
packet-sebek.c \
packet-ses.c \
packet-sflow.c \
packet-sip.c \
packet-skinny.c \
packet-slimp3.c \
packet-sll.c \
packet-slowprotocols.c \
packet-smb.c \
packet-smb-browse.c \
packet-smb-common.c \
packet-smb-logon.c \
packet-smb-mailslot.c \
packet-smb-pipe.c \
packet-smb-sidsnooping.c \
packet-smpp.c \
packet-smtp.c \
packet-sna.c \
packet-snaeth.c \
packet-snmp.c \
packet-socks.c \
packet-spnego.c \
packet-spray.c \
packet-srvloc.c \
packet-sscop.c \
packet-ssh.c \
packet-ssl.c \
packet-stat.c \
packet-stat-notify.c \
packet-stun.c \
packet-sua.c \
packet-syslog.c \
packet-t38.c \
packet-tacacs.c \
packet-tcap.c \
packet-tcp.c \
packet-tds.c \
packet-telnet.c\
packet-teredo.c\
packet-tftp.c \
packet-time.c \
packet-tns.c \
packet-tpkt.c \
packet-tr.c \
packet-trmac.c \
packet-tsp.c \
packet-tzsp.c \
packet-ucp.c \
packet-udp.c \
packet-v120.c \
packet-vines.c \
packet-vj.c \
packet-vlan.c \
packet-vrrp.c \
packet-vtp.c \
packet-wap.c \
packet-wbxml.c \
packet-wccp.c \
packet-wcp.c \
packet-wfleet-hdlc.c \
packet-who.c \
packet-wlancap.c \
packet-wsp.c \
packet-wtls.c \
packet-wtp.c \
packet-x11.c \
packet-x25.c \
packet-x29.c \
packet-xdmcp.c \
packet-xot.c \
packet-xyplex.c \
packet-yhoo.c \
packet-ymsg.c \
packet-ypbind.c \
packet-yppasswd.c \
packet-ypserv.c \
packet-ypxfr.c \
packet-zebra.c
DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
TETHEREAL_TAP_SRC = \
tap-ansi_astat.c \
tap-bootpstat.c \
tap-dcerpcstat.c \
tap-h225counter.c \
tap-h225rassrt.c \
tap-httpstat.c \
tap-iostat.c \
tap-iousers.c \
tap-mgcpstat.c \
tap-protocolinfo.c \
tap-protohierstat.c \
tap-rpcstat.c \
tap-rpcprogs.c \
tap-smbsids.c \
tap-smbstat.c \
tap-wspstat.c
TETHEREAL_TAP_OBJECTS = $(TETHEREAL_TAP_SRC:.c=.obj)
ETHEREAL_COMMON_OBJECTS = \
adler32.obj \
There is really no need to have the BGP dissector and the LDP dissector have two independent "value_string" tables mapping RFC 1700 address family numbers to names, nor is there any need to have the BGP dissector and the PIM dissector have two independent sets of #defines for RFC 1700 address family numbers; put a single "value_string" table in "afn.c" and put a declaration of it, and #defines for the address family numbers, into "afn.h", and have the dissectors use that. Move the #define for PGM into "ipproto.h", and add an entry for it in the "value_string" table in "ipproto.c". Have the PGM dissector use the standard Ethereal mechanisms for resolving addresses, and have it use "value_string" tables for mapping option types, the OPX bits, and packet types to strings. Use "bytes_to_str()" to turn byte arrays into strings of hex digits. Pass the packet type string to "dissect_pgmopts()" as an argument, rather than making it a global. Don't use "proto_tree_add_XXX_format" routines if you can possibly just use "proto_tree_add_XXX"; give various fields the correct radix and type, and VALS() strings if necessary, to make that happen (and to make filtering on them more pleasant). Put the type, length, and total length of the options into the protocol tree as separate fields. Don't have separate type, length, and OPX fields for every type of option; one field will suffice. Don't format a string with "sprintf()" and then pass that string to "col_add_fstr()" with a format of "%s" and the string as an argument - "col_add_fstr()" can format strings itself (that's what the "f" stands for). Don't byte-swap and then un-byte-swap IPv4 address fields in the header, just leave them network byte order to start with. Use the correct fields for "proto_tree_add_XXX", rather than using the same field multiple times. Quit early if an address family identifier isn't AFNUM_INET, as that means the structure we use to dissect the header doesn't match the actual header. svn path=/trunk/; revision=3761
2001-07-21 10:27:13 +00:00
afn.obj \
asn1.obj \
capture_stop_conditions.obj \
capture-wpcap.obj \
cfile.obj \
column.obj \
conditions.obj \
crc32.obj \
crypt-des.obj \
crypt-md4.obj \
crypt-md5.obj \
crypt-rc4.obj \
disabled_protos.obj \
follow.obj \
g711.obj \
getopt.obj \
h225-persistentdata.obj \
in_cksum.obj \
ipproto.obj \
packet-dcerpc-nt.obj \
pcap-util.obj \
prefs.obj \
print.obj \
ps.obj \
ptvcursor.obj \
reassemble.obj \
register.obj \
ringbuffer.obj \
t35.obj \
tap.obj \
timestats.obj \
util.obj \
xdlc.obj \
xmlstub.obj \
ethereal_OBJECTS = \
$(DISSECTOR_OBJECTS) \
$(ETHEREAL_COMMON_OBJECTS) \
capture.obj \
file.obj \
filters.obj \
proto_hier_stats.obj \
summary.obj
tethereal_OBJECTS = \
$(DISSECTOR_OBJECTS) \
$(ETHEREAL_COMMON_OBJECTS) \
$(TETHEREAL_TAP_OBJECTS) \
tethereal-tap-register.obj \
tethereal.obj
dftest_OBJECTS = \
$(DISSECTOR_OBJECTS) \
$(ETHEREAL_COMMON_OBJECTS) \
dftest.obj
randpkt_OBJECTS = \
randpkt.obj
EXTRA_OBJECTS = \
# snprintf.obj \
# strerror.obj \
mkstemp.obj \
strptime.obj
ethereal_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
gtk\libui.lib epan\ethereal.lib \
epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
wsock32.lib user32.lib \
$(GTK_LIBS) \
$(ADNS_LIBS) \
$(NET_SNMP_DIR)\win32\lib\netsnmp.lib
# $(PCAP_DIR)\lib\wpcap.lib
tethereal_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
epan\ethereal.lib \
epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
wsock32.lib user32.lib \
$(GLIB_LIBS) \
$(ADNS_LIBS) \
$(NET_SNMP_DIR)\win32\lib\netsnmp.lib
editcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
$(GLIB_LIBS)
mergecap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
$(GLIB_LIBS)
dftest_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib epan\ethereal.lib \
epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
wsock32.lib user32.lib \
wiretap\wiretap-$(WTAP_VERSION).lib \
$(GLIB_LIBS)
randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
user32.lib \
$(GLIB_LIBS) \
$(NET_SNMP_DIR)\win32\lib\netsnmp.lib
EXECUTABLES=ethereal.exe tethereal.exe editcap.exe mergecap.exe text2pcap.exe
RESOURCES=image\ethereal.res image\tethereal.res image\editcap.res image\mergecap.res image\text2pcap.res
all: tools wiretap gtk epan image $(EXECUTABLES) $(RESOURCES)
$(RESOURCES): image
wiretap\wiretap-$(WTAP_VERSION).lib: wiretap
ethereal.exe : config.h $(ethereal_OBJECTS) $(EXTRA_OBJECTS) epan gtk image\ethereal.res wiretap\wiretap-$(WTAP_VERSION).lib gtk\libui.lib plugins
@echo Linking $@
$(LINK) @<<
/OUT:ethereal.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(ethereal_LIBS) $(ethereal_OBJECTS) $(EXTRA_OBJECTS) image\ethereal.res
<<
tethereal.exe : config.h $(tethereal_OBJECTS) $(EXTRA_OBJECTS) epan image\tethereal.res wiretap\wiretap-$(WTAP_VERSION).lib plugins
@echo Linking $@
$(LINK) @<<
/OUT:tethereal.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(tethereal_LIBS) $(tethereal_OBJECTS) $(EXTRA_OBJECTS) image\tethereal.res
<<
editcap.exe : config.h editcap.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
@echo Linking $@
$(LINK) @<<
/OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console editcap.obj getopt.obj $(editcap_LIBS) image\editcap.res
<<
mergecap.exe : config.h mergecap.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
@echo Linking $@
$(LINK) @<<
/OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console mergecap.obj getopt.obj $(mergecap_LIBS) image\mergecap.res
<<
text2pcap.exe : config.h text2pcap.obj text2pcap-scanner.obj getopt.obj strptime.obj image\text2pcap.res
@echo Linking $@
$(LINK) @<<
/OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console text2pcap.obj text2pcap-scanner.obj getopt.obj strptime.obj image\text2pcap.res
<<
dftest.exe : $(dftest_OBJECTS) $(EXTRA_OBJECTS)
$(LINK) @<<
/OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) $(dftest_OBJECTS) $(EXTRA_OBJECTS)
<<
randpkt.exe : $(randpkt_OBJECTS) $(EXTRA_OBJECTS)
$(LINK) @<<
/OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(randpkt_LIBS) $(randpkt_OBJECTS)
<<
config.h : config.h.win32 config.nmake
sed -e s/@VERSION@/$(VERSION)/ \
-e "s/@HAVE_GNU_ADNS@/$(ADNS_CONFIG)/" \
-e "s/@HAVE_LIBZ@/$(ZLIB_CONFIG)/" \
-e "s/@HAVE_LIBPCAP@/$(WINPCAP_CONFIG)/" \
-e "s/@HAVE_PCAP_FINDALLDEVS@/$(PCAP_FINDALLDEVS_CONFIG)/" \
-e "s/@WPCAP_CONSTIFIED@/$(WPCAP_CONSTIFIED_CONFIG)/" \
< config.h.win32 > $@
ps.c : rdps.exe print.ps
rdps print.ps ps.c
#
# The header files listed here are built from x11-fields using Perl;
# we declare a dependency here so that they get built.
#
packet-x11.obj : packet-x11.c x11-declarations.h x11-register-info.h
#
# Build various header files for the X11 dissector.
#
x11-declarations.h x11-register-info.h: x11-fields process-x11-fields.pl
$(PERL) process-x11-fields.pl <x11-fields
packet-ncp2222.c : ncp2222.py
!IFDEF PYTHON
@echo Making packet-ncp2222.c
$(PYTHON) ncp2222.py -o packet-ncp2222.c
!ELSE
@echo Faking packet-ncp2222.c...
@echo Python is required to build the NCP disector
@echo Hiding packet-ncp.c...
mv packet-ncp.c packet-ncp.c.save
touch packet-ncp.c $@
!ENDIF
#
# Build "register.c", which contains a function "register_all_protocols()"
# that calls the register routines for all protocols.
#
# We do this by grepping through sources. If that turns out to be too slow,
# maybe we could just require every .o file to have an register routine
# of a given name (packet-aarp.o -> proto_register_aarp, etc.).
#
# Formatting conventions: The name of the proto_register_* routines must
# start in column zero, or must be preceded only by "void " starting in
# column zero, and must not be inside #if.
#
# We assume that all dissector routines are in "packet-XXX.c" files.
#
# For some unknown reason, having a big "for" loop in the Makefile
# to scan all the "packet-XXX.c" files doesn't work with some "make"s;
# they seem to pass only the first few names in the list to the shell,
# for some reason.
#
# Therefore, we have a script to generate the "register.c" file.
#
# The first argument is the name of the file to write.
# The second argument is the directory in which the source files live.
# All subsequent arguments are the files to scan.
#
# On Windows, however, that script runs slowly, as multiple greps
# and seds are run for each input file, so, if Python is present
# (as indicated by PYTHON being defined), we run a faster Python
# script to do that work instead. That script doesn't take the name
# of the file to write as an argument; it always writes to
# "register.c".
#
register.c: $(DISSECTOR_SRC)
!IFDEF PYTHON
@echo Making register.c (using python)
@$(PYTHON) make-reg-dotc.py . $(DISSECTOR_SRC)
!ELSE
@echo Making register.c (using sh)
@$(SH) make-reg-dotc register.c . $(DISSECTOR_SRC)
!ENDIF
#
# Build "tethereal-tap-register.c", which contains a function
# "register_all_tap_listeners()"
# that calls the register routines for all tehtereal tap listeners.
#
# We do this by grepping through sources.
#
# Formatting conventions: The name of the tap_listener_register_*
# routines must start in column zero, or must be preceded only by
# "void " starting in column zero, and must not be inside #if.
#
# The first argument is the name of the file to write.
# The second argument is the directory in which the source files live.
# All subsequent arguments are the files to scan.
#
tethereal-tap-register.c: $(TETHEREAL_TAP_SRC) make-tapreg-dotc
@echo Making tethereal-tap-register.c
@$(SH) make-tapreg-dotc tethereal-tap-register.c . $(TETHEREAL_TAP_SRC)
text2pcap-scanner.c : text2pcap-scanner.l
$(LEX) -otext2pcap-scanner.c text2pcap-scanner.l
clean:
rm -f $(ethereal_OBJECTS) $(tethereal_OBJECTS) $(EXTRA_OBJECTS) \
$(EXECUTABLES) $(PDB_FILE) \
editcap.obj mergecap.obj text2pcap.obj \
text2pcap-scanner.obj text2pcap-scanner.c rdps.obj \
rdps.pdb config.h ps.c \
rdps.exe rdps.ilk dftest.obj dftest.exe randpkt.obj randpkt.ext \
$(RESOURCES)
cd wiretap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../gtk
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../epan
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../plugins
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../tools
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../image
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../doc
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../help
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../packaging/nsis
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../..
# Call distclean only, if you would like to remove ALL generated files.
# Be sure to have python and perl installed to regenerate them.
distclean: clean
rm -f x11-declarations.h x11-register-info.h packet-ncp2222.c \
register.c tethereal-tap-register.c
cd wiretap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../gtk
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../epan
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../plugins
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../tools
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../image
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../doc
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../help
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../packaging/nsis
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
cd ../..
tools::
cd tools
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
image::
cd image
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
wiretap::
cd wiretap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
gtk:: help config.h
cd gtk
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
epan::
cd epan
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
plugins::
cd plugins
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
help::
cd help
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..