aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/u3/win32/makefile.nmake
blob: 9ba83642a1b4ff37cfab3baef73e726bc8728bca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
#
# $Id$
#

include ../../../config.nmake
include <win32.mak>

CC 	= cl
LINK	= link

LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 /ENTRY:mainCRTStartup $(LOCAL_LDFLAGS)

DEVICE 	= device
HOST 	= host
MANIFEST= manifest
DATA	= data

TOPDIR	= ..\..\..
COPY	= xcopy
MKDIR	= mkdir
COPY_FLAGS	= /d /y

all:	package

manifest.u3i:	manifest.tmpl $(TOPDIR)\config.nmake
	sed -e 's/$$(VERSION)/$(VERSION)/g' < manifest.tmpl > manifest.u3i

host-dirs:
	if not exist $(HOST) $(MKDIR) $(HOST)
	if not exist $(HOST)\etc $(MKDIR) $(HOST)\etc
	if not exist $(HOST)\etc\gtk-2.0 $(MKDIR) $(HOST)\etc\gtk-2.0
	if not exist $(HOST)\etc\pango $(MKDIR) $(HOST)\etc\pango
	if not exist $(HOST)\lib $(MKDIR) $(HOST)\lib
	if not exist $(HOST)\lib\gtk-2.0 $(MKDIR) $(HOST)\lib\gtk-2.0
	if not exist $(HOST)\lib\gtk-2.0\$(GTK2_LIB_DIR) $(MKDIR) $(HOST)\lib\gtk-2.0\$(GTK2_LIB_DIR)
	if not exist $(HOST)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders $(MKDIR) $(HOST)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders
	if not exist $(HOST)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules $(MKDIR) $(HOST)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules
	if not exist $(HOST)\$(GTK_WIMP_DLLDST_DIR) $(MKDIR) $(HOST)\$(GTK_WIMP_DLLDST_DIR)

device-dirs:
	if not exist $(DEVICE) $(MKDIR) $(DEVICE)
	if not exist $(DEVICE)\plugins $(MKDIR) $(DEVICE)\plugins
	if not exist $(DEVICE)\plugins\$(VERSION) $(MKDIR) $(DEVICE)\plugins\$(VERSION)
	if not exist $(DEVICE)\help $(MKDIR) $(DEVICE)\help
	if not exist $(DEVICE)\snmp $(MKDIR) $(DEVICE)\snmp
	if not exist $(DEVICE)\snmp\mibs $(MKDIR) $(DEVICE)\snmp\mibs
	if not exist $(DEVICE)\diameter $(MKDIR) $(DEVICE)\diameter
	if not exist $(DEVICE)\dtds $(MKDIR) $(DEVICE)\dtds
	if not exist $(DEVICE)\radius $(MKDIR) $(DEVICE)\radius

data-dirs:
	if not exist $(DATA) $(MKDIR) $(DATA)

manifest-dirs:
	if not exist $(MANIFEST) $(MKDIR) $(MANIFEST)

user-guide.chm:
	cd ../../nsis
	nmake -f Makefile.nmake user-guide.chm
	cd ../u3/win32

distribution: host-dirs device-dirs data-dirs manifest-dirs  manifest.u3i u3util.exe user-guide.chm
# manifest
	$(COPY) manifest.u3i $(MANIFEST) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\image\wireshark.ico $(MANIFEST) $(COPY_FLAGS)
