Add debug/profiler options to makefile
This commit is contained in:
parent
69e5a25b73
commit
d6e1a92cc4
19
Makefile
19
Makefile
|
@ -1,10 +1,23 @@
|
|||
all: fastnetmon
|
||||
|
||||
# User parameters
|
||||
ENGINE = ULOG2
|
||||
#ENGINE = PCAP
|
||||
|
||||
REDIS_SUPPORT = yes
|
||||
|
||||
# Develoepr parameters
|
||||
ENABLE_DEBUG = no
|
||||
ENABLE_PROFILER = no
|
||||
|
||||
# Code
|
||||
ifeq ($(BUILD_FLAGS), yes)
|
||||
BUILD_FLAGS += -g
|
||||
endif
|
||||
|
||||
ifeq ($(ENABLE_PROFILER), yes)
|
||||
BUILD_FLAGS += -pg
|
||||
endif
|
||||
|
||||
# we use C++ 11 threads. We must include pthread library due gcc bug
|
||||
LIBS += -lpthread
|
||||
|
||||
|
@ -20,10 +33,10 @@ ifeq ($(ENGINE), PCAP)
|
|||
endif
|
||||
|
||||
fastnetmon: libipulog.o fastnetmon.o
|
||||
g++ libipulog.o fastnetmon.o -o fastnetmon $(LIBS)
|
||||
g++ libipulog.o fastnetmon.o -o fastnetmon $(LIBS) -g $(BUILD_FLAGS)
|
||||
libipulog.o: libipulog.c
|
||||
g++ -c libipulog.c -o libipulog.o -Wno-write-strings
|
||||
fastnetmon.o: fastnetmon.cpp
|
||||
g++ $(DEFINES) -c fastnetmon.cpp -o fastnetmon.o -std=c++11
|
||||
g++ $(DEFINES) -c fastnetmon.cpp -o fastnetmon.o -std=c++11 $(BUILD_FLAGS)
|
||||
clean:
|
||||
rm -f libipulog.o fastnetmon.o fastnetmon
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
2) Подумать на тему выноса всех параметров в конфиг
|
||||
3) Перенести список бана в структуру черного списка
|
||||
4) Перейти на cap_admin при работе от штатного юзера
|
||||
5) Оптимизировать belongs_to_network на префиксном дереве
|
||||
6) Не создавайте больших списков айпи сетей! Будет тормозить!
|
||||
|
||||
*/
|
||||
|
||||
/* Author: pavel.odintsov@gmail.com */
|
||||
|
@ -29,6 +32,7 @@
|
|||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
//#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <sstream>
|
||||
|
|
Loading…
Reference in New Issue