mirror of
https://github.com/vel21ripn/nDPI.git
synced 2026-04-30 07:59:49 +00:00
56 lines
1.2 KiB
Makefile
56 lines
1.2 KiB
Makefile
INC=-I ../../src/include/ -I ../../src/lib/third_party/include/
|
|
LIB=../../src/lib/libndpi.a @ADDITIONAL_LIBS@ @LIBS@
|
|
|
|
TOOLS=substringsearch patriciasearch gcrypt-int gcrypt-gnu strnstr
|
|
TESTS=substring_test patricia_test strnstr_test geo_test
|
|
|
|
|
|
all: $(TESTS)
|
|
|
|
tools: $(TOOLS)
|
|
|
|
gcrypt-int: gcrypt.c Makefile
|
|
$(CC) $(INC) @CFLAGS@ gcrypt.c -o $@
|
|
|
|
gcrypt-gnu: gcrypt.c Makefile
|
|
$(CC) $(INC) @CFLAGS@ -DHAVE_LIBGCRYPT gcrypt.c -o $@ -lgcrypt
|
|
|
|
substringsearch: substringsearch.c Makefile
|
|
$(CC) $(INC) @CFLAGS@ substringsearch.c -o substringsearch $(LIB)
|
|
|
|
strnstr: strnstr.cpp Makefile
|
|
$(CXX) $(INC) @CFLAGS@ strnstr.cpp -o strnstr
|
|
|
|
geo: geo.c Makefile
|
|
$(CC) $(INC) @CFLAGS@ geo.c -o geo $(LIB)
|
|
|
|
substring_test: substringsearch top-1m.csv
|
|
./substringsearch
|
|
|
|
strnstr_test: strnstr
|
|
./strnstr
|
|
|
|
geo_test: geo
|
|
./geo
|
|
|
|
#
|
|
|
|
patriciasearch: patriciasearch.c Makefile
|
|
$(CC) $(INC) @CFLAGS@ patriciasearch.c -o patriciasearch $(LIB)
|
|
|
|
patricia_test: patriciasearch blacklist-ip.txt
|
|
./patriciasearch
|
|
|
|
|
|
# Alexa Top 1 Million
|
|
top-1m.csv:
|
|
wget http://s3.amazonaws.com/alexa-static/top-1m.csv.zip
|
|
unzip top-1m.csv.zip
|
|
|
|
blacklist-ip.txt:
|
|
wget http://blacklists.ntop.org/blacklist-ip.txt
|
|
|
|
clean:
|
|
/bin/rm -f *zip top-1m.csv blacklist-ip.txt
|
|
|
|
|