1## $Id$ 2AUTOMAKE_OPTIONS=foreign no-dependencies 3 4INCLUDES = -I${top_builddir}/src/dynamic-preprocessors/include -I${top_builddir}/src/dynamic-preprocessors/ssl_common -I${top_srcdir}/src/dynamic-preprocessors/libs -I${top_builddir} 5 6if SO_WITH_STATIC_LIB 7 8preproclibdir=$(pkglibdir)/dynamic_preproc 9 10preproclib_LTLIBRARIES = libsf_dynamic_preproc.la 11libsf_dynamic_preproc_la_CFLAGS = -fPIC -DPIC -DDYNAMIC_PREPROC_CONTEXT 12libsf_dynamic_preproc_la_LDFLAGS = -static 13 14libsf_dynamic_preproc_la_SOURCES = \ 15ssl_common/ssl.c \ 16ssl_common/ssl_config.c \ 17ssl_common/ssl_inspect.c \ 18ssl_common/ssl_ha.c 19 20nodist_libsf_dynamic_preproc_la_SOURCES = \ 21include/sf_dynamic_preproc_lib.c \ 22include/sf_ip.c \ 23include/sfrt.c \ 24include/sfrt_dir.c \ 25include/sfrt_flat.c \ 26include/sfrt_flat_dir.c \ 27include/segment_mem.c \ 28include/mempool.c \ 29include/sf_sdlist.c \ 30include/sfPolicyUserData.c \ 31include/util_unfold.c \ 32include/sf_base64decode.c \ 33include/sf_email_attach_decode.c \ 34include/reg_test.c \ 35libs/sfparser.c 36 37preprocdir=$(pkgincludedir)/dynamic_preproc 38 39preproc_HEADERS = \ 40ssl_common/ssl.h \ 41ssl_common/ssl_include.h \ 42ssl_common/ssl_session.h \ 43ssl_common/ssl_config.h \ 44ssl_common/ssl_ha.h \ 45ssl_common/ssl_inspect.h 46 47nodist_preproc_HEADERS = \ 48libs/sfcommon.h \ 49libs/sf_preproc_info.h \ 50include/sf_snort_packet.h \ 51include/sf_protocols.h \ 52include/sf_snort_plugin_api.h \ 53include/sf_decompression.h \ 54include/sf_decompression_define.h \ 55include/sfPolicyUserData.h \ 56include/snort_debug.h \ 57include/snort_bounds.h \ 58include/cpuclock.h \ 59include/profiler.h \ 60include/bitop.h \ 61include/mempool.h \ 62include/sf_sdlist_types.h \ 63include/sf_ip.h \ 64include/sfrt_flat.h \ 65include/sfrt_flat_dir.h \ 66include/segment_mem.h \ 67include/sf_dynamic_common.h \ 68include/sf_dynamic_engine.h \ 69include/sf_dynamic_define.h \ 70include/sf_dynamic_meta.h \ 71include/sf_dynamic_preprocessor.h \ 72include/sf_dynamic_preproc_lib.h \ 73include/ipv6_port.h \ 74include/sfPolicy.h \ 75include/sfrt.h \ 76include/sfrt_dir.h \ 77include/sfrt_trie.h \ 78include/obfuscation.h \ 79include/packet_time.h \ 80include/session_api.h \ 81include/stream_api.h \ 82include/str_search.h \ 83include/preprocids.h \ 84include/sfcontrol.h \ 85include/sidechannel_define.h \ 86include/idle_processing.h \ 87include/sf_seqnums.h \ 88include/perf_indicators.h \ 89include/mpse_methods.h \ 90include/file_api.h \ 91include/reload_api.h \ 92include/reg_test.h \ 93include/memory_stats.h 94 95preproclib_LTLIBRARIES += libsf_dynamic_utils.la 96 97libsf_dynamic_utils_la_CFLAGS = -fPIC -DPIC -DDYNAMIC_PREPROC_CONTEXT 98libsf_dynamic_utils_la_LDFLAGS = -static 99 100if FEAT_OPEN_APPID 101nodist_libsf_dynamic_utils_la_SOURCES = include/sfprimetable.c include/sfxhash.c include/sfmemcap.c include/sfmemcap.h \ 102 include/sfghash.c include/sfhashfcn.c include/sflsq.c include/md5.c 103 104nodist_preproc_HEADERS += include/appId.h include/appIdApi.h include/thirdparty_appid_types.h \ 105 include/thirdparty_appid_api.h include/dns_defs.h 106else 107nodist_libsf_dynamic_utils_la_SOURCES = include/sfmemcap.c include/sfmemcap.h 108endif 109 110if BUILD_SNORT_RELOAD 111#appdata_adjuster 112nodist_libsf_dynamic_utils_la_SOURCES += include/appdata_adjuster.c include/sfxhash.c include/sfhashfcn.c include/sfmemcap.c include/sfprimetable.c include/reg_test.h include/reg_test.c 113 114nodist_preproc_HEADERS += include/appdata_adjuster.h 115endif 116 117all-local: $(LTLIBRARIES) 118 $(MAKE) DESTDIR=`pwd`/build install-preproclibLTLIBRARIES 119 120endif 121 122BUILT_SOURCES = \ 123 include/snort_bounds.h \ 124 include/snort_debug.h \ 125 include/preprocids.h \ 126 include/profiler.h \ 127 include/cpuclock.h \ 128 include/sf_dynamic_common.h \ 129 include/sf_dynamic_engine.h \ 130 include/sf_dynamic_define.h \ 131 include/sf_dynamic_meta.h \ 132 include/sf_dynamic_preprocessor.h \ 133 include/sf_dynamic_preproc_lib.c \ 134 include/sf_dynamic_preproc_lib.h \ 135 include/sfghash.h \ 136 include/sfhashfcn.h \ 137 include/bitop.h \ 138 include/sf_ip.h \ 139 include/sf_ip.c \ 140 include/sf_ipvar.h \ 141 include/sf_vartable.h \ 142 include/ipv6_port.h \ 143 include/sfsnort_dynamic_detection_lib.c \ 144 include/sfsnort_dynamic_detection_lib.h \ 145 include/sf_snort_packet.h \ 146 include/sf_protocols.h \ 147 include/sf_snort_plugin_api.h \ 148 include/sf_decompression.h \ 149 include/sf_decompression_define.h \ 150 include/pcap_pkthdr32.h \ 151 include/session_api.h \ 152 include/stream_api.h \ 153 include/str_search.h \ 154 include/sf_types.h \ 155 include/sfrt.h \ 156 include/sfrt.c \ 157 include/sfrt_dir.h \ 158 include/sfrt_dir.c \ 159 include/sfrt_flat.h \ 160 include/sfrt_flat.c \ 161 include/sfrt_flat_dir.h \ 162 include/sfrt_flat_dir.c \ 163 include/sfrt_trie.h \ 164 include/segment_mem.h \ 165 include/segment_mem.c \ 166 include/mempool.h \ 167 include/mempool.c \ 168 include/sfmemcap.h \ 169 include/sfmemcap.c \ 170 include/sf_sdlist.h \ 171 include/sf_sdlist_types.h \ 172 include/sf_sdlist.c \ 173 include/sfPolicyUserData.c \ 174 include/sfPolicyUserData.h \ 175 include/sfPolicy.h \ 176 include/util_unfold.h \ 177 include/util_unfold.c \ 178 include/sf_base64decode.h \ 179 include/sf_base64decode.c \ 180 include/sf_email_attach_decode.h \ 181 include/sf_email_attach_decode.c \ 182 include/treenodes.h \ 183 include/signature.h \ 184 include/plugin_enum.h \ 185 include/obfuscation.h \ 186 include/packet_time.h \ 187 include/rule_option_types.h \ 188 include/event.h \ 189 include/Unified2_common.h \ 190 include/sfcontrol.h \ 191 include/sidechannel_define.h \ 192 include/idle_processing.h \ 193 include/sf_seqnums.h \ 194 include/perf_indicators.h \ 195 include/file_api.h \ 196 include/file_mail_common.h \ 197 include/mpse_methods.h \ 198 include/sfdebug.h \ 199 include/sip_common.h \ 200 include/cip_common.h \ 201 include/reload_api.h \ 202 include/reg_test.h \ 203 include/reg_test.c \ 204 ssl_common/ssl.h \ 205 ssl_common/ssl.c \ 206 ssl_common/ssl_include.h \ 207 ssl_common/ssl_config.h \ 208 ssl_common/ssl_config.c \ 209 ssl_common/ssl_session.h \ 210 ssl_common/ssl_inspect.h \ 211 ssl_common/ssl_inspect.c \ 212 ssl_common/ssl_ha.h \ 213 ssl_common/ssl_ha.c \ 214 libs/sfparser.c \ 215 libs/sfcommon.h \ 216 include/memory_stats.h 217 218if FEAT_OPEN_APPID 219BUILT_SOURCES += include/appId.h include/appIdApi.h include/thirdparty_appid_types.h \ 220 include/thirdparty_appid_api.h \ 221 include/sfprimetable.h include/sfprimetable.c include/sfxhash.h \ 222 include/sfxhash.c \ 223 include/sfghash.c include/sfhashfcn.c include/sflsq.h include/sflsq.c \ 224 include/md5.h include/md5.c \ 225 include/dns_defs.h 226endif 227 228if BUILD_SNORT_RELOAD 229BUILT_SOURCES += include/sfprimetable.h \ 230 include/sfprimetable.c \ 231 include/sfmemcap.h \ 232 include/sfmemcap.c \ 233 include/sfhashfcn.h \ 234 include/sfhashfcn.c \ 235 include/sfxhash.h \ 236 include/sfxhash.c \ 237 include/appdata_adjuster.h \ 238 include/appdata_adjuster.c 239endif 240 241sed_ipv6_headers = \ 242 sed -e "s/->iph->ip_src/->ip4_header->source/" \ 243 -e "s/->iph->ip_dst/->ip4_header->destination/" \ 244 -e "s/->iph->/->ip4_header->/" \ 245 -e "s/->iph$$/->ip4_header/" \ 246 -e "s/orig_iph/orig_ipv4h/" \ 247 -e "s/ip_verhl/version_headerlength/" \ 248 -e "s/ip_tos/type_service/" \ 249 -e "s/ip_len/data_length/" \ 250 -e "s/ip_id/identifier/" \ 251 -e "s/ip_off/offset/" \ 252 -e "s/ip_ttl/time_to_live/" \ 253 -e "s/ip_proto/proto/" \ 254 -e "s/ip_csum/checksum/" \ 255 $$dst_header.new > $$dst_header 256 257massage_ipv6_headers = \ 258 mkdir -p include; \ 259 mkdir -p build; \ 260 if test -f $$dst_header; then \ 261 x=`diff $$src_header $$dst_header.new >> /dev/null`; \ 262 if test "$$x" != "0"; then \ 263 echo "Updating " $$dst_header; \ 264 cp $$src_header $$dst_header.new; \ 265 $(sed_ipv6_headers); \ 266 fi \ 267 else \ 268 echo "Updating " $$dst_header; \ 269 cp $$src_header $$dst_header.new; \ 270 $(sed_ipv6_headers); \ 271 fi 272 273sed_headers = \ 274 sed -e "s/Packet /SFSnortPacket /" \ 275 -e "s/SnortPktHdr /SFSnortPktHdr /" \ 276 -e "s/decode\.h/sf_snort_packet.h/" \ 277 -e "/sfportobject\.h/d" \ 278 -e "s/PortObject \*/void */g" \ 279 $$dst_header.new > $$dst_header 280 281massage_headers = \ 282 mkdir -p include; \ 283 mkdir -p build; \ 284 if test -f $$dst_header; then \ 285 x=`diff $$src_header $$dst_header.new.new >> /dev/null`; \ 286 if test "$$x" != "0"; then \ 287 echo "Updating " $$dst_header; \ 288 cp $$src_header $$dst_header.new; \ 289 $(sed_headers); \ 290 fi \ 291 else \ 292 echo "Updating " $$dst_header; \ 293 cp $$src_header $$dst_header.new; \ 294 $(sed_headers); \ 295 fi 296 297sed_debug_header = \ 298 sed -e "s/DebugMessageFile = /*_dpd.debugMsgFile = /" \ 299 -e "s/DebugMessageLine = /*_dpd.debugMsgLine = /" \ 300 -e "s/; DebugMessageFunc$$/; _dpd.debugMsg/" \ 301 -e "s/; DebugWideMessageFunc$$/; _dpd.debugWideMsg/" \ 302 $$dst_header.new > $$dst_header 303 304copy_debug_header = \ 305 mkdir -p include; \ 306 mkdir -p build; \ 307 if test -f $$dst_header; then \ 308 x=`diff $$src_header $$dst_header.new.new >> /dev/null`; \ 309 if test "$$x" != "0"; then \ 310 echo "Updating " $$dst_header; \ 311 cp $$src_header $$dst_header.new; \ 312 $(sed_debug_header); \ 313 fi \ 314 else \ 315 echo "Updating " $$dst_header; \ 316 cp $$src_header $$dst_header.new; \ 317 $(sed_debug_header); \ 318 fi 319 320copy_error_message = \ 321 if test -f $$dst_header; then \ 322 sed -e "s/ErrorMessage/_dpd.errMsg/" \ 323 -e "s/LogMessage/_dpd.logMsg/" \ 324 -e "s/FatalError/_dpd.fatalMsg/" \ 325 -e "/util.h/d" \ 326 -e "/snort.h/d" \ 327 $$dst_header > $$dst_header.new; \ 328 mv -f $$dst_header.new $$dst_header; \ 329 fi 330 331copy_no_static_hash = \ 332 if test -f $$dst_header; then \ 333 echo "Updating " $$dst_header; \ 334 sed -e "s/\#ifndef MODULUS_HASH/\#ifdef STATIC_HASH/" \ 335 $$dst_header > $$dst_header.new; \ 336 mv -f $$dst_header.new $$dst_header; \ 337 fi 338 339replace_policy_globals = \ 340 if test -f $$dst_header; then \ 341 sed -e "/SharedObjectAddStarts/d" \ 342 -e "/SharedObjectAddEnds/d" \ 343 -e "/SharedObjectDeleteBegins/,/SharedObjectDeleteEnds/d" \ 344 -e "s/getDefaultPolicy()/_dpd.getDefaultPolicy()/" \ 345 -e "s/SnortStrnStr/_dpd.SnortStrnStr/" \ 346 -e "s/SnortStrncpy/_dpd.SnortStrncpy/" \ 347 -e "s/ReloadAdjustRegister/_dpd.reloadAdjustRegister/" \ 348 -e "s/session_api/_dpd.sessionAPI/" \ 349 $$dst_header > $$dst_header.new; \ 350 mv -f $$dst_header.new $$dst_header; \ 351 fi 352 353copy_headers = \ 354 mkdir -p include; \ 355 mkdir -p build; \ 356 if test -f $$dst_header; then \ 357 x=`diff $$src_header $$dst_header.new.new >> /dev/null`; \ 358 if test "$$x" != "0"; then \ 359 echo "Updating " $$dst_header; \ 360 cp $$src_header $$dst_header; \ 361 fi \ 362 else \ 363 echo "Updating " $$dst_header; \ 364 cp $$src_header $$dst_header; \ 365 fi 366 367sed_treenode_header = \ 368 sed -f $(srcdir)/treenodes.sed $$dst_header.new > $$dst_header 369 370copy_treenode_header = \ 371 mkdir -p include; \ 372 mkdir -p build; \ 373 if test -f $$dst_header; then \ 374 x=`diff $$src_header $$dst_header.new.new >> /dev/null`; \ 375 if test "$$x" != "0"; then \ 376 echo "Updating " $$dst_header; \ 377 cp $$src_header $$dst_header.new; \ 378 $(sed_treenode_header); \ 379 fi \ 380 else \ 381 echo "Updating " $$dst_header; \ 382 cp $$src_header $$dst_header.new; \ 383 $(sed_treenode_header); \ 384 fi 385 386# From main src tree 387include/snort_debug.h: $(srcdir)/../snort_debug.h 388 @src_header=$?; dst_header=$@; $(copy_debug_header) 389 390include/preprocids.h: $(srcdir)/../preprocids.h 391 @src_header=$?; dst_header=$@; $(copy_headers) 392 393include/profiler.h: $(srcdir)/../profiler.h 394 @src_header=$?; dst_header=$@; $(copy_headers) 395 396include/cpuclock.h: $(srcdir)/../cpuclock.h 397 @src_header=$?; dst_header=$@; $(copy_headers) 398 399include/pcap_pkthdr32.h: $(srcdir)/../pcap_pkthdr32.h 400 @src_header=$?; dst_header=$@; $(copy_headers) 401 402include/snort_bounds.h: $(srcdir)/../snort_bounds.h 403 @src_header=$?; dst_header=$@; $(copy_headers) 404 405include/ipv6_port.h: $(srcdir)/../ipv6_port.h 406 @src_header=$?; dst_header=$@; $(massage_ipv6_headers) 407 408include/sf_types.h: $(srcdir)/../sf_types.h 409 @src_header=$?; dst_header=$@; $(copy_headers) 410 411include/obfuscation.h: $(srcdir)/../obfuscation.h 412 @src_header=$?; dst_header=$@; $(massage_headers) 413 414include/packet_time.h: $(srcdir)/../packet_time.h 415 @src_header=$?; dst_header=$@; $(massage_headers) 416 417include/rule_option_types.h: $(srcdir)/../rule_option_types.h 418 @src_header=$?; dst_header=$@; $(copy_headers) 419 420include/event.h: $(srcdir)/../event.h 421 @src_header=$?; dst_header=$@; $(copy_headers) 422 423include/sidechannel_define.h: $(srcdir)/../side-channel/sidechannel_define.h 424 @src_header=$?; dst_header=$@; $(massage_headers) 425 426include/reload_api.h: $(srcdir)/../reload_api.h 427 @src_header=$?; dst_header=$@; $(massage_headers) 428 429include/reg_test.h: $(srcdir)/../reg_test.h 430 @src_header=$?; dst_header=$@; $(copy_headers) 431 432include/reg_test.c: $(srcdir)/../reg_test.c 433 @src_header=$?; dst_header=$@; $(copy_headers) 434 435# From dynamic-plugins 436include/sf_dynamic_common.h: $(srcdir)/../dynamic-plugins/sf_dynamic_common.h 437 @src_header=$?; dst_header=$@; $(copy_headers) 438 439include/sf_dynamic_engine.h: $(srcdir)/../dynamic-plugins/sf_dynamic_engine.h 440 @src_header=$?; dst_header=$@; $(copy_headers) 441 442include/sf_dynamic_define.h: $(srcdir)/../dynamic-plugins/sf_dynamic_define.h 443 @src_header=$?; dst_header=$@; $(copy_headers) 444 445include/sf_dynamic_meta.h: $(srcdir)/../dynamic-plugins/sf_dynamic_meta.h 446 @src_header=$?; dst_header=$@; $(copy_headers) 447 448include/sf_dynamic_preprocessor.h: $(srcdir)/../dynamic-plugins/sf_dynamic_preprocessor.h 449 @src_header=$?; dst_header=$@; $(massage_headers) 450 451# From dynamic-plugins/sf_preproc_example 452include/sf_dynamic_preproc_lib.c: $(srcdir)/../dynamic-plugins/sf_preproc_example/sf_dynamic_preproc_lib.c 453 @src_header=$?; dst_header=$@; $(copy_headers) 454 455include/sf_dynamic_preproc_lib.h: $(srcdir)/../dynamic-plugins/sf_preproc_example/sf_dynamic_preproc_lib.h 456 @src_header=$?; dst_header=$@; $(copy_headers) 457 458# From Utils 459include/sfghash.h: $(srcdir)/../sfutil/sfghash.h 460 @src_header=$?; dst_header=$@; $(copy_headers) 461 462include/sfhashfcn.h: $(srcdir)/../sfutil/sfhashfcn.h 463 @src_header=$?; dst_header=$@; $(copy_headers) 464 465include/bitop.h: $(srcdir)/../sfutil/bitop.h 466 @src_header=$?; dst_header=$@; $(copy_headers) 467 468include/sf_ip.h: $(srcdir)/../sfutil/sf_ip.h 469 @src_header=$?; dst_header=$@; $(copy_headers) 470 471include/sf_ip.c: $(srcdir)/../sfutil/sf_ip.c 472 @src_header=$?; dst_header=$@; $(copy_headers) 473 474include/sf_ipvar.h: $(srcdir)/../sfutil/sf_ipvar.h 475 @src_header=$?; dst_header=$@; $(copy_headers) 476 477include/sf_vartable.h: $(srcdir)/../sfutil/sf_vartable.h 478 @src_header=$?; dst_header=$@; $(copy_headers) 479 480include/sfrt.h: $(srcdir)/../sfutil/sfrt.h 481 @src_header=$?; dst_header=$@; $(copy_headers) 482 483include/sfrt.c: $(srcdir)/../sfutil/sfrt.c 484 @src_header=$?; dst_header=$@; $(copy_headers) 485 486include/sfrt_dir.h: $(srcdir)/../sfutil/sfrt_dir.h 487 @src_header=$?; dst_header=$@; $(copy_headers) 488 489include/sfrt_dir.c: $(srcdir)/../sfutil/sfrt_dir.c 490 @src_header=$?; dst_header=$@; $(copy_headers) 491 492include/sfrt_flat.h: $(srcdir)/../sfutil/sfrt_flat.h 493 @src_header=$?; dst_header=$@; $(copy_headers) 494 495include/sfrt_flat.c: $(srcdir)/../sfutil/sfrt_flat.c 496 @src_header=$?; dst_header=$@; $(copy_headers) 497 498include/sfrt_flat_dir.h: $(srcdir)/../sfutil/sfrt_flat_dir.h 499 @src_header=$?; dst_header=$@; $(copy_headers) 500 501include/sfrt_flat_dir.c: $(srcdir)/../sfutil/sfrt_flat_dir.c 502 @src_header=$?; dst_header=$@; $(copy_headers) 503 504include/sfrt_trie.h: $(srcdir)/../sfutil/sfrt_trie.h 505 @src_header=$?; dst_header=$@; $(copy_headers) 506 507include/segment_mem.c: $(srcdir)/../sfutil/segment_mem.c 508 @src_header=$?; dst_header=$@; $(copy_headers) 509 510include/segment_mem.h: $(srcdir)/../sfutil/segment_mem.h 511 @src_header=$?; dst_header=$@; $(copy_headers) 512 513include/mempool.h: $(srcdir)/../mempool.h 514 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 515 516include/mempool.c: $(srcdir)/../mempool.c 517 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 518 519include/sfmemcap.h: $(srcdir)/../sfutil/sfmemcap.h 520 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 521 522include/sfmemcap.c: $(srcdir)/../sfutil/sfmemcap.c 523 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 524 525include/sf_sdlist.h: $(srcdir)/../sf_sdlist.h 526 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 527 528include/sf_sdlist_types.h: $(srcdir)/../sf_sdlist_types.h 529 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 530 531include/sf_sdlist.c: $(srcdir)/../sf_sdlist.c 532 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 533 534include/sfPolicyUserData.c: $(srcdir)/../sfutil/sfPolicyUserData.c 535 @src_header=$?; dst_header=$@; $(copy_headers); $(replace_policy_globals) 536 537include/sfPolicyUserData.h: $(srcdir)/../sfutil/sfPolicyUserData.h 538 @src_header=$?; dst_header=$@; $(copy_headers); $(replace_policy_globals) 539 540include/sfPolicy.h: $(srcdir)/../sfutil/sfPolicy.h 541 @src_header=$?; dst_header=$@; $(copy_headers); $(replace_policy_globals) 542 543include/util_unfold.h: $(srcdir)/../sfutil/util_unfold.h 544 @src_header=$?; dst_header=$@; $(copy_headers) 545 546include/util_unfold.c: $(srcdir)/../sfutil/util_unfold.c 547 @src_header=$?; dst_header=$@; $(copy_headers) 548 549include/sf_base64decode.h: $(srcdir)/../sfutil/sf_base64decode.h 550 @src_header=$?; dst_header=$@; $(copy_headers) 551 552include/sf_base64decode.c: $(srcdir)/../sfutil/sf_base64decode.c 553 @src_header=$?; dst_header=$@; $(copy_headers) 554 555include/sf_email_attach_decode.h: $(srcdir)/../sfutil/sf_email_attach_decode.h 556 @src_header=$?; dst_header=$@; $(copy_headers) 557 558include/sf_email_attach_decode.c: $(srcdir)/../sfutil/sf_email_attach_decode.c 559 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 560 561include/Unified2_common.h: $(srcdir)/../sfutil/Unified2_common.h 562 @src_header=$?; dst_header=$@; $(copy_headers) 563 564# From dynamic-plugins/sf_engine/examples 565include/sfsnort_dynamic_detection_lib.c: $(srcdir)/../dynamic-plugins/sf_engine/examples/sfsnort_dynamic_detection_lib.c 566 @src_header=$?; dst_header=$@; $(copy_headers) 567 568include/sfsnort_dynamic_detection_lib.h: $(srcdir)/../dynamic-plugins/sf_engine/examples/sfsnort_dynamic_detection_lib.h 569 @src_header=$?; dst_header=$@; $(copy_headers) 570 571# From dynamic-plugins/sf_engine 572include/sf_snort_packet.h: $(srcdir)/../dynamic-plugins/sf_engine/sf_snort_packet.h 573 @src_header=$?; dst_header=$@; $(copy_headers) 574 575include/sf_protocols.h: $(srcdir)/../sf_protocols.h 576 @src_header=$?; dst_header=$@; $(copy_headers) 577 578include/sf_snort_plugin_api.h: $(srcdir)/../dynamic-plugins/sf_engine/sf_snort_plugin_api.h 579 @src_header=$?; dst_header=$@; $(copy_headers) 580 581include/sf_decompression.h: $(srcdir)/../dynamic-plugins/sf_engine/sf_decompression.h 582 @src_header=$?; dst_header=$@; $(copy_headers) 583 584include/sf_decompression_define.h: $(srcdir)/../dynamic-plugins/sf_decompression_define.h 585 @src_header=$?; dst_header=$@; $(copy_headers) 586 587# Session API/String Searching, massage it to use SFSnortPacket 588include/session_api.h: $(srcdir)/../preprocessors/session_api.h 589 @src_header=$?; dst_header=$@; $(massage_headers) 590 591# Stream API/String Searching, massage it to use SFSnortPacket 592include/stream_api.h: $(srcdir)/../preprocessors/stream_api.h 593 @src_header=$?; dst_header=$@; $(massage_headers) 594 595include/str_search.h: $(srcdir)/../preprocessors/str_search.h 596 @src_header=$?; dst_header=$@; $(massage_headers) 597 598include/treenodes.h: $(srcdir)/../treenodes.h 599 @src_header=$?; dst_header=$@; $(copy_treenode_header) 600 601include/signature.h: $(srcdir)/../signature.h 602 @src_header=$?; dst_header=$@; $(copy_treenode_header) 603 604include/plugin_enum.h: $(srcdir)/../plugin_enum.h 605 @src_header=$?; dst_header=$@; $(copy_headers) 606 607include/sfcontrol.h: $(top_srcdir)/src/control/sfcontrol.h 608 @src_header=$?; dst_header=$@; $(copy_headers) 609 610include/idle_processing.h: $(top_srcdir)/src/idle_processing.h 611 @src_header=$?; dst_header=$@; $(copy_headers) 612 613include/sf_seqnums.h: $(top_srcdir)/src/sfutil/sf_seqnums.h 614 @src_header=$?; dst_header=$@; $(copy_headers) 615 616include/perf_indicators.h: $(srcdir)/../preprocessors/perf_indicators.h 617 @src_header=$?; dst_header=$@; $(copy_headers) 618 619include/file_api.h: $(top_srcdir)/src/file-process/file_api.h 620 @src_header=$?; dst_header=$@; $(copy_headers) 621 622include/file_mail_common.h: $(top_srcdir)/src/file-process/file_mail_common.h 623 @src_header=$?; dst_header=$@; $(copy_headers) 624 625include/sfdebug.h: $(srcdir)/../sfutil/sfdebug.h 626 @src_header=$?; dst_header=$@; $(copy_headers) 627 628include/mpse_methods.h: $(srcdir)/../sfutil/mpse_methods.h 629 @src_header=$?; dst_header=$@; $(copy_headers) 630 631include/sip_common.h: $(srcdir)/../preprocessors/sip_common.h 632 @src_header=$?; dst_header=$@; $(copy_headers) 633 634include/cip_common.h: $(srcdir)/../preprocessors/cip_common.h 635 @src_header=$?; dst_header=$@; $(copy_headers) 636 637include/appId.h: $(srcdir)/appid/appId.h 638 @src_header=$?; dst_header=$@; $(copy_headers) 639 640if FEAT_OPEN_APPID 641include/appIdApi.h: $(srcdir)/../appIdApi.h 642 @src_header=$?; dst_header=$@; $(copy_headers) 643 644include/thirdparty_appid_types.h: $(srcdir)/appid/thirdparty_appid_types.h 645 @src_header=$?; dst_header=$@; $(copy_headers) 646 647include/thirdparty_appid_api.h: $(srcdir)/appid/thirdparty_appid_api.h 648 @src_header=$?; dst_header=$@; $(copy_headers) 649 650include/dns_defs.h: $(srcdir)/appid/dns_defs.h 651 @src_header=$?; dst_header=$@; $(copy_headers) 652 653include/md5.c: $(srcdir)/../sfutil/md5.c 654 @src_header=$?; dst_header=$@; $(copy_headers) 655 656include/md5.h: $(srcdir)/../sfutil/md5.h 657 @src_header=$?; dst_header=$@; $(copy_headers) 658 659include/sfprimetable.h: $(srcdir)/../sfutil/sfprimetable.h 660 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 661 662include/sfprimetable.c: $(srcdir)/../sfutil/sfprimetable.c 663 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 664 665include/sfxhash.h: $(srcdir)/../sfutil/sfxhash.h 666 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 667 668include/sfxhash.c: $(srcdir)/../sfutil/sfxhash.c 669 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 670 671include/sfghash.c: $(srcdir)/../sfutil/sfghash.c 672 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 673 674include/sfhashfcn.c: $(srcdir)/../sfutil/sfhashfcn.c 675 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals); $(copy_no_static_hash) 676 677include/sflsq.h: $(srcdir)/../sfutil/sflsq.h 678 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 679 680include/sflsq.c: $(srcdir)/../sfutil/sflsq.c 681 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 682else 683if BUILD_SNORT_RELOAD 684include/sfxhash.h: $(srcdir)/../sfutil/sfxhash.h 685 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 686 687include/sfxhash.c: $(srcdir)/../sfutil/sfxhash.c 688 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 689 690include/sfprimetable.h: $(srcdir)/../sfutil/sfprimetable.h 691 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 692 693include/sfprimetable.c: $(srcdir)/../sfutil/sfprimetable.c 694 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 695 696include/sfhashfcn.c: $(srcdir)/../sfutil/sfhashfcn.c 697 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals); $(copy_no_static_hash) 698endif 699endif 700 701if BUILD_SNORT_RELOAD 702include/appdata_adjuster.c: $(srcdir)/../reload-adjust/appdata_adjuster.c 703 @src_header=$?; dst_header=$@; $(copy_headers); $(copy_error_message); $(replace_policy_globals) 704 705include/appdata_adjuster.h: $(srcdir)/../reload-adjust/appdata_adjuster.h 706 @src_header=$?; dst_header=$@; $(copy_headers) 707endif 708 709include/memory_stats.h: $(srcdir)/../memory_stats.h 710 @src_header=$?; dst_header=$@; $(copy_headers) 711 712if FEAT_FILE_INSPECT 713FILE_INSPECT_DIR = file 714endif 715 716SUBDIRS = . libs ftptelnet pop imap smtp ssh dns ssl dcerpc2 sdf sip reputation gtp modbus dnp3 s7commplus $(FILE_INSPECT_DIR) 717 718if FEAT_OPEN_APPID 719SUBDIRS += appid 720endif 721 722clean-local: 723 rm -rf include build 724 725EXTRA_DIST = \ 726dynamic_preprocessors.vcxproj \ 727dynamic_preprocessors.dsp \ 728sf_dynamic_initialize/sf_dynamic_initialize.vcxproj \ 729sf_dynamic_initialize/sf_dynamic_initialize.dsp \ 730treenodes.sed 731 732srcinstdir = $(exec_prefix)/src/snort_dynamicsrc 733 734exported_files = \ 735include/sf_dynamic_common.h \ 736include/sf_dynamic_define.h \ 737include/sf_dynamic_engine.h \ 738include/sf_dynamic_meta.h \ 739include/sf_dynamic_preprocessor.h \ 740include/sf_dynamic_preproc_lib.h \ 741include/sf_dynamic_preproc_lib.c \ 742include/sf_ip.h \ 743include/sf_snort_packet.h \ 744include/sf_protocols.h \ 745include/sf_snort_plugin_api.h \ 746include/sf_decompression.h \ 747include/sf_decompression_define.h \ 748include/sf_types.h \ 749include/sfsnort_dynamic_detection_lib.h \ 750include/sfsnort_dynamic_detection_lib.c \ 751include/pcap_pkthdr32.h \ 752include/str_search.h \ 753include/session_api.h \ 754include/stream_api.h \ 755include/snort_debug.h \ 756include/profiler.h \ 757include/sfghash.h \ 758include/sfhashfcn.h \ 759include/sfmemcap.h \ 760include/bitop.h \ 761include/preprocids.h \ 762include/sfPolicyUserData.h \ 763include/util_unfold.h \ 764include/util_unfold.c \ 765include/sf_base64decode.h \ 766include/sf_base64decode.c \ 767include/sf_email_attach_decode.h \ 768include/sf_email_attach_decode.c \ 769include/treenodes.h \ 770include/signature.h \ 771include/plugin_enum.h \ 772include/sfPolicyUserData.c \ 773include/obfuscation.h \ 774include/sidechannel_define.h \ 775include/rule_option_types.h \ 776include/event.h \ 777include/Unified2_common.h \ 778include/sfcontrol.h \ 779include/idle_processing.h \ 780include/sf_seqnums.h \ 781include/perf_indicators.h \ 782include/file_api.h \ 783include/file_mail_common.h \ 784include/mpse_methods.h \ 785include/sfdebug.h \ 786include/sip_common.h \ 787include/cip_common.h \ 788include/reload_api.h \ 789include/reg_test.h \ 790include/reg_test.c \ 791ssl_common/ssl.h \ 792ssl_common/ssl.c \ 793ssl_common/ssl_include.h \ 794ssl_common/ssl_config.h \ 795ssl_common/ssl_config.c \ 796ssl_common/ssl_session.h \ 797ssl_common/ssl_inspect.h \ 798ssl_common/ssl_inspect.c \ 799ssl_common/ssl_ha.h \ 800ssl_common/ssl_ha.c \ 801libs/sfparser.c \ 802include/memory_stats.h 803 804if FEAT_OPEN_APPID 805exported_files += include/appId.h include/appIdApi.h include/thirdparty_appid_types.h \ 806 include/thirdparty_appid_api.h \ 807 include/sfprimetable.h include/sfxhash.h include/sfhashfcn.h \ 808 include/md5.h \ 809 include/dns_defs.h 810endif 811 812if BUILD_SNORT_RELOAD 813exported_files += include/sfprimetable.h \ 814include/sfprimetable.c \ 815include/sfmemcap.h \ 816include/sfmemcap.c \ 817include/sfhashfcn.h \ 818include/sfhashfcn.c \ 819include/sfxhash.h \ 820include/sfxhash.c \ 821include/appdata_adjuster.h \ 822include/appdata_adjuster.c 823endif 824 825install-data-local: 826 @for f in $(exported_files); do \ 827## Compute the filename only 828 truefile=`echo $$f | sed -e "s/.*\///"`; \ 829## Make the install directory. 830 $(mkinstalldirs) $(DESTDIR)$(srcinstdir); \ 831## Find the header file -- in our case it might be in srcdir or 832## it might be in the build directory. "p" is the variable that 833## names the actual file we will install. 834 if test -f $(srcdir)/$$f; then p=$(srcdir)/$$f; else p=$$f; fi; \ 835## Actually install the file. 836 $(INSTALL_DATA) $$p $(DESTDIR)$(srcinstdir)/$$truefile; \ 837 done 838 839uninstall-local: 840 @for f in $(exported_files); do \ 841## Compute the filename only 842 truefile=`echo $$f | sed -e "s/.*\///"`; \ 843## Make the install directory. 844 $(mkinstalldirs) $(DESTDIR)$(srcinstdir); \ 845## Actually install the file. 846 rm -f $(DESTDIR)$(srcinstdir)/$$truefile; \ 847 done 848