mirror of
https://github.com/vel21ripn/nDPI.git
synced 2026-05-05 19:15:12 +00:00
* Added ARM build and unit test run for SonarCloud-CI. Signed-off-by: Toni Uhlig <matzeton@googlemail.com> * Fixed Mingw64 build. * adapted to SonarCloud-CI workflow * removed broken and incomplete Windows example (tested on VS2017/VS2019) * removed unnecessary include (e.g. pthread.h for the library which does not make use of it) Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
45 lines
876 B
Makefile
45 lines
876 B
Makefile
CC=@CC@
|
|
CXX=@CXX@
|
|
BUILD_MINGW=@BUILD_MINGW@
|
|
|
|
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 @LDFLAGS@
|
|
HEADERS=$(SRCHOME)/include/ndpi_api.h $(SRCHOME)/include/ndpi_typedefs.h $(SRCHOME)/include/ndpi_protocol_ids.h
|
|
OBJS=unit
|
|
PREFIX?=@prefix@
|
|
|
|
ifneq ($(BUILD_MINGW),)
|
|
all:
|
|
@echo 'Unit tests disabled due to mingw build.'
|
|
|
|
else
|
|
|
|
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
|
|
|
|
endif
|