Move merge.{h,c} into wiretap: these modules use wiretap to merge files.
[metze/wireshark/wip.git] / CMakeLists.txt
index 70a4cf319130606a693617b37f07ab1a6e3efda1..29f65b6e2b076f43bfb840c0d57c383e37d578b9 100644 (file)
@@ -124,58 +124,57 @@ set(WIRESHARK_C_FLAGS
        -Wendif-labels
        -Wpointer-arith
        -Warray-bounds
-       -Wcast-align
        -Wformat-security
+       -Wshorten-64-to-32
+       -Wvla
+       -Waddress
+       -Warray-bounds
+       -Wattributes
+       -Wdiv-by-zero
+       -Wignored-qualifiers
+       -Wno-overlength-strings
+       -Wwrite-strings
+       -Wno-long-long
 )
 if (NOT APPLE)
-       set(WIRESHARK_C_FLAGS ${WIRESHARK_C_FLAGS} -fexcess-precision=fast)
+       set(WIRESHARK_C_FLAGS ${WIRESHARK_C_FLAGS}
+           -fexcess-precision=fast
+           -Wpragmas)
 endif()
 
 set(WIRESHARK_C_ONLY_FLAGS
        # The following are C only, not C++
        -Wc++-compat
        -Wdeclaration-after-statement
-       -Wlogical-op
+       -Wshadow
        -Wno-pointer-sign
        -Wold-style-definition
        -Wshadow
+       -Wstrict-prototypes
 )
+if (NOT APPLE)
+       set(WIRESHARK_C_ONLY_FLAGS ${WIRESHARK_C_ONLY_FLAGS}
+           -Wlogical-op
+           -Wjump-misses-init)
+endif()
 
 set(WIRESHARK_EXTRA_C_FLAGS
        -pedantic
        -Woverflow
-       -Wno-overlength-strings
        -fstrict-overflow -Wstrict-overflow=4
        -Wunreachable-code
        -Wunsafe-loop-optimizations
-       -Wno-long-long
+       -Wcast-align
        -Wcast-qual
-       -Waddress
-       -Warray-bounds
-       -Wattributes
-       -Wdiv-by-zero
        -Wformat-security
-       -Wignored-qualifiers
-       -Wpragmas
        -Wredundant-decls
-       -Wvla
-       # packet-ncp2222.inc prevents this from going into all warnings
-       -Wwrite-strings
        # All the registration functions block these for now.
        -Wmissing-declarations
-       # Problem with packet-afs.c
-       -Wshadow
-       # More cleanup needed for this on LP64
-       -Wshorten-64-to-32
-
 )
 
 set(WIRESHARK_EXTRA_C_ONLY_FLAGS
        # The following are C only, not C++
        -Wbad-function-cast
-       -Wjump-misses-init
-       # GLib blocks this for now.
-       -Wstrict-prototypes
        # All the registration functions block these for now.
        -Wmissing-prototypes
 )
@@ -617,17 +616,6 @@ ADD_CUSTOM_COMMAND(
                ${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl
 )
 
-ADD_CUSTOM_COMMAND(
-       OUTPUT  ps.c
-       COMMAND ${PYTHON_EXECUTABLE}
-               ${CMAKE_CURRENT_SOURCE_DIR}/tools/rdps.py
-               ${CMAKE_CURRENT_SOURCE_DIR}/print.ps
-               ps.c
-       DEPENDS
-               ${CMAKE_CURRENT_SOURCE_DIR}/tools/rdps.py
-               ${CMAKE_CURRENT_SOURCE_DIR}/print.ps
-)
-
 if(UNIX)
        set(PLATFORM_SRC
                capture-pcap-util-unix.c
@@ -642,7 +630,6 @@ endif()
 
 set(WTAP_PLUGIN_SOURCES
        epan/plugins.c
-       epan/report_err.c
        epan/filesystem.c
 )
 
@@ -657,16 +644,9 @@ set(WIRESHARK_COMMON_SRC
        cfile.c
        cfutils.c
        clopts_common.c
-       disabled_protos.c
-       frame_data_sequence.c
-       packet-range.c
-       print.c
-       ps.c
+       frame_tvbuff.c
        svnversion.h
        sync_pipe_write.c
-       timestats.c
-       tap-megaco-common.c
-       tap-rtp-common.c
        version_info.c
 )
 
@@ -781,13 +761,9 @@ if( (BUILD_wireshark AND GTK_FOUND) OR (BUILD_qtshark AND QT_FOUND) )
                file.c
                fileset.c
                filters.c
-               g711.c
                iface_monitor.c
-               merge.c
                proto_hier_stats.c
                summary.c
-               tempfile.c
-               u3.c
                ws80211_utils.c
                ${SHARK_COMMON_CAPTURE_SRC}
                ${WIRESHARK_COMMON_SRC}
@@ -847,6 +823,7 @@ register_tap_files(tshark-tap-register.c
 
 if(BUILD_tshark)
        set(tshark_LIBS
+               ui
                ${LIBEPAN_LIBS}
                ${APPLE_CORE_FOUNDATION_LIBRARY}
                ${APPLE_SYSTEM_CONFIGURATION_LIBRARY}
@@ -854,10 +831,8 @@ if(BUILD_tshark)
        set(tshark_FILES
                capture_opts.c
                capture_sync.c
-               tempfile.c
                tshark-tap-register.c
                tshark.c
-               ui/util.c
                ${TSHARK_TAP_SRC}
                ${SHARK_COMMON_CAPTURE_SRC}
                ${WIRESHARK_COMMON_SRC}
@@ -951,7 +926,6 @@ if(BUILD_mergecap)
        )
        set(mergecap_FILES
                mergecap.c
-               merge.c
                svnversion.h
                ${WTAP_PLUGIN_SOURCES}
        )
@@ -1005,7 +979,6 @@ if(BUILD_editcap)
        set(editcap_FILES
                editcap.c
                epan/crypt/md5.c
-               epan/nstime.c
                ${WTAP_PLUGIN_SOURCES}
        )
        add_executable(editcap ${editcap_FILES})
@@ -1042,7 +1015,6 @@ if(BUILD_dumpcap AND PCAP_FOUND)
                pcapio.c
                ringbuffer.c
                sync_pipe_write.c
-               tempfile.c
                version_info.c
                ws80211_utils.c
                ${PLATFORM_SRC}