mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 09:20:10 +00:00
21 lines
643 B
Makefile
21 lines
643 B
Makefile
HAS_JSON=$(shell pkg-config --exists json-c; echo $$?)
|
|
ifeq ($(HAS_JSON), 0)
|
|
JSON_INC = $(shell pkg-config --cflags json-c)
|
|
JSON_LIB = $(shell pkg-config --libs json-c)
|
|
else
|
|
JSON_HOME=${PWD}/../../third-party/json-c
|
|
JSON_INC=-I$(JSON_HOME)
|
|
JSON_LIB=$(JSON_HOME)/.libs/libjson-c.a
|
|
endif
|
|
|
|
NDPI_HOME = ../../../nDPI
|
|
NDPI_LIB = $(NDPI_HOME)/src/lib/libndpi.a
|
|
NDPI_INC = -I$(NDPI_HOME)/src/include -I$(NDPI_HOME)/src/lib/third_party/include
|
|
|
|
FLAGS=-O3
|
|
|
|
json2tlv: json2tlv.cpp
|
|
$(CXX) -std=c++11 $(FLAGS) -o $@ json2tlv.cpp $(JSON_INC) $(NDPI_INC) -Iinclude -march=native $(JSON_LIB) $(NDPI_LIB) -lzmq -lm -Wall -Wextra
|
|
|
|
clean:
|
|
rm -f json2tlv
|