wireshark/Makefile.nmake

453 lines
11 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.157 2001/12/19 21:14:49 guy 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) /I$(GLIB_DIR) /I$(GLIB_DIR)\gmodule \
/I$(GTK_DIR) /Iepan /Iwiretap /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \
/I$(PCAP_DIR)/include
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
DISSECTOR_SRC = \
packet-aarp.c \
packet-afs.c \
packet-aim.c \
packet-arp.c \
packet-ascend.c\
packet-atalk.c \
packet-atm.c \
packet-auto_rp.c \
packet-bacapp.c \
packet-bacnet.c \
packet-beep.c \
packet-bgp.c \
packet-bootp.c \
packet-bootparams.c \
packet-bpdu.c \
packet-bvlc.c \
packet-cdp.c \
packet-cgmp.c \
packet-chdlc.c \
packet-clip.c \
packet-clnp.c \
packet-cops.c \
packet-cups.c \
packet-data.c \
packet-dcerpc.c \
packet-dcerpc-conv.c \
packet-dcerpc-dfs.c \
packet-dcerpc-epm.c \
packet-dcerpc-lsa.c \
packet-dcerpc-mgmt.c \
packet-dcerpc-ndr.c \
packet-dcerpc-netlogon.c \
packet-dcerpc-oxid.c \
packet-dcerpc-reg.c \
packet-dcerpc-remact.c \
packet-dcerpc-samr.c \
packet-dcerpc-spoolss.c \
packet-dcerpc-srvsvc.c \
packet-dcerpc-wkssvc.c \
packet-ddtp.c \
packet-dec-bpdu.c \
packet-diameter.c \
packet-dns.c \
packet-dsi.c \
packet-dvmrp.c \
packet-eap.c \
packet-eapol.c \
packet-eigrp.c \
packet-esis.c \
packet-eth.c \
packet-ethertype.c \
packet-fddi.c \
packet-fr.c \
packet-frame.c \
packet-ftp.c \
packet-giop.c \
packet-gmrp.c \
packet-gnutella.c \
packet-gre.c \
packet-gtp.c \
packet-gvrp.c \
packet-h1.c \
packet-h261.c \
packet-hclnfsd.c \
packet-hsrp.c \
packet-http.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-ipp.c \
packet-ipsec.c \
packet-ipv6.c \
packet-ipx.c \
packet-irc.c \
packet-isakmp.c\
packet-iscsi.c \
packet-isis.c \
packet-isis-clv.c \
packet-isis-hello.c \
packet-isis-lsp.c \
packet-isis-snp.c \
packet-isl.c \
packet-isup.c \
packet-iua.c \
packet-kerberos.c \
packet-klm.c \
packet-l2tp.c \
packet-lapb.c \
packet-lapbether.c \
packet-lapd.c \
packet-ldap.c \
packet-ldp.c \
packet-llc.c \
packet-lmi.c \
packet-lpd.c \
packet-m2pa.c \
packet-m2tp.c \
packet-m3ua.c \
packet-mapi.c \
packet-mbtcp.c \
packet-mip.c \
packet-mmse.c \
packet-mount.c \
packet-mpeg1.c \
packet-mpls.c \
packet-mrdisc.c \
packet-msdp.c \
packet-msnip.c \
packet-msproxy.c \
packet-mtp2.c \
packet-mtp3.c \
packet-nbipx.c \
packet-nbns.c \
packet-ncp.c \
packet-ncp2222.c \
packet-netbios.c \
packet-nfs.c \
packet-nisplus.c \
packet-nlm.c \
packet-nntp.c \
packet-ntp.c \
packet-null.c \
packet-osi.c \
packet-osi-options.c \
packet-ospf.c \
packet-pcnfsd.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-qllc.c \
packet-quake.c \
packet-quakeworld.c \
packet-quake2.c \
packet-quake3.c \
packet-radius.c\
packet-ranap.c \
packet-raw.c \
packet-rip.c \
packet-ripng.c \
packet-rlogin.c \
packet-rpc.c \
packet-rquota.c \
packet-rsh.c \
packet-rsvp.c \
packet-rtcp.c \
packet-rtp.c \
packet-rtsp.c \
packet-rwall.c \
packet-rx.c \
packet-sap.c \
packet-sctp.c \
packet-sdp.c \
packet-sip.c \
packet-skinny.c \
packet-sll.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-smpp.c \
packet-smtp.c \
packet-sna.c \
packet-snmp.c \
packet-socks.c \
packet-spray.c \
packet-srvloc.c \
packet-sscop.c \
packet-ssl.c \
packet-stat.c \
packet-stat-notify.c \
packet-sua.c \
packet-syslog.c \
packet-tacacs.c \
packet-tcp.c \
packet-telnet.c\
packet-tftp.c \
packet-time.c \
packet-tns.c \
packet-tpkt.c \
packet-tr.c \
packet-trmac.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-wccp.c \
packet-wcp.c \
packet-who.c \
packet-wap.c \
packet-wtls.c \
packet-wsp.c \
packet-wtp.c \
packet-x11.c \
packet-x25.c \
packet-xot.c \
packet-yhoo.c \
packet-ypbind.c \
packet-yppasswd.c \
packet-ypserv.c \
packet-ypxfr.c \
packet-zebra.c
DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
ETHEREAL_COMMON_OBJECTS = \
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 \
column.obj \
conditions.obj \
follow.obj \
getopt.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 \
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.obj
dftest_OBJECTS = \
$(DISSECTOR_OBJECTS) \
$(ETHEREAL_COMMON_OBJECTS) \
dftest.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_DIR)\gtk\gtk-$(GTK_VERSION).lib \
$(GTK_DIR)\gdk\gdk-$(GTK_VERSION).lib \
$(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
$(GLIB_DIR)\gmodule\gmodule-$(GLIB_VERSION).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_DIR)\glib-$(GLIB_VERSION).lib \
$(GLIB_DIR)\gmodule\gmodule-$(GLIB_VERSION).lib
editcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
$(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
$(GLIB_DIR)\gmodule\gmodule-$(GLIB_VERSION).lib
mergecap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
$(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
$(GLIB_DIR)\gmodule\gmodule-$(GLIB_VERSION).lib
dftest_LIBS= epan\ethereal.lib \
epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
wsock32.lib user32.lib \
$(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
$(GLIB_DIR)\gmodule\gmodule-$(GLIB_VERSION).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)
ethereal.exe : config.h $(ethereal_OBJECTS) $(EXTRA_OBJECTS) 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) 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)
<<
config.h : config.h.win32
sed -e s/@VERSION@/$(VERSION)/ < 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
@echo Making packet-ncp2222.c
$(PYTHON) ncp2222.py > packet-ncp2222.c
register.c: $(DISSECTOR_SRC)
@echo Making register.c
@$(PYTHON) make-reg-dotc.py . $(DISSECTOR_SRC)
# How are ifdef's done in NMAKE? It would be nice
# to use python if PYTHON is defined, otherwise try to use shell.
# @sh make-reg-dotc . $(DISSECTOR_SRC)
text2pcap-scanner.c : text2pcap-scanner.l
$(LEX) -otext2pcap-scanner.c text2pcap-scanner.l
clean:
rm -f $(ethereal_OBJECTS) $(EXTRA_OBJECTS) $(EXECUTABLES) $(PDB_FILE) \
tethereal.obj editcap.obj mergecap.obj text2pcap.obj \
text2pcap-scanner.obj text2pcap-scanner.c register.c \
rdps.obj rdps.pdb config.h ps.c packet-ncp2222.c register.c
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 ..
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:: 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 ..