# device
#
# these files stay on the U3 device and should not cause Wireshark to become unstable 
# if they are missing (e.g. U3 device removed)
#
	$(COPY) $(TOPDIR)\AUTHORS-SHORT $(DEVICE) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\COPYING $(DEVICE) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\FAQ $(DEVICE) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\README $(DEVICE) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\doc\capinfos.html $(DEVICE) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\diameter\chargecontrol.xml $(DEVICE)\diameter $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\diameter\dictionary.dtd $(DEVICE)\diameter $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\diameter\dictionary.xml $(DEVICE)\diameter $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\diameter\imscxdx.xml $(DEVICE)\diameter $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\diameter\mobileipv4.xml $(DEVICE)\diameter $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\diameter\nasreq.xml $(DEVICE)\diameter $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\diameter\sip.xml $(DEVICE)\diameter $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\diameter\sunping.xml $(DEVICE)\diameter $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\diameter\TGPPSh.xml $(DEVICE)\diameter $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\dtds\dc.dtd $(DEVICE)\dtds $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\dtds\itunes.dtd $(DEVICE)\dtds $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\dtds\mscml.dtd $(DEVICE)\dtds $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\dtds\pocsettings.dtd $(DEVICE)\dtds $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\dtds\presence.dtd $(DEVICE)\dtds $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\dtds\reginfo.dtd $(DEVICE)\dtds $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\dtds\rlmi.dtd $(DEVICE)\dtds $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\dtds\rss.dtd $(DEVICE)\dtds $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\dtds\smil.dtd $(DEVICE)\dtds $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\dtds\xcap-caps.dtd $(DEVICE)\dtds $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\dtds\watcherinfo.dtd $(DEVICE)\dtds $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\doc\dumpcap.html $(DEVICE) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\doc\editcap.html $(DEVICE) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\example_snmp_users_file $(DEVICE) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\help\toc $(DEVICE)\help $(COPY_FLAGS) 
	$(COPY) $(TOPDIR)\help\overview.txt $(DEVICE)\help $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\help\getting_started.txt $(DEVICE)\help $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\help\capturing.txt $(DEVICE)\help $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\help\capture_filters.txt $(DEVICE)\help $(COPY_FLAGS) 
	$(COPY) $(TOPDIR)\help\display_filters.txt $(DEVICE)\help $(COPY_FLAGS) 
	$(COPY) $(TOPDIR)\help\faq.txt $(DEVICE)\help $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\manuf $(DEVICE) $(COPY_FLAGS)
!IFDEF HHC_DIR
	$(COPY) $(TOPDIR)\packaging\nsis\user-guide.chm $(DEVICE) $(COPY_FLAGS)
!ENDIF
!IFDEF PCRE_DIR
	$(COPY) $(PCRE_DIR)\man\cat3\pcrepattern.3.txt $(DEVICE) $(COPY_FLAGS)
!ENDIF
	$(COPY) $(TOPDIR)\doc\mergecap.html $(DEVICE) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\agentx\agentx.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\artnet\artnet.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\asn1\asn1.dll $(DEVICE)\plugins\$(VERSION)$(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\ciscosm\ciscosm.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\docsis\docsis.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\enttec\enttec.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\giop\coseventcomm.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\giop\cosnaming.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\giop\parlay.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\giop\tango.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\gryphon\gryphon.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\h223\h223.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS) 
	$(COPY) $(TOPDIR)\plugins\irda\irda.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\lwres\lwres.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\megaco\megaco.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\mgcp\mgcp.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\opsi\opsi.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\pcli\pcli.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\profinet\profinet.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\rlm\rlm.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\rtnet\rtnet.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\rudp\rudp.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\sbus\sbus.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\v5ua\v5ua.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\stats_tree\stats_tree.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\plugins\mate\mate.dll $(DEVICE)\plugins\$(VERSION) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.3com $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.3gpp $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.3gpp2 $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.acc $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.alcatel $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.alteon $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.altiga $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.aptis $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.ascend $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.bay $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.bintec $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.bristol $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.cablelabs $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.cabletron $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.cisco $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.cisco.bbsm $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.cisco.vpn3000 $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.cisco.vpn5000 $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.colubris $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.columbia_university $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.compat $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.cosine $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.ericsson $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.erx $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.extreme $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.foundry $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.freeradius $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.gandalf $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.garderos $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.gemtek $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.itk $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.juniper $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.karlnet $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.livingston $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.localweb $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.merit $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.microsoft $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.mikrotik $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.navini $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.netscreen $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.nokia $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.nomadix $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.propel $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.quintum $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.redback $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.redcreek $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.shasta $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.shiva $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.sonicwall $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.springtide $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.t_systems_nova $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.telebit $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.trapeze $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.tunnel $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.unisphere $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.unix $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.usr $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.valemount $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.versanet $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.wispr $(DEVICE)\radius $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\radius\dictionary.xedia $(DEVICE)\radius $(COPY_FLAGS)
