]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
ohi updates for cmake
authorsnorty <snorty@localhost.localdomain>
Wed, 10 Aug 2016 00:01:32 +0000 (20:01 -0400)
committersnorty <snorty@localhost.localdomain>
Wed, 10 Aug 2016 00:01:32 +0000 (20:01 -0400)
13 files changed:
src/CMakeLists.txt
src/decompress/CMakeLists.txt
src/detection/CMakeLists.txt
src/file_api/CMakeLists.txt
src/log/CMakeLists.txt
src/loggers/CMakeLists.txt
src/managers/CMakeLists.txt
src/mime/CMakeLists.txt
src/search_engines/CMakeLists.txt
src/service_inspectors/CMakeLists.txt
src/service_inspectors/Makefile.am
src/service_inspectors/nhttp_inspect/CMakeLists.txt
src/utils/CMakeLists.txt

index 5cba4fa09e981474d00092cba0ec29181a66a0c3..ca11b2511460b58bd20be11a2e98593c6f2c004a 100644 (file)
@@ -111,7 +111,6 @@ target_link_libraries( snort
     stream_file
     stream_paf
     mime
-    http_inspect
     imap
     pop
     smtp
index 7ab7f5267554527f376c7e129c2ecf54d458cffc..06fc68789e3cbd2380c38ff41ee96d9e7908986f 100644 (file)
@@ -1,15 +1,22 @@
 
-add_library (decompress STATIC
-    file_decomp.cc
+set( DECOMPRESS_INCLUDES
     file_decomp.h
-    file_decomp_pdf.cc
     file_decomp_pdf.h
-    file_decomp_swf.cc
     file_decomp_swf.h
 )
 
+add_library (decompress STATIC
+    ${DECOMPRESS_INCLUDES}
+    file_decomp.cc
+    file_decomp_pdf.cc
+    file_decomp_swf.cc
+)
 
 target_link_libraries(decompress
     log
     utils
 )
+
+install (FILES ${DECOMPRESS_INCLUDES}
+    DESTINATION "${INCLUDE_INSTALL_PATH}/decompress"
+)
index fd45b18e41f133b307b362455ad8a29e1cedfa2d..974b9d23486b377f76da157a4283fb3b87df5832 100644 (file)
@@ -1,7 +1,9 @@
 
 set (DETECTION_INCLUDES
+    detect.h
     detection_defines.h
     detection_options.h
+    detection_util.h
     pattern_match_data.h
     rule_option_types.h
     rules.h
@@ -12,10 +14,8 @@ set (DETECTION_INCLUDES
 add_library (detection STATIC
     ${DETECTION_INCLUDES}
     detect.cc
-    detect.h
     detection_options.cc
     detection_util.cc
-    detection_util.h
     fp_config.cc
     fp_config.h
     fp_create.cc
index 74c24d517500976d8c8f2f595904510dfe6e2dc2..665ad8410db203f8833105cdd63269f5ba5ce417 100644 (file)
@@ -1,33 +1,39 @@
 
+set( FILE_API_INCLUDES
+    file_api.h
+    file_config.h 
+    file_flows.h
+    file_identifier.h 
+    file_lib.h 
+    file_policy.h
+    file_service.h 
+)
 
 add_library ( file_api STATIC
+    ${FILE_API_INCLUDES}
     circular_buffer.cc 
     circular_buffer.h
-    file_api.h
     file_capture.cc
     file_capture.h
     file_config.cc 
-    file_config.h 
     file_enforcer.cc 
     file_enforcer.h 
     file_flows.cc 
-    file_flows.h
-    file_identifier.h 
     file_identifier.cc
     file_lib.cc 
-    file_lib.h 
     file_log.cc 
     file_mempool.cc
     file_mempool.h
     file_module.cc
     file_module.h
     file_policy.cc 
-    file_policy.h
     file_service.cc 
-    file_service.h 
     file_stats.cc 
     file_stats.h
 )
 
 target_link_libraries(file_api mime)
 
+install (FILES ${FILE_API_INCLUDES}
+    DESTINATION "${INCLUDE_INSTALL_PATH}/file_api"
+)
index 1506b0a0929254dd3d27ad7835d4210184cc572f..7ceb5ec16709fdb76752b988c66d1c180e4ef827 100644 (file)
@@ -1,15 +1,15 @@
 
-
 set (LOG_INCLUDES
+    log.h
     messages.h
     obfuscator.h
     text_log.h
+    unified2.h
 )
 
 add_library ( log STATIC
     ${LOG_INCLUDES}
     log.cc
-    log.h
     log_text.cc
     log_text.h
     messages.cc
index c930e4c847bb1ac7181ef56c6bb95ea5fb310195..431e9dc62e3d9632ac70ac518f27008df490cfe5 100644 (file)
@@ -14,7 +14,6 @@ set (PLUGIN_LIST
     log_hext.cc
     log_pcap.cc
     unified2.cc
-    unified2_common.h
 )
 
 if (LINUX)
@@ -44,7 +43,7 @@ else (STATIC_LOGGERS)
     add_shared_library(alert_syslog loggers alert_syslog.cc)
     add_shared_library(log_hext loggers log_hext.cc)
     add_shared_library(log_pcap loggers log_pcap.cc)
-    add_shared_library(unified2 loggers unified2.cc unified2_common.h)
+    add_shared_library(unified2 loggers unified2.cc)
 
 endif (STATIC_LOGGERS)
 
index 76a30b3cb66f453b658a244ba0da79d91ea20ba0..31a475d8b4944d3e24957d00fa11063246f0718c 100644 (file)
@@ -4,7 +4,12 @@ set (LUA_INCLUDES
     ${CMAKE_CURRENT_BINARY_DIR}/snort_plugin.lua
 )
 
-add_library( managers
+set( MANAGERS_INCLUDES
+    inspector_manager.h
+)
+
+add_library( managers STATIC
+    ${MANAGERS_INCLUDES}
     action_manager.h
     action_manager.cc
     codec_manager.h
@@ -12,7 +17,6 @@ add_library( managers
     event_manager.cc
     event_manager.h
     inspector_manager.cc
-    inspector_manager.h
     ips_manager.cc
     ips_manager.h
     lua_plugin_defs.h
@@ -43,6 +47,10 @@ target_link_libraries(managers
     ips_actions
 )
 
+install (FILES ${MANAGERS_INCLUDES}
+    DESTINATION "${INCLUDE_INSTALL_PATH}/managers"
+)
+
 add_custom_command (
     OUTPUT snort_plugin.lua
     COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ffi_wrap.sh ${CMAKE_CURRENT_SOURCE_DIR}/lua_plugin_defs.h > snort_plugin.lua
index dc55ce109369b53e526510379545272a2f76a5e7..c71405dd184f742264d5bc809545106119f695f5 100644 (file)
@@ -1,30 +1,36 @@
 
+set( MIME_INCLUDES
+    decode_b64.h
+    decode_base.h
+    decode_bit.h
+    decode_buffer.h
+    decode_qp.h
+    decode_uu.h
+    file_mime_config.h
+    file_mime_decode.h 
+    file_mime_log.h 
+    file_mime_paf.h 
+    file_mime_process.h 
+)
 
 add_library ( mime STATIC
+    ${MIME_INCLUDES}
     file_mime_config.cc 
-    file_mime_config.h
-    file_mime_decode.h 
     file_mime_decode.cc 
-    file_mime_log.h 
     file_mime_log.cc 
-    file_mime_paf.h 
     file_mime_paf.cc 
-    file_mime_process.h 
     file_mime_process.cc 
     decode_base.cc 
-    decode_base.h
     decode_b64.cc
-    decode_b64.h
     decode_bit.cc
-    decode_bit.h
     decode_buffer.cc
-    decode_buffer.h
     decode_qp.cc
-    decode_qp.h
     decode_uu.cc
-    decode_uu.h
     
 )
 
 target_link_libraries(mime file_api)
 
+install (FILES ${MIME_INCLUDES}
+    DESTINATION "${INCLUDE_INSTALL_PATH}/mime"
+)
index 5e3947dda7a266b1095507d530b061dd987d247b..3166be46f37593b61e44654895ebfde26eecfe24 100644 (file)
@@ -2,6 +2,7 @@
 set (SEARCH_ENGINE_INCLUDES
     pat_stats.h
     search_common.h
+    search_tool.h
 )
 
 set (ACSMX_SOURCES
@@ -45,7 +46,6 @@ set (SEARCH_ENGINE_SOURCES
     search_engines.cc
     search_engines.h
     search_tool.cc
-    search_tool.h
     ${BNFA_SOURCES}
     ${HYPER_SOURCES}
 )
index f7fc8f8a66e8ab87780c534fbee46672906d6e0a..6fcee8f4d8701a6cf25e4376f99ae84b7e5df4cb 100644 (file)
@@ -5,7 +5,6 @@ add_subdirectory(dnp3)
 add_subdirectory(dns)
 add_subdirectory(ftp_telnet)
 add_subdirectory(gtp)
-add_subdirectory(http_inspect)
 add_subdirectory(imap)
 add_subdirectory(modbus)
 add_subdirectory(nhttp_inspect)
@@ -44,6 +43,5 @@ add_library( service_inspectors STATIC
 )
 
 target_link_libraries( service_inspectors
-    http_inspect
     ${STATIC_INSECTOR_LIBS}
 )
index eb1fa2ecc11caf6cb62742957facd659d2fe5eb1..f69de989ec523111300d862d990b898251cef627 100644 (file)
@@ -9,7 +9,6 @@ service_inspectors.h
 #libservice_inspectors_a_LIBADD = \
 #back_orifice/libback_orifice.a \
 #ftp_telnet/libftp_telnet.a \
-#http_inspect/libhttp_inspect.a \
 #nhttp_inspect/libnhttp_inspect.a \
 #rpc_decode/librpc_decode.a
 #wizard/libwizard.a
index afc5da585c95c546adf70f642d3530b84bf35492..f499ff05c52fb627ea9c559c2c73c08629091497 100644 (file)
@@ -1,18 +1,7 @@
-# Version of the add_shared_library macro that does not set BUILDING_SO
-# FIXIT-L eliminate this macro when OHI retired
-macro (add_shared_library2 libname install_path)
-    set (sources ${ARGN})
-
-    add_library ( ${libname} SHARED ${sources} )
-
-    install (
-        TARGETS ${libname}
-        LIBRARY
-            DESTINATION "lib/${CMAKE_PROJECT_NAME}/${install_path}"
-    )
-endmacro (add_shared_library2)
 
 set (FILE_LIST
+    ips_nhttp.cc
+    ips_nhttp.h
     nhttp_inspect.cc
     nhttp_inspect.h
     nhttp_msg_section.cc
@@ -71,18 +60,13 @@ set (FILE_LIST
     nhttp_event_gen.h
 )
 
-# FIXIT-L merge two file lists when OHI retired
-set (IPS_FILE_LIST
-    ips_nhttp.cc
-    ips_nhttp.h
-)
-
 if (STATIC_INSPECTORS)
     add_library(nhttp_inspect STATIC ${FILE_LIST})
-# FIXIT-L eliminate this call when OHI retired
-    add_shared_library2(nhttp_inspect_opt inspectors ${IPS_FILE_LIST})
+
 else(STATIC_INSPECTORS)
     add_shared_library(nhttp_inspect inspectors ${FILE_LIST} ${IPS_FILE_LIST})
+
 endif(STATIC_INSPECTORS)
 
 add_subdirectory ( test )
+
index 28b50f57c72130bd1bfed94544fa59e25c912562..15f5ecb8b2fc7026f1f067469fe7d5726b210901 100644 (file)
@@ -11,17 +11,21 @@ if ( BUILD_SNPRINTF )
     )
 endif ( BUILD_SNPRINTF )
 
-
 set( UTIL_INCLUDES
     bitop.h
     dnet_header.h
+    kmap.h
     safec.h
     segment_mem.h
     sflsq.h
     sfmemcap.h
+    sfsnprintfappend.h
     snort_bounds.h
     stats.h
     util.h
+    util_jsnorm.h
+    util_unfold.h
+    util_utf.h
 )
 
 ADD_LIBRARY( utils STATIC
@@ -32,22 +36,17 @@ ADD_LIBRARY( utils STATIC
     dyn_array.cc
     dyn_array.h
     kmap.cc
-    kmap.h
     segment_mem.cc 
     sflsq.cc 
     sfmemcap.cc 
     sfsnprintfappend.cc 
-    sfsnprintfappend.h
     stats.cc
     util.cc
     util_jsnorm.cc 
-    util_jsnorm.h
     util_net.cc 
     util_net.h
-    util_utf.cc 
-    util_utf.h
     util_unfold.cc 
-    util_unfold.h
+    util_utf.cc 
 )
 
 target_link_libraries(utils