Incorporate plugin dissector into build in collection.
[obnox/wireshark/wip.git] / packaging / nsis / Makefile.nmake
1 #
2 # $Id$
3 #
4 # NSIS is a free packager/installer/uninstaller program for Win32.
5 # It was originally written for the Winamp package, but various
6 # freeware and non-freeware packages are using it, too.
7 #
8 # http://www.nullsoft.com/free/nsis/
9
10 include ../../config.nmake
11
12 UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
13
14
15 EXE=../../tshark.exe ../../editcap.exe \
16 !IFDEF GTK_DIR
17         ../../wireshark.exe \
18 !ENDIF
19         ../../text2pcap.exe ../../mergecap.exe ../../capinfos.exe WinPcap_4_0_2.exe
20 DLL=../../wiretap/wiretap-$(WTAP_VERSION).dll ../../wsutil/libwsutil.dll
21 DOC=../../doc/ws.css                    \
22         ../../doc/capinfos.html         \
23         ../../doc/dumpcap.html          \
24         ../../doc/editcap.html          \
25         ../../doc/idl2wrs.html          \
26         ../../doc/mergecap.html         \
27         ../../doc/rawshark.html         \
28         ../../doc/text2pcap.html        \
29         ../../doc/rawshark.html         \
30         ../../doc/tshark.html           \
31         ../../doc/wireshark-filter.html \
32         ../../doc/wireshark.html        \
33         ../../README                    \
34         ../../README.win32
35 DOC_dos=NEWS.txt
36 GPL=../../COPYING
37 HELP=../../help/capture_filters.txt \
38         ../../help/capturing.txt \
39         ../../help/display_filters.txt \
40         ../../help/faq.txt \
41         ../../help/getting_started.txt \
42         ../../help/overview.txt \
43         ../../help/toc
44
45 PLUGINS= \
46         ../../plugins/agentx/agentx.dll \
47         ../../plugins/asn1/asn1.dll \
48         ../../plugins/docsis/docsis.dll \
49         ../../plugins/ethercat/ethercat.dll \
50         ../../plugins/giop/coseventcomm.dll \
51         ../../plugins/giop/cosnaming.dll \
52         ../../plugins/giop/parlay.dll \
53         ../../plugins/giop/tango.dll \
54         ../../plugins/gryphon/gryphon.dll \
55         ../../plugins/irda/irda.dll \
56         ../../plugins/m2m/m2m.dll \
57         ../../plugins/mate/mate.dll \
58         ../../plugins/sercosiii/sercosiii.dll \
59         ../../plugins/stats_tree/stats_tree.dll \
60         ../../plugins/unistim/unistim.dll \
61         ../../plugins/wimax/wimax.dll \
62         ../../plugins/wimaxasncp/wimaxasncp.dll
63
64 NSI=wireshark.nsi \
65         GetWindowsVersion.nsh \
66         servicelib.nsh \
67         AdditionalTasksPage.ini \
68         WinPcapPage.ini
69
70 DELIVERABLES=$(EXE) $(DLL) $(DOC) $(DOC_dos) $(GPL) $(HELP) $(PLUGINS)
71
72 all: NEWS.txt wireshark-$(PLATFORM)-$(VERSION).exe
73
74 NEWS.txt: ../../NEWS
75         $(UNIX2DOS) < ../../NEWS > NEWS.txt
76
77 # fetch the latest available user-guide.chm version
78 user-guide.chm::
79         if exist ..\..\docbook\user-guide.chm xcopy ..\..\docbook\user-guide.chm . /Y /D
80         if exist $(WIRESHARK_LIBS)\user-guide\user-guide.chm xcopy $(WIRESHARK_LIBS)\user-guide\user-guide.chm . /Y /D
81
82 wireshark-$(PLATFORM)-$(VERSION).exe : user-guide.chm $(NSI) $(DELIVERABLES) Makefile.nmake
83         $(MAKENSIS) \
84         /DPLATFORM=$(PLATFORM) \
85         /DMSVC_VARIANT=$(MSVC_VARIANT) \
86 !IFDEF MSVCR_DLL
87         /DMSVCR_DLL="$(MSVCR_DLL)" \
88 !ENDIF
89 !IFDEF VCREDIST_EXE
90         /DVCREDIST_EXE="$(VCREDIST_EXE)" \
91 !ENDIF
92 !IF "$(ENABLE_LIBWIRESHARK)" != ""
93         /DENABLE_LIBWIRESHARK=$(ENABLE_LIBWIRESHARK) \
94 !ENDIF
95 !IFDEF GTK_DIR
96         /DGTK_DIR=$(GTK_DIR) \
97         /DGTK_LIB_DIR=$(GTK_LIB_DIR) \
98         /DPANGO_LIB_DIR=$(PANGO_LIB_DIR) \
99 !IFDEF NEED_LIBPNG_DLL
100         /DNEED_LIBPNG_DLL=$(NEED_LIBPNG_DLL) \
101 !ENDIF
102 !IFDEF NEED_LIBJPEG_DLL
103         /DNEED_LIBJPEG_DLL=$(NEED_LIBJPEG_DLL) \
104 !ENDIF
105 !IFDEF NEED_LIBTIFF_DLL
106         /DNEED_LIBTIFF_DLL=$(NEED_LIBTIFF_DLL) \
107 !ENDIF
108 !IFDEF NEED_CAIRO_DLL
109         /DNEED_CAIRO_DLL=$(NEED_CAIRO_DLL) \
110 !ENDIF
111 !ENDIF
112         /DGTK_WIMP_DLLDST_DIR=$(GTK_WIMP_DLLDST_DIR) \
113         /DGTK_WIMP_DLLSRC_DIR=$(GTK_WIMP_DLLSRC_DIR) \
114         /DGTK_WIMP_RCDST_DIR=$(GTK_WIMP_RCDST_DIR) \
115         /DGTK_WIMP_RCSRC_DIR=$(GTK_WIMP_RCSRC_DIR) \
116         /DGLIB_DIR=$(GLIB_DIR) \
117 !IFDEF ICONV_DIR
118         /DICONV_DIR=$(ICONV_DIR) \
119 !ENDIF
120         /DGETTEXT_DIR=$(GETTEXT_DIR) \
121         /DVERSION=$(VERSION) \
122         /DWTAP_VERSION=$(WTAP_VERSION) \
123 !IF "$(C_ARES_DIR)" != ""
124         /DC_ARES_DIR=$(C_ARES_DIR) \
125 !ENDIF
126 !IF "$(ADNS_DIR)" != ""
127         /DADNS_DIR=$(ADNS_DIR) \
128 !ENDIF
129 !IF "$(KFW_DIR)" != ""
130         /DKFW_DIR=$(KFW_DIR) \
131 !ENDIF
132 !IF "$(GNUTLS_DIR)" != ""
133         /DGNUTLS_DIR=$(GNUTLS_DIR) \
134 !ENDIF
135 !IF "$(PCRE_DIR)" != ""
136         /DPCRE_DIR=$(PCRE_DIR) \
137 !ENDIF
138 !IF "$(ZLIB_DIR)" != ""
139         /DZLIB_DIR=$(ZLIB_DIR) \
140 !ENDIF
141 !IFDEF LUA_DIR
142         /DLUA_DIR=$(LUA_DIR) \
143 !ENDIF
144 !IFDEF SMI_DIR
145         /DSMI_DIR=$(SMI_DIR) \
146 !ENDIF
147 !IFDEF HHC_DIR
148         /DHHC_DIR="$(HHC_DIR)" \
149 !ENDIF
150         wireshark.nsi
151
152 clean:
153         rm -f wireshark-$(PLATFORM)-$(VERSION).exe
154         rm -f NEWS.txt
155         rm -f user-guide.chm
156
157 distclean: clean
158         rm -f wireshark-$(PLATFORM)-*.exe
159
160 maintainer-clean: distclean
161
162 $(DOC):
163         cd ../../doc
164         $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
165         cd ../packaging/nsis
166
167 $(EXE) $(DLL):
168         cd ../..
169         $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
170         cd packaging/nsis