!IFDEF NET_SNMP_DIR
	$(COPY) $(NET_SNMP_DIR)\mibs\*.txt $(DEVICE)\snmp\mibs $(COPY_FLAGS)
!ENDIF
	$(COPY) $(TOPDIR)\doc\text2pcap.html $(DEVICE) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\doc\tshark.html $(DEVICE) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\doc\wireshark.html $(DEVICE) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\doc\wireshark-filter.html $(DEVICE) $(COPY_FLAGS)
!IFDEF LUA_DIR
	$(COPY) $(TOPDIR)\epan\wslua\init.lua $(DEVICE) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\epan\wslua\console.lua $(DEVICE) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\epan\wslua\dtd_gen.lua $(DEVICE) $(COPY_FLAGS)
!ENDIF
	$(COPY) $(TOPDIR)\packaging\nsis\WinPcap_4_0.exe $(DEVICE) $(COPY_FLAGS)
# host
#
# these files are copied onto the U3 host and are required to make Wireshark stable
#
	$(COPY) $(TOPDIR)\wiretap\wiretap-$(WTAP_VERSION).dll $(HOST) $(COPY_FLAGS)	
	if exist $(TOPDIR)\wiretap\wiretap-$(WTAP_VERSION).dll.manifest $(COPY) $(TOPDIR)\wiretap\wiretap-$(WTAP_VERSION).dll.manifest $(HOST) $(COPY_FLAGS)	
!IFDEF ENABLE_LIBWIRESHARK
	$(COPY) $(TOPDIR)\epan\libwireshark.dll $(HOST) $(COPY_FLAGS)	
	if exist $(TOPDIR)\epan\libwireshark.dll.manifest $(COPY) $(TOPDIR)\epan\libwireshark.dll.manifest $(HOST) /d
!ENDIF
	$(COPY) $(GLIB_DIR)\bin\libglib-2.0-0.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GLIB_DIR)\bin\libgmodule-2.0-0.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GLIB_DIR)\bin\libgobject-2.0-0.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(ICONV_DIR)\bin\iconv.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GETTEXT_DIR)\bin\intl.dll $(HOST) $(COPY_FLAGS)
!ifdef ZLIB_DIR
	$(COPY) $(ZLIB_DIR)\zlib1.dll $(HOST) $(COPY_FLAGS)
!endif
!IFDEF ADNS_DIR
	$(COPY) $(ADNS_DIR)\adns_win32\LIB\adns_dll.dll $(HOST) $(COPY_FLAGS)
!ENDIF
!IFDEF PCRE_DIR
	$(COPY) $(PCRE_DIR)\bin\pcre.dll $(HOST) $(COPY_FLAGS)
!ENDIF
!ifdef KFW_DIR
	$(COPY) $(KFW_DIR)\bin\comerr32.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(KFW_DIR)\bin\krb5_32.dll $(HOST) $(COPY_FLAGS)
!endif
!ifdef GNUTLS_DIR
	$(COPY) $(GNUTLS_DIR)\bin\libgcrypt-11.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GNUTLS_DIR)\bin\libgnutls-13.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GNUTLS_DIR)\bin\libgnutls-extra-13.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GNUTLS_DIR)\bin\libgnutls-openssl-13.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GNUTLS_DIR)\bin\libgpg-error-0.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GNUTLS_DIR)\bin\libtasn1-3.dll $(HOST) $(COPY_FLAGS)
!endif
!ifdef LUA_DIR
	$(COPY) $(LUA_DIR)\lib\dll\lua5.1.dll $(HOST) $(COPY_FLAGS)
!endif

!IFDEF GTK2_DIR
	$(COPY) $(TOPDIR)\wireshark-gtk2.exe $(HOST) $(COPY_FLAGS) 
# can't get /i to work with $(COPY) above to do the rename there
	mv $(HOST)\wireshark-gtk2.exe $(HOST)\wireshark.exe
	if exist $(TOPDIR)\wireshark-gtk2.exe.manifest $(COPY) $(TOPDIR)\wireshark-gtk2.exe.manifest $(HOST) $(COPY_FLAGS) 
