nDPI/influxdb/Makefile.in
Ivan Nardi b2357c29c3
Build system: Standardize and improve clean/distclean targets (#3039)
This commit improves the nDPI build system by standardizing cleanup
targets, improving portability, and ensuring complete removal of
generated files during `make distclean`.

Changes:

1. Standardize clean targets (replace /bin/rm with portable $(RM))

2. Add distclean-local targets for complete cleanup

3. Add missing clean/distclean targets

4. Remove obsolete commented-out curl detection code

5. fuzz/Makefile.am: Fix out-of-tree build compatibility by replacing hardcoded
   relative paths (../example/fuzz_*.o) with proper $(top_builddir) variables.
   Add distclean-local target.
2025-11-24 18:42:03 +01:00

39 lines
987 B
Makefile

# Support for out-of-tree builds (VPATH)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
CC=@CC@
LDFLAGS=@LDFLAGS@
CFLAGS=@CFLAGS@
AM_CFLAGS=@NDPI_CFLAGS@
INC=-I $(top_srcdir)/src/include -I $(top_builddir)/src/include -I/usr/local/include
LIBDPI=$(top_builddir)/src/lib/libndpi.a
AM_LDFLAGS=@NDPI_LDFLAGS@
LIB=$(LIBDPI) @ADDITIONAL_LIBS@ @LIBS@ -lm
GEN_HEADERS=$(top_builddir)/src/include/ndpi_config.h $(top_builddir)/src/include/ndpi_define.h
TOOLS=metric_anomaly
all: $(TOOLS)
metric_anomaly: $(srcdir)/metric_anomaly.c Makefile $(LIBDPI) $(GEN_HEADERS)
$(CC) $(AM_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(INC) $(AM_LDFLAGS) $(LDFLAGS) $(srcdir)/metric_anomaly.c -o metric_anomaly $(LIB)
clean:
$(RM) *.o *.lo $(TOOLS) *~
$(RM) -r .libs .deps
distclean: clean
$(RM) Makefile
distdir:
find $(srcdir) -type f -name '*.c' \
-o -name '*.txt' | xargs -I'{}' cp '{}' '$(distdir)/{}'
install:
@echo -n ""
check:
true # nothing to do here