forked from osmocom/wireshark
Build the asn1 plugin. The only problem(?) is, that it is
name libasn1.so instead of asn1.so svn path=/trunk/; revision=29919
This commit is contained in:
parent
d55674757d
commit
24fb135ffe
|
@ -78,11 +78,12 @@ option(ENABLE_EXTRA_GCC_CHECKS "Do additional -W checks in GCC (disables -Werror
|
|||
option(ENABLE_AIRPCAP "Enable Airpcap support" ON)
|
||||
# todo
|
||||
option(ENABLE_STATIC "Build a static version of Wireshark" OFF)
|
||||
option(ENABLE_PLUGINS "Build with plugins" ON)
|
||||
|
||||
option(ENABLE_ADNS "Build with adns support" ON)
|
||||
option(ENABLE_PCRE "Build with pcre support" ON)
|
||||
option(ENABLE_PORTAUDIO "Build with portaudio support" ON)
|
||||
option(ENABLE_Z "Build with zlib compression support" ON)
|
||||
option(ENABLE_Z "Build with zlib compression support" ON)
|
||||
# todo wslua currently seems to be broken
|
||||
option(ENABLE_LUA "Build with lua dissector support" OFF)
|
||||
option(ENABLE_PYTHON "Build with python dissector support" ON)
|
||||
|
@ -96,7 +97,7 @@ option(ENABLE_CARES "Build with c_ares support" ON)
|
|||
option(ENABLE_KERBEROS "Build with Kerberos support" ON)
|
||||
|
||||
|
||||
set(WIRESHARK_CC_FLAGS
|
||||
set(WIRESHARK_C_FLAGS
|
||||
# todo Workaround for problem described below
|
||||
-doesntexist
|
||||
-O2
|
||||
|
@ -113,7 +114,7 @@ set(WIRESHARK_CC_FLAGS
|
|||
-Wformat-security
|
||||
)
|
||||
|
||||
set(WIRESHARK_EXTRA_CC_FLAGS
|
||||
set(WIRESHARK_EXTRA_C_FLAGS
|
||||
-pedantic
|
||||
-Woverflow
|
||||
-Wlogical-op
|
||||
|
@ -144,7 +145,7 @@ set(WIRESHARK_EXTRA_CC_FLAGS
|
|||
)
|
||||
|
||||
if(ENABLE_EXTRA_GCC_CHECKS)
|
||||
set(WIRESHARK_CC_FLAGS ${WIRESHARK_CC_FLAGS} ${WIRESHARK_EXTRA_CC_FLAGS})
|
||||
set(WIRESHARK_C_FLAGS ${WIRESHARK_C_FLAGS} ${WIRESHARK_EXTRA_C_FLAGS})
|
||||
endif()
|
||||
|
||||
add_definitions(
|
||||
|
@ -157,7 +158,7 @@ add_definitions(
|
|||
# This doesn't actually work because of some cache magic in
|
||||
# CHECK_C_SOURCE_COMPILES
|
||||
include(CheckCCompilerFlag)
|
||||
foreach(WS_C_FLAG ${WIRESHARK_CC_FLAGS})
|
||||
foreach(WS_C_FLAG ${WIRESHARK_C_FLAGS})
|
||||
message(STATUS "Flag pre: ${WS_C_FLAG}")
|
||||
check_c_compiler_flag(${WS_C_FLAG} WS_C_FLAG_VALID)
|
||||
if (${WS_C_FLAG_VALID})
|
||||
|
@ -316,6 +317,34 @@ test_big_endian(WORDS_BIGENDIAN)
|
|||
|
||||
set(DATAFILE_DIR "${CMAKE_INSTALL_PREFIX}/share/${CPACK_PACKAGE_NAME}")
|
||||
|
||||
if(ENABLE_PLUGINS)
|
||||
set(HAVE_PLUGINS 1)
|
||||
set(PLUGIN_DIR="${DATAFILE_DIR}/plugins/${CPACK_PACKAGE_VERSION}")
|
||||
set(PLUGIN_SRC_DIRS
|
||||
plugins/asn1
|
||||
# plugins/docsis
|
||||
# plugins/ethercat
|
||||
# plugins/giop
|
||||
# plugins/gryphon
|
||||
# plugins/irda
|
||||
# plugins/m2m
|
||||
# plugins/mate
|
||||
# plugins/opcua
|
||||
# plugins/profinet
|
||||
# plugins/sercosiii
|
||||
# plugins/stats_tree
|
||||
# plugins/unistim
|
||||
# plugins/wimax
|
||||
# plugins/wimaxasncp
|
||||
)
|
||||
else()
|
||||
set(PLUGIN_SRC_DIRS )
|
||||
endif()
|
||||
|
||||
foreach(PLUGIN_DIR ${PLUGIN_SRC_DIRS})
|
||||
add_subdirectory( ${PLUGIN_DIR} )
|
||||
endforeach()
|
||||
|
||||
#Platform specific
|
||||
if(UNIX)
|
||||
set(WS_VAR_IMPORT "extern")
|
||||
|
@ -337,12 +366,16 @@ if(WIN32)
|
|||
endif()
|
||||
|
||||
|
||||
add_subdirectory( codecs )
|
||||
add_subdirectory( epan )
|
||||
add_subdirectory( gtk )
|
||||
add_subdirectory( codecs )
|
||||
add_subdirectory( wiretap )
|
||||
add_subdirectory( wsutil )
|
||||
|
||||
if (ENABLE_PLUGINS)
|
||||
add_subdirectory( plugins )
|
||||
endif()
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/cmakeconfig.h.in ${CMAKE_BINARY_DIR}/config.h)
|
||||
|
||||
link_directories(
|
||||
|
@ -406,6 +439,12 @@ if(WIN32)
|
|||
)
|
||||
endif()
|
||||
|
||||
set(WTAP_PLUGIN_SOURCES
|
||||
epan/plugins.c
|
||||
epan/report_err.c
|
||||
epan/filesystem.c
|
||||
)
|
||||
|
||||
set(WIRESHARK_COMMON_SRC
|
||||
${PLATFORM_SRC}
|
||||
capture_errs.c
|
||||
|
@ -625,6 +664,7 @@ if(BUILD_capinfos)
|
|||
)
|
||||
set(capinfos_FILES
|
||||
capinfos.c
|
||||
${WTAP_PLUGIN_SOURCES}
|
||||
)
|
||||
add_executable(capinfos ${capinfos_FILES})
|
||||
target_link_libraries(capinfos ${capinfos_LIBS})
|
||||
|
@ -642,6 +682,7 @@ if(BUILD_editcap)
|
|||
editcap.c
|
||||
epan/crypt/crypt-md5.c
|
||||
epan/nstime.c
|
||||
${WTAP_PLUGIN_SOURCES}
|
||||
)
|
||||
add_executable(editcap ${editcap_FILES})
|
||||
target_link_libraries(editcap ${editcap_LIBS})
|
||||
|
|
|
@ -6,6 +6,12 @@
|
|||
/* Directory for data */
|
||||
#define DATAFILE_DIR "@CMAKE_INSTALL_PREFIX@/share/@CPACK_PACKAGE_NAME@"
|
||||
|
||||
/* Define to 1 if we want to enable plugins */
|
||||
#cmakedefine HAVE_PLUGINS 1
|
||||
|
||||
/* Directory where plugins reside */
|
||||
#define PLUGIN_DIR "${DATAFILE_DIR}/plugins/${CPACK_PACKAGE_VERSION}"
|
||||
|
||||
/* Link plugins statically into Wireshark */
|
||||
#cmakedefine ENABLE_STATIC 1
|
||||
|
||||
|
|
|
@ -39,15 +39,6 @@ link_directories(
|
|||
wspython
|
||||
)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sminmpec.c
|
||||
COMMAND ${PERL_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/make-sminmpec.pl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enterprise-numbers
|
||||
${CMAKE_CURRENT_BINARY_DIR}/sminmpec.c
|
||||
DEPENDS enterprise-numbers
|
||||
)
|
||||
|
||||
set(CRC_FILES
|
||||
crc/crc-16-plain.c
|
||||
)
|
||||
|
@ -1030,6 +1021,7 @@ set_source_files_properties(
|
|||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
# FIXME: Only the Python stuff has been implemented
|
||||
# Make this into a MACRO, to avoid duplication with plugins/.../
|
||||
#register.c: $(plugin_src) $(ALL_DISSECTORS_SRC) $(top_srcdir)/tools/make-dissector-reg \
|
||||
# $(top_srcdir)/tools/make-dissector-reg.py
|
||||
# @if test -n "$(PYTHON)"; then \
|
||||
|
@ -1041,7 +1033,7 @@ ADD_CUSTOM_COMMAND(
|
|||
# $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
|
||||
# dissectors $(plugin_src) $(ALL_DISSECTORS_SRC) ; \
|
||||
# fi
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/register.c
|
||||
OUTPUT register.c
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
|
@ -1068,12 +1060,14 @@ set(FTYPE_FILES
|
|||
)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sminmpec.c
|
||||
OUTPUT sminmpec.c
|
||||
COMMAND ${PERL_EXECUTABLE}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/make-sminmpec.pl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enterprise-numbers
|
||||
${CMAKE_CURRENT_BINARY_DIR}/sminmpec.c
|
||||
DEPENDS enterprise-numbers
|
||||
sminmpec.c
|
||||
DEPENDS
|
||||
enterprise-numbers
|
||||
make-sminmpec.pl
|
||||
)
|
||||
|
||||
set(LIBWIRESHARK_FILES
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
# CMakeLists.txt
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Wireshark - Network traffic analyzer
|
||||
# By Gerald Combs <gerald@wireshark.org>
|
||||
# Copyright 1998 Gerald Combs
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
|
||||
set(DISSECTOR_SRC
|
||||
packet-asn1.c
|
||||
)
|
||||
|
||||
set(PLUGIN_FILES
|
||||
plugin.c
|
||||
${DISSECTOR_SRC}
|
||||
)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
# FIXME: Only the Python stuff has been implemented
|
||||
# Make this into a MACRO, to avoid duplication with epan/
|
||||
#plugin.c: $(DISSECTOR_SRC) $(top_srcdir)/tools/make-dissector-reg \
|
||||
# $(top_srcdir)/tools/make-dissector-reg.py
|
||||
# @if test -n "$(PYTHON)"; then \
|
||||
# echo Making plugin.c with python ; \
|
||||
# $(PYTHON) $(top_srcdir)/tools/make-dissector-reg.py $(srcdir) \
|
||||
# plugin $(DISSECTOR_SRC) ; \
|
||||
# else \
|
||||
# echo Making plugin.c with shell script ; \
|
||||
# $(top_srcdir)/tools/make-dissector-reg $(srcdir) \
|
||||
# $(plugin_src) plugin $(DISSECTOR_SRC) ; \
|
||||
# fi
|
||||
|
||||
OUTPUT plugin.c
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
plugin
|
||||
${DISSECTOR_SRC}
|
||||
DEPENDS
|
||||
${DISSECTOR_SRC}
|
||||
${CMAKE_SOURCE_DIR}/tools/make-dissector-reg
|
||||
${CMAKE_SOURCE_DIR}/tools/make-dissector-reg.py
|
||||
)
|
||||
|
||||
# todo
|
||||
# Do I need any of this or is this handled by type MODULE?
|
||||
# asn1_la_LDFLAGS = -module -avoid-version
|
||||
|
||||
add_library(asn1 MODULE
|
||||
${PLUGIN_FILES}
|
||||
)
|
||||
|
Loading…
Reference in New Issue