1 #-------------------------------------------------
3 # Project created by QtCreator 2010-12-21T11:38:10
5 #-------------------------------------------------
20 CONFIG += link_pkgconfig
24 # Some versions of Ubuntu don't ship with zlib.pc
25 eval(PKGCONFIG += zlib) {
32 # Windows Wireshark is compiled with /MD and thus must
33 # be linked with the "release" versions of the Qt libraries
34 # which are also compiled with /MD.
36 # Also: Windows Wireshark is compiled with /Zi and linked with /DEBUG
37 # which enables source level Wireshark debugging using the
38 # Windows Visual Studio debugger.
39 # So: QMAKE_CFLAGS, QMAKE_CXXFLAGS and QMAKE_LFLAGS are set to match
40 # those used building Windows Wireshark. (See config.pri).
41 # Among other things source-level debugging of the Qt version of Wireshark
42 # (including the ui/qt source) is thus enabled.
44 # Note that in this case source level debugging of the Qt
45 # *libraries* will not be possible since the Qt release libs are
46 # not compiled with /Zi (and not linked with /DEBUG).
47 # The Qt "debug" libraries are compiled with /MDd. To build a
48 # Wireshark-Qt debug version with the ability to do source level debugging
49 # of the Qt libraries themselves requires that Wireshark first be built with /MDd.
50 # Presumably doing source-level Qt library debugging shoyuld rarely be needed.
52 # We want to build only the QtShark linked with the QT "release" libraries
53 # so disable debug & etc.
56 CONFIG -= debug_and_release
58 # Use only Wireshark CFLAGS, CXXFLAGS and LDFLAGS from config.nmake (as provided via config.pri)
59 # for building the "release" version of Wireshark-Qt
60 # (e.g., so we don't get the Qt release CFLAGS [specifically /O2]
61 QMAKE_CFLAGS_RELEASE = ""
62 QMAKE_CXXFLAGS_RELEASE = ""
63 QMAKE_LFLAGS_RELEASE = ""
65 # XXX We need to figure out how to pull this in from config.nmake.
66 !include( config.pri ) {
67 error("Can't find config.pri. Have you run 'nmake -f Makefile.nmake' two directories up?")
70 DESTDIR = wireshark-qt
72 !wireshark_manifest_info_required {
73 CONFIG -= embed_manifest_dll
74 CONFIG -= embed_manifest_exe
78 INCLUDEPATH += ../.. ../../wiretap
79 win32:INCLUDEPATH += \
80 $${WIRESHARK_LIB_DIR}/gtk2/include/glib-2.0 $${WIRESHARK_LIB_DIR}/gtk2/lib/glib-2.0/include \
81 $${WIRESHARK_LIB_DIR}/WpdPack/Include \
82 $${WIRESHARK_LIB_DIR}/AirPcap_Devpack_4_1_0_1622/Airpcap_Devpack/include \
83 $${WIRESHARK_LIB_DIR}/zlib125/include
85 # We have to manually trigger relinking each time one of these is modified.
86 # Is there any way to do this automatically?
88 ../../airpcap_loader.c \
89 ../../capture-pcap-util.c \
91 ../../capture_ifinfo.c \
92 ../../capture_info.c \
93 ../../capture_opts.c \
94 ../../capture_sync.c \
95 ../../capture_ui_utils.c \
97 ../../clopts_common.c \
98 ../../color_filters.c \
99 ../../disabled_protos.c \
103 ../../frame_data_sequence.c \
106 ../../packet-range.c \
108 ../../proto_hier_stats.c \
112 ../../sync_pipe_write.c \
113 ../../tap-megaco-common.c \
114 ../../tap-rtp-common.c \
118 ../../ui/alert_box.c \
122 unix:SOURCES_WS_C += ../../capture-pcap-util-unix.c
123 win32:SOURCES_WS_C += \
124 ../../capture-wpcap.c \
125 ../../capture_wpcap_packet.c \
126 ../../ui/win32/file_dlg_win32.c
132 capture_file_dialog.cpp \
133 capture_info_dialog.cpp \
134 capture_interface_dialog.cpp \
137 display_filter_combo.cpp \
138 display_filter_edit.cpp \
142 main_status_bar.cpp \
147 packet_list_model.cpp \
148 packet_list_record.cpp \
152 recent_file_status.cpp \
153 simple_dialog_qt.cpp \
154 wireshark_application.cpp \
159 ../../wsutil/privileges.h
164 capture_file_dialog.h \
165 capture_info_dialog.h \
166 capture_interface_dialog.h \
169 display_filter_combo.h \
170 display_filter_edit.h \
178 packet_list_model.h \
179 packet_list_record.h \
184 recent_file_status.h \
186 wireshark_application.h \
189 FORMS += main_window.ui
191 win32 { ## These should be in config.pri ??
192 !isEmpty(PORTAUDIO_DIR) {
194 ../gtk/pa_allocation.obj \
195 ../gtk/pa_converters.obj \
196 ../gtk/pa_cpuload.obj \
197 ../gtk/pa_dither.obj \
198 ../gtk/pa_front.obj \
199 ../gtk/pa_process.obj \
200 ../gtk/pa_skeleton.obj \
201 ../gtk/pa_stream.obj \
202 ../gtk/pa_trace.obj \
203 ../gtk/pa_win_wmme.obj \
204 ../gtk/pa_win_hostapis.obj \
205 ../gtk/pa_win_util.obj \
206 ../gtk/pa_win_waveformat.obj \
207 ../gtk/pa_x86_plain_converters.obj
208 PA_OBJECTS ~= s,/,\\,g
213 SOURCES += $$SOURCES_QT_CPP
214 HEADERS += $$HEADERS_WS_C
215 HEADERS += $$HEADERS_QT_CPP
216 OBJECTS_WS_C = $$SOURCES_WS_C
217 OBJECTS_WS_C ~= s/[.]c/.obj/g
218 OBJECTS_WS_C ~= s,/,\\,g
219 OBJECTS_WS_C += ../../image/file_dlg_win32.res
221 ## XXX: Shouldn't need to (re)compile WS_C sources ??
222 SOURCES += $$SOURCES_WS_C
223 SOURCES += $$SOURCES_QT_CPP
224 HEADERS += $$HEADERS_WS_C
225 HEADERS += $$HEADERS_QT_CPP
228 DEFINES += HAVE_CONFIG_H INET6 REENTRANT
229 unix:DEFINES += _U_=\"__attribute__((unused))\"
231 macx:QMAKE_LFLAGS += \
232 -framework CoreServices \
233 -framework ApplicationServices -framework CoreFoundation -framework CoreServices
235 unix:LIBS += -L../../lib -Wl,-rpath ../../lib -lwireshark -lwiretap -lwsutil \
237 macx:LIBS += -Wl,-macosx_version_min,10.5 -liconv
239 # http://stackoverflow.com/questions/3984104/qmake-how-to-copy-a-file-to-the-output
246 for(FILE,EXTRA_BINFILES){
247 QMAKE_POST_LINK += $$quote(cp $${FILE} .$$escape_expand(\\n\\t))
250 # qmake 2.01a / Qt 4.7.0 doesn't set DESTDIR on OS X.
252 for(FILE,EXTRA_BINFILES){
253 QMAKE_POST_LINK += $$quote(cp $${FILE} $${TARGET}.app/Contents/MacOS$$escape_expand(\\n\\t))
258 # Add the wireshark objects to LIBS
259 LIBS += $$OBJECTS_WS_C
262 wsock32.lib user32.lib shell32.lib comctl32.lib comdlg32.lib \
263 -L../../epan -llibwireshark -L../../wsutil -llibwsutil -L../../wiretap -lwiretap-$${WTAP_VERSION} \
264 -L$${GLIB_DIR}/lib -lglib-2.0 -lgmodule-2.0
268 ../../epan/libwireshark.dll ../../wiretap/wiretap-$${WTAP_VERSION}.dll ../../wsutil/libwsutil.dll \
269 $${GLIB_DIR}/bin/libglib-2.0-0.dll $${GLIB_DIR}/bin/libgmodule-2.0-0.dll \
270 $${GLIB_DIR}/bin/libgthread-2.0-0.dll $${GLIB_DIR}/bin/$${INTL_DLL} \
271 $${C_ARES_DIR}/bin/libcares-2.dll $${ZLIB_DIR}/zlib1.dll \
272 $${GNUTLS_DIR}/bin/libgcrypt-11.dll $${GNUTLS_DIR}/bin/libgnutls-26.dll \
273 $${GNUTLS_DIR}/bin/libgpg-error-0.dll $${GNUTLS_DIR}/bin/ $${GNUTLS_DIR}/bin/libtasn1-3.dll \
274 $${GNUTLS_DIR}/bin/libintl-8.dll $${SMI_DIR}/bin/libsmi-2.dll \
275 $${LUA_DIR}/lua5.1.dll \
276 $${GEOIP_DIR}/bin/libGeoIP-1.dll \
277 ../../colorfilters ../../dfilters ../../cfilters
281 $${KFW_DIR}/bin/comerr32.dll $${KFW_DIR}/bin/krb5_32.dll $${KFW_DIR}/bin/k5sprt32.dll
284 EXTRA_BINFILES ~= s,/,\\,g
285 for(FILE,EXTRA_BINFILES){
286 QMAKE_POST_LINK +=$$quote($(COPY_FILE) $${FILE} $(DESTDIR)$$escape_expand(\\n\\t))
288 PLUGINS_DIR = $(DESTDIR)\\plugins\\$${VERSION_FULL}
289 QMAKE_POST_LINK +=$$quote($(CHK_DIR_EXISTS) $${PLUGINS_DIR} $(MKDIR) $${PLUGINS_DIR}$$escape_expand(\\n\\t))
290 QMAKE_POST_LINK +=$$quote($(COPY_FILE) ..\\..\\wireshark-gtk2\\plugins\\$${VERSION_FULL}\\*.dll $(DESTDIR)\\plugins\\$${VERSION_FULL}$$escape_expand(\\n\\t))
292 # This doesn't depend on wireshark-gtk2. It also doesn't work.
293 #PLUGINS_IN_PWD=$${IN_PWD}
294 #PLUGINS_OUT_PWD=$${OUT_PWD}
295 #QMAKE_POST_LINK +=$$quote(cd $$replace(PLUGINS_IN_PWD, /, \\)\\..\\..\\plugins$$escape_expand(\\n\\t))
296 #QMAKE_POST_LINK +=$$quote(nmake -f Makefile.nmake INSTALL_DIR=$$replace(PLUGINS_OUT_PWD, /, \\)\\$(DESTDIR)$$escape_expand(\\n\\t))
297 #QMAKE_POST_LINK +=$$quote(cd $$replace(PLUGINS_IN_PWD, /, \\)$$escape_expand(\\n\\t))
310 ICON = ../../packaging/macosx/Resources/Wireshark.icns
312 win32: QMAKE_CLEAN += *.pdb