mirror of
https://github.com/vel21ripn/nDPI.git
synced 2026-05-01 00:19:42 +00:00
* Switched to PKG_CHECK_MODULES to keep pkg-config checks more portable. Signed-off-by: Toni Uhlig <matzeton@googlemail.com> * Improved GCrypt autoconf check to detect a possible gpg-error inter-library dependency. Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
36 lines
762 B
Makefile
36 lines
762 B
Makefile
CC=@CC@
|
|
CXX=@CXX@
|
|
|
|
SRCHOME=../../src
|
|
|
|
CFLAGS=-g -fPIC -DPIC -I$(SRCHOME)/include @JSONC_CFLAGS@ @PCAP_INC@ @CFLAGS@
|
|
LIBNDPI=$(SRCHOME)/lib/libndpi.a
|
|
LDFLAGS=$(LIBNDPI) @PCAP_LIB@ @LIBS@ @ADDITIONAL_LIBS@ @JSONC_LIBS@ -lpthread -lm @LDFLAGS@
|
|
HEADERS=$(SRCHOME)/include/ndpi_api.h $(SRCHOME)/include/ndpi_typedefs.h $(SRCHOME)/include/ndpi_protocol_ids.h
|
|
OBJS=unit
|
|
PREFIX?=@prefix@
|
|
|
|
all: unit
|
|
|
|
EXECUTABLE_SOURCES := unit.c
|
|
COMMON_SOURCES := $(filter-out $(EXECUTABLE_SOURCES),$(wildcard *.c ))
|
|
|
|
unit: $(LIBNDPI) unit.o
|
|
$(CC) $(CFLAGS) unit.o -o $@ $(LDFLAGS)
|
|
|
|
%.o: %.c $(HEADERS) Makefile
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
clean:
|
|
/bin/rm -f *.o unit
|
|
/bin/rm -f .*.o.cmd .*.o.d
|
|
/bin/rm -rf build
|
|
|
|
install:
|
|
echo ""
|
|
|
|
distdir:
|
|
|
|
|
|
distclean: clean
|
|
/bin/rm -f Makefile
|