nDPI/rrdtool/Makefile.in
Ivan Nardi 6ab338928c
Add support for out-of-tree builds (#2993)
Initial work to support out-of-tree builds
```
./autogen.sh
mkdir build
cd build
../configure
make
make check
```
IMPORTANT: `autogen.sh` doesn't call `configure` automatically anymore!!

You have to do: `./autogen.sh && ./configure --$OPTIONS`.
A little bit annoying but the pattern `autogen && configure && make` is
very common on Linux.

Known issues:
* `make doc` doesn't work in out-of-tree builds, yet
* Windows/MinGW/DPDK (out-of-tree) builds have not been tested, so it is unlikely they work

See: #2992
2025-11-03 11:58:59 +01:00

38 lines
981 B
Makefile

# Support for out-of-tree builds (VPATH)
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
CC=@CC@
INC=-I $(top_srcdir)/src/include -I $(top_builddir)/src/include -I/usr/local/include
LIBDPI=$(top_builddir)/src/lib/libndpi.a
CFLAGS+=@NDPI_CFLAGS@
LDFLAGS+=@NDPI_LDFLAGS@
LIB=$(LIBDPI) -lm @ADDITIONAL_LIBS@ @LIBRRD@ @LIBS@ -lpthread
TOOLS=rrd_anomaly rrd_similarity
all: $(TOOLS)
rrd_anomaly: $(srcdir)/rrd_anomaly.c Makefile $(LIBDPI)
$(CC) $(CFLAGS) $(CPPFLAGS) -g $(INC) $(LDFLAGS) $(srcdir)/rrd_anomaly.c -o rrd_anomaly $(LIB)
rrd_similarity: $(srcdir)/rrd_similarity.c Makefile $(LIBDPI)
$(CC) $(CFLAGS) $(CPPFLAGS) -g $(INC) $(LDFLAGS) $(srcdir)/rrd_similarity.c -o rrd_similarity $(LIB)
clean:
/bin/rm -f *.o $(TOOLS) *~
distclean: clean
/bin/rm -f Makefile
distdir:
find $(srcdir) -type f -name '*.c' \
-o -name '*.txt' | xargs -I'{}' cp '{}' '$(distdir)/{}'
install:
@echo -n ""
check:
true # nothing to do here