1
0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-11-27 03:23:00 +01:00

Add flags to compile statically

This commit is contained in:
Pavel Odintsov 2014-06-08 23:22:17 +04:00
parent 8f29a308bf
commit a06d5bcd41
3 changed files with 13 additions and 7 deletions

BIN
GeoIPASNum.dat Normal file

Binary file not shown.

@ -22,9 +22,6 @@ ifeq ($(ENABLE_PROFILER), yes)
BUILD_FLAGS += -pg
endif
# we use C++ 11 threads. We must include pthread library due gcc bug
LIBS += -lpthread
DEFINES += -D$(ENGINE)
ifeq ($(GEOIP_SUPPORT), yes)
@ -51,11 +48,18 @@ ifeq ($(ENGINE), PF_RING)
LIBS_PATH += -L/opt/pf_ring/lib
endif
# We should add pthread as last argument: http://stackoverflow.com/questions/6919534/problem-linking-to-boost-thread
# we use C++ 11 threads. We must include pthread library due gcc bug
LIBS += -lpthread
# If you need static compile, please uncomment this line
# STATIC = -static
fastnetmon: libipulog.o fastnetmon.o
g++ libipulog.o fastnetmon.o -o fastnetmon $(LIBS_PATH) $(LIBS) $(BUILD_FLAGS)
g++ $(STATIC) libipulog.o fastnetmon.o -o fastnetmon $(LIBS_PATH) $(LIBS) $(BUILD_FLAGS)
libipulog.o: libipulog.c
g++ -c libipulog.c -o libipulog.o -Wno-write-strings
g++ $(STATIC) -c libipulog.c -o libipulog.o -Wno-write-strings
fastnetmon.o: fastnetmon.cpp
g++ $(DEFINES) $(HEADERS) -c fastnetmon.cpp -o fastnetmon.o -std=c++11 $(BUILD_FLAGS)
g++ $(STATIC) $(DEFINES) $(HEADERS) -c fastnetmon.cpp -o fastnetmon.o -std=c++11 $(BUILD_FLAGS)
clean:
rm -f libipulog.o fastnetmon.o fastnetmon

@ -4,7 +4,7 @@
#$2 data_direction
#$3 pps_as_string
email_notify="odintsov@fastvps.ru,hohryakov@fastvps.ru,ziltsov@fastvps.ee"
email_notify="odintsov@fastvps.ru,hohryakov@fastvps.ru,ziltsov@fastvps.ee,robot@bill2fast.com"
# Далее возможны два варианта:
# это первый запуск, при котором нужно банить IP (на stdin пусто)
@ -13,6 +13,8 @@ email_notify="odintsov@fastvps.ru,hohryakov@fastvps.ru,ziltsov@fastvps.ee"
# check stdin type
if [ -t 0 ]; then
echo "Subject, please execute all related tasks :) You may (not always) got atack details in next letter" | mail -s "Myflower Guard: IP $1 blocked because $2 attack with power $3 pps" $email_notify;
ssh fastvpssupport@10.0.3.251 ban_to_blackhole.sh $1
ssh fastvpssupport@10.0.3.252 ban_to_blackhole.sh $1
else
cat | mail -s "Myflower Guard: IP $1 blocked because $2 attack with power $3 pps" $email_notify;
fi