# can't get /i to work with $(COPY) above to do the rename there
	if exist $(HOST)\wireshark-gtk2.exe.manifest mv $(HOST)\wireshark-gtk2.exe.manifest $(HOST)\wireshark.exe.manifest
	$(COPY) $(GTK2_DIR)\bin\libgdk-win32-2.0-0.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GTK2_DIR)\bin\libgdk_pixbuf-2.0-0.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GTK2_DIR)\bin\libgtk-win32-2.0-0.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GTK2_DIR)\bin\libatk-1.0-0.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GTK2_DIR)\bin\libpango-1.0-0.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GTK2_DIR)\bin\libpangowin32-1.0-0.dll $(HOST) $(COPY_FLAGS)
!IFDEF NEED_CAIRO_DLL
	$(COPY) $(GTK2_DIR)\bin\libcairo-2.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GTK2_DIR)\bin\libpangocairo-1.0-0.dll $(HOST) $(COPY_FLAGS)
!ENDIF
!IFDEF NEED_LIBPNG_DLL
	$(COPY) $(GTK2_DIR)\bin\libpng13.dll $(HOST) $(COPY_FLAGS)
!ENDIF 
	$(COPY) $(GTK2_DIR)\etc\gtk-2.0\*.* $(HOST)\etc\gtk-2.0 $(COPY_FLAGS)
	$(COPY) $(GTK2_DIR)\etc\pango\pango.* $(HOST)\etc\pango $(COPY_FLAGS)
	$(COPY) $(GTK2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders\libpixbufloader-*.dll $(HOST)\lib\gtk-2.0\$(GTK2_LIB_DIR)\loaders $(COPY_FLAGS)
	$(COPY) $(GTK2_DIR)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules\im-*.dll $(HOST)\lib\gtk-2.0\$(GTK2_LIB_DIR)\immodules $(COPY_FLAGS)
!IFDEF GTK_WIMP_DIR
	$(COPY) $(GTK_WIMP_DLLSRC_DIR)\libwimp.dll $(HOST)\$(GTK_WIMP_DLLDST_DIR) $(COPY_FLAGS)
	$(COPY) $(GTK_WIMP_RCSRC_DIR)\gtkrc $(HOST)\$(GTK_WIMP_RCDST_DIR) $(COPY_FLAGS)
!ENDIF
!ELSE
!IFDEF GTK1_DIR
	$(COPY) $(TOPDIR)\wireshark.exe $(HOST) $(COPY_FLAGS)
	$(COPY) $(GTK1_DIR)\lib\libgtk-0.dll $(HOST) $(COPY_FLAGS)
	$(COPY) $(GTK1_DIR)\lib\libgdk-0.dll $(HOST) $(COPY_FLAGS)
!ENDIF
!ENDIF
	$(COPY) $(TOPDIR)\capinfos.exe $(HOST) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\dumpcap.exe $(HOST) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\editcap.exe $(HOST) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\mergecap.exe $(HOST) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\text2pcap.exe $(HOST) $(COPY_FLAGS)
	$(COPY) $(TOPDIR)\tshark.exe $(HOST) $(COPY_FLAGS)
	$(COPY) u3util.exe $(HOST) $(COPY_FLAGS)

package:	distribution
	zip -r wireshark-$(VERSION).u3p $(MANIFEST) $(DEVICE) $(DATA) $(HOST) 

u3util_LIBS= user32.lib shell32.lib 

u3util.exe:	u3util.obj
	@echo Linking $@
	$(LINK) /OUT:u3util.exe $(guiflags) $(LDFLAGS) u3util.obj $(u3util_LIBS) $(guilibsdll) 
	
clean:
	rm -rf manifest.u3i
	rm -rf $(HOST)	
	rm -rf $(DEVICE)	
	rm -rf $(DATA)	
	rm -rf $(MANIFEST)	
	rm -rf u3util.{exe,obj}
	rm -rf wireshark*.u3p
   	rm -rf *~ *.*~

distclean:	clean

maintainer-clean:	distclean