5afd5d91e527a2137a4c24655b64cc83937735db
[obnox/wireshark/wip.git] / Makefile.nmake
1 ## Makefile for building ethereal.exe with Microsoft C and nmake
2 ## Use: nmake -f makefile.nmake
3 #
4 # $Id: Makefile.nmake,v 1.67 2000/12/13 02:24:21 guy Exp $
5
6 include config.nmake
7
8 ############### no need to modify below this line #########
9
10 CC = cl
11 LINK= link
12
13 LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
14
15 CFLAGS=/MT -DHAVE_CONFIG_H $(LOCAL_CFLAGS) /I$(GLIB_DIR) /I$(GLIB_DIR)\gmodule \
16         /I$(GTK_DIR) /Iepan /Iwiretap /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \
17         /I$(PCAP_DIR)/include
18
19 {$S}.c{$O}.obj::
20    $(CC) $(CFLAGS) -Fd$O\ -c $<
21
22 DISSECTOR_SOURCES = \
23         packet-aarp.c  \
24         packet-afs.c   \
25         packet-aim.c   \
26         packet-arp.c   \
27         packet-ascend.c\
28         packet-atalk.c \
29         packet-atm.c   \
30         packet-auto_rp.c   \
31         packet-bgp.c   \
32         packet-bootp.c \
33         packet-bootparams.c \
34         packet-bpdu.c  \
35         packet-bxxp.c \
36         packet-cdp.c   \
37         packet-cgmp.c  \
38         packet-clip.c  \
39         packet-clnp.c  \
40         packet-cops.c  \
41         packet-data.c  \
42         packet-ddtp.c  \
43         packet-diameter.c \
44         packet-dns.c   \
45         packet-eigrp.c \
46         packet-esis.c  \
47         packet-eth.c   \
48         packet-ethertype.c   \
49         packet-fddi.c  \
50         packet-frame.c  \
51         packet-ftp.c   \
52         packet-giop.c  \
53         packet-gre.c   \
54         packet-gvrp.c  \
55         packet-h1.c    \
56         packet-h261.c  \
57         packet-hsrp.c  \
58         packet-http.c  \
59         packet-icmpv6.c\
60         packet-icp.c   \
61         packet-icq.c   \
62         packet-igrp.c  \
63         packet-imap.c   \
64         packet-ip.c    \
65         packet-ipp.c   \
66         packet-ipsec.c \
67         packet-ipv6.c  \
68         packet-ipx.c   \
69         packet-irc.c   \
70         packet-ieee80211.c \
71         packet-isakmp.c\
72         packet-isis.c  \
73         packet-isis-clv.c \
74         packet-isis-hello.c \
75         packet-isis-lsp.c \
76         packet-isis-snp.c \
77         packet-isl.c   \
78         packet-kerberos.c \
79         packet-l2tp.c  \
80         packet-lapb.c  \
81         packet-lapd.c  \
82         packet-ldap.c  \
83         packet-ldp.c  \
84         packet-llc.c   \
85         packet-lpd.c   \
86         packet-mapi.c  \
87         packet-mip.c  \
88         packet-mount.c \
89         packet-mpls.c \
90         packet-msproxy.c \
91         packet-nbipx.c \
92         packet-nbns.c  \
93         packet-ncp.c   \
94         packet-ncp2222.c   \
95         packet-netbios.c \
96         packet-nfs.c   \
97         packet-nlm.c   \
98         packet-nntp.c  \
99         packet-ntp.c  \
100         packet-null.c  \
101         packet-osi.c   \
102         packet-osi-options.c \
103         packet-ospf.c  \
104         packet-pim.c   \
105         packet-pop.c   \
106         packet-portmap.c   \
107         packet-ppp.c   \
108         packet-pppoe.c \
109         packet-pptp.c  \
110         packet-q2931.c \
111         packet-q931.c  \
112         packet-quake.c \
113         packet-radius.c\
114         packet-raw.c   \
115         packet-rip.c   \
116         packet-ripng.c \
117         packet-rlogin.c \
118         packet-rpc.c   \
119         packet-rsh.c   \
120         packet-rsvp.c  \
121         packet-rtcp.c  \
122         packet-rtp.c   \
123         packet-rtsp.c  \
124         packet-rx.c  \
125         packet-sap.c   \
126         packet-sctp.c   \
127         packet-sdp.c   \
128         packet-sip.c   \
129         packet-smb.c   \
130         packet-smb-browse.c \
131         packet-smb-common.c \
132         packet-smb-logon.c \
133         packet-smb-mailslot.c \
134         packet-smb-pipe.c \
135         packet-smtp.c \
136         packet-sna.c   \
137         packet-snmp.c   \
138         packet-socks.c \
139         packet-srvloc.c \
140         packet-sscop.c \
141         packet-stat.c   \
142         packet-syslog.c \
143         packet-tacacs.c \
144         packet-tcp.c   \
145         packet-telnet.c\
146         packet-tftp.c  \
147         packet-time.c  \
148         packet-tns.c \
149         packet-tpkt.c  \
150         packet-tr.c    \
151         packet-trmac.c \
152         packet-udp.c   \
153         packet-v120.c \
154         packet-vines.c \
155         packet-vlan.c \
156         packet-vrrp.c \
157         packet-vtp.c  \
158         packet-wccp.c \
159         packet-who.c  \
160         packet-wsp.c \
161         packet-wtp.c \
162         packet-x11.c    \
163         packet-x25.c   \
164         packet-yhoo.c  \
165         packet-ypbind.c \
166         packet-ypserv.c \
167         packet-ypxfr.c \
168         packet-zebra.c
169
170 DISSECTOR_OBJECTS = $(DISSECTOR_SOURCES:.c=.obj)
171
172 ETHEREAL_COMMON_OBJECTS = \
173         asn1.obj         \
174         column.obj       \
175         follow.obj       \
176         getopt.obj       \
177         in_cksum.obj     \
178         ipproto.obj      \
179         prefs.obj        \
180         print.obj        \
181         ps.obj           \
182         ptvcursor.obj    \
183         register.obj     \
184         util.obj         \
185         xdlc.obj         \
186
187 ethereal_OBJECTS = \
188         $(DISSECTOR_OBJECTS) \
189         $(ETHEREAL_COMMON_OBJECTS) \
190         capture.obj      \
191         file.obj         \
192         summary.obj      \
193
194 tethereal_OBJECTS = \
195         $(DISSECTOR_OBJECTS) \
196         $(ETHEREAL_COMMON_OBJECTS) \
197         tethereal.obj
198
199 EXTRA_OBJECTS = \
200         snprintf.obj    \
201         strerror.obj    \
202         mkstemp.obj
203
204 ethereal_LIBS= wiretap\libwtap.lib gtk\libui.lib epan\ethereal.lib \
205         wsock32.lib user32.lib \
206         $(GTK_DIR)\gtk\gtk-$(GTK_VERSION).lib \
207         $(GTK_DIR)\gdk\gdk-$(GTK_VERSION).lib \
208         $(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
209         $(GLIB_DIR)\gmodule\gmodule-$(GLIB_VERSION).lib \
210         $(PCAP_DIR)\lib\libpcap.lib
211
212 tethereal_LIBS= wiretap\libwtap.lib epan\ethereal.lib \
213         wsock32.lib user32.lib \
214         $(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
215         $(GLIB_DIR)\gmodule\gmodule-$(GLIB_VERSION).lib \
216         $(PCAP_DIR)\lib\libpcap.lib
217
218 editcap_LIBS= wiretap\libwtap.lib wsock32.lib user32.lib \
219         $(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
220         $(GLIB_DIR)\gmodule\gmodule-$(GLIB_VERSION).lib
221
222 EXECUTABLES=ethereal.exe tethereal.exe editcap.exe
223
224 RESOURCES=image\ethereal.res image\tethereal.res image\editcap.res
225
226 all: wiretap gtk epan $(EXECUTABLES) $(RESOURCES)
227
228 ethereal.exe    : config.h $(ethereal_OBJECTS) $(EXTRA_OBJECTS) image\ethereal.res wiretap\libwtap.lib gtk\libui.lib plugins
229         @echo Linking $@
230         $(LINK) @<<
231                 /OUT:ethereal.exe $(LDFLAGS) /SUBSYSTEM:windows $(ethereal_LIBS) $(ethereal_OBJECTS) $(EXTRA_OBJECTS) image\ethereal.res
232 <<
233
234 tethereal.exe   : config.h $(tethereal_OBJECTS) $(EXTRA_OBJECTS) image\tethereal.res wiretap\libwtap.lib plugins
235         @echo Linking $@
236         $(LINK) @<<
237                 /OUT:tethereal.exe $(LDFLAGS) /SUBSYSTEM:console $(tethereal_LIBS) $(tethereal_OBJECTS) $(EXTRA_OBJECTS) image\tethereal.res
238 <<
239
240 editcap.exe     : config.h editcap.obj getopt.obj wiretap\libwtap.lib image\editcap.res
241         @echo Linking $@
242         $(LINK) @<<
243                 /OUT:editcap.exe $(LDFLAGS) /SUBSYSTEM:console editcap.obj getopt.obj $(editcap_LIBS) image\editcap.res
244 <<
245
246 config.h        : config.h.win32
247         copy config.h.win32 $@
248
249 ps.c    : rdps.exe print.ps
250         rdps print.ps ps.c
251
252 packet-ncp2222.c : ncp2222.py
253         $(PYTHON) ncp2222.py > packet-ncp2222.c
254
255 register.c: $(DISSECTOR_SOURCES)
256         @echo Making register.c
257         @sh make-reg-dotc . $(DISSECTOR_SOURCES)
258
259 clean:
260         rm -f $(ethereal_OBJECTS) $(EXTRA_OBJECTS) $(EXECUTABLES) \
261                 tethereal.obj editcap.obj register.c dfilter-scanner.c \
262                 dfilter-grammar.c dfilter-grammar.h rdps.obj
263         cd wiretap
264         nmake -f Makefile.nmake clean
265         cd ../gtk
266         nmake -f Makefile.nmake clean
267         cd ../epan
268         nmake -f Makefile.nmake clean
269         cd ../plugins
270         nmake -f Makefile.nmake clean
271         cd ..
272
273 wiretap::
274         cd wiretap
275         nmake -f Makefile.nmake
276         cd ..
277
278 gtk::
279         cd gtk
280         nmake -f Makefile.nmake
281         cd ..
282
283 epan::
284         cd epan
285         nmake -f Makefile.nmake
286         cd ..
287
288 plugins::
289         cd plugins
290         nmake -f Makefile.nmake
291         cd ..
292