blob: 8ce5044b9083f152406010033d8f0a1464be23a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
MAKEFLAGS += --no-builtin-rules
BUILD_BENCHMARK=@BUILD_BENCHMARK@
ifneq ($(BUILD_BENCHMARK),)
CC=@CC@
CXX=@CXX@
SRCHOME=../../src
CXXFLAGS=-g -fPIC -DPIC -I$(SRCHOME)/include -I$(SRCHOME)/../example @PCAP_INC@ @CFLAGS@
LIBNDPI=$(SRCHOME)/../example/libndpiReader.a $(SRCHOME)/lib/libndpi.a
LDFLAGS=$(LIBNDPI) @PCAP_LIB@ @LIBS@ @ADDITIONAL_LIBS@ -lpthread -lm @LDFLAGS@
HEADERS=$(SRCHOME)/include/ndpi_api.h $(SRCHOME)/include/ndpi_typedefs.h $(SRCHOME)/include/ndpi_protocol_ids.h \
$(SRCHOME)/../example/reader_util.h
PREFIX?=@prefix@
all: benchmark
benchmark: $(LIBNDPI) benchmark.o
$(CXX) $(CXXFLAGS) benchmark.o -o $@ $(LDFLAGS)
%.o: %.cpp $(HEADERS) Makefile
$(CXX) $(CXXFLAGS) -c $< -o $@
clean:
/bin/rm -f *.o benchmark
/bin/rm -f .*.o.cmd .*.o.d
/bin/rm -rf build
install:
echo ""
distclean: clean
/bin/rm -f Makefile
else
all: benchmark
benchmark:
clean:
install:
distclean:
%.o: %.cpp
endif
distdir:
find . -maxdepth 1 -type f -name '*.cpp' -o -name '*.h' -o -name '*.py' | xargs -I'{}' cp '{}' '$(distdir)/{}'
|