aboutsummaryrefslogtreecommitdiff
path: root/tests/dga/Makefile.in
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2021-04-04 21:59:14 +0200
committerToni Uhlig <matzeton@googlemail.com>2021-07-30 22:09:21 +0200
commitb503900b1456e8bd4b60d1deb0ef7cc3665676f1 (patch)
tree92e7a88c190caf23f810e0a828b6da926f11879a /tests/dga/Makefile.in
parent13c5d6801e3b9fdc71bec88c300243a939346a8d (diff)
First step of cleaning up the Makefile.in hell.first-step-to-automake-integration
The goal is to get rid of the Makefile.in's (replace it with Automake Makefile.am's) as they duplicate lot's of text. That decreases readability and is in general a bad design pattern. It seems appropriate to use Automake for an Autoconf based project. Currently achieved: * using libtool to build the core library (+libtool's semantic versioning) * out-of-source builds should work right now * introducing Automake based Makefile in src/ * removed some (maybe) unused GIT ignored files * provide some small python fixes Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'tests/dga/Makefile.in')
-rw-r--r--tests/dga/Makefile.in28
1 files changed, 16 insertions, 12 deletions
diff --git a/tests/dga/Makefile.in b/tests/dga/Makefile.in
index fc94ed7e7..aa2fa5d86 100644
--- a/tests/dga/Makefile.in
+++ b/tests/dga/Makefile.in
@@ -1,25 +1,24 @@
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 @LDFLAGS@
-HEADERS=$(SRCHOME)/include/ndpi_api.h $(SRCHOME)/include/ndpi_typedefs.h $(SRCHOME)/include/ndpi_protocol_ids.h
+BUILD_SRC=../../src
+ROOT_SRC=@srcdir@/../../src
+ROOT_TESTS_DGA=@srcdir@
+
+CFLAGS=-g -fPIC -DPIC -I$(ROOT_SRC)/include -I$(BUILD_SRC)/include @JSONC_CFLAGS@ @PCAP_INC@ @CFLAGS@
+LIBNDPI=$(BUILD_SRC)/.libs/libndpi.a
+LDFLAGS=$(LIBNDPI) @PCAP_LIB@ @LIBS@ @JSONC_LIBS@ -lpthread @LDFLAGS@
+HEADERS=$(BUILD_SRC)/include/ndpi_api.h $(ROOT_SRC)/include/ndpi_typedefs.h $(ROOT_SRC)/include/ndpi_protocol_ids.h
OBJS=dga_evaluate
PREFIX?=@prefix@
all: dga_evaluate
-EXECUTABLE_SOURCES := dga_evaluate.c
-COMMON_SOURCES := $(filter-out $(EXECUTABLE_SOURCES),$(wildcard *.c ))
-
dga_evaluate: $(LIBNDPI) dga_evaluate.o
$(CC) $(CFLAGS) dga_evaluate.o -o $@ $(LDFLAGS)
-%.o: %.c $(HEADERS) Makefile
- $(CC) $(CFLAGS) -c $< -o $@
+%.o: $(ROOT_TESTS_DGA)/%.c $(HEADERS) Makefile
+ $(CC) $(CFLAGS) -c $< -o $(notdir $@)
clean:
/bin/rm -f *.o dga_evaluate
@@ -30,7 +29,12 @@ install:
echo ""
distdir:
-
+ cp \
+ $(ROOT_TESTS_DGA)/dga_evaluate.c \
+ $(ROOT_TESTS_DGA)/README.md \
+ $(ROOT_TESTS_DGA)/test_dga.csv \
+ $(ROOT_TESTS_DGA)/test_non_dga.csv \
+ '$(distdir)/'
distclean: clean
/bin/rm -f Makefile