aboutsummaryrefslogtreecommitdiff
path: root/src/lib
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 /src/lib
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 'src/lib')
-rw-r--r--src/lib/Makefile.in82
1 files changed, 0 insertions, 82 deletions
diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
deleted file mode 100644
index ef866fe96..000000000
--- a/src/lib/Makefile.in
+++ /dev/null
@@ -1,82 +0,0 @@
-#
-# Simple non-autotools dependent makefile
-#
-# ./autogen.sh
-# cd src/lib
-# make Makefile
-#
-
-#
-# Installation directories
-#
-prefix = @prefix@
-libdir = ${prefix}/lib
-includedir = ${prefix}/include/ndpi
-CC = @GNU_PREFIX@@CC@
-CFLAGS += -fPIC -DPIC -I../include -Ithird_party/include -DNDPI_LIB_COMPILATION -Wall @CFLAGS@ @CUSTOM_NDPI@
-LDFLAGS = @LDFLAGS@ @ADDITIONAL_LIBS@ @LIBS@
-RANLIB = @GNU_PREFIX@ranlib
-
-OBJECTS = $(patsubst protocols/%.c, protocols/%.o, $(wildcard protocols/*.c)) $(patsubst third_party/src/%.c, third_party/src/%.o, $(wildcard third_party/src/*.c)) $(patsubst ./%.c, ./%.o, $(wildcard ./*.c))
-HEADERS = $(wildcard ../include/*.h)
-NDPI_VERSION_MAJOR = @NDPI_MAJOR@
-NDPI_LIB_STATIC = libndpi.a
-NDPI_LIB_SHARED_BASE = libndpi.so
-NDPI_LIB_SHARED = $(NDPI_LIB_SHARED_BASE).@NDPI_VERSION_SHORT@
-NDPI_LIBS = $(NDPI_LIB_STATIC) $(NDPI_LIB_SHARED)
-
-ifneq ($(OS),Windows_NT)
-OS := $(shell uname)
-endif
-BUILD_MINGW = @BUILD_MINGW@
-
-ifeq ($(OS),Darwin)
-CC=clang
-SONAME_FLAG=
-else
-ifneq ($(BUILD_MINGW),)
-NDPI_LIB_SHARED_BASE = libndpi
-NDPI_LIB_SHARED = $(NDPI_LIB_SHARED_BASE)-@NDPI_VERSION_SHORT@.dll
-else
-SONAME_FLAG=-Wl,-soname,$(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR)
-endif
-endif
-
-all: $(NDPI_LIBS)
-
-ndpi_main.c: ndpi_content_match.c.inc
-
-$(NDPI_LIB_STATIC): $(OBJECTS)
- @GNU_PREFIX@ar rc $@ $(OBJECTS)
- $(RANLIB) $@
-
-$(NDPI_LIB_SHARED): $(OBJECTS)
- $(CC) -shared -fPIC $(SONAME_FLAG) -o $@ $(OBJECTS) $(LDFLAGS)
- ln -fs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE)
- ln -fs $(NDPI_LIB_SHARED) $(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR)
-
-%.o: %.c $(HEADERS) Makefile
- $(CC) $(CFLAGS) -c $< -o $@
-
-clean:
- /bin/rm -f $(NDPI_LIB_STATIC) $(OBJECTS) *.o *.so *.lo libndpi.so*
-
-distdir:
- cp ndpi_content_match.c.inc '$(distdir)/'
- find . -type d | xargs -I'{}' mkdir -p '$(distdir)/{}'
- find ../include -type f -name '*.h' | xargs -I'{}' cp '{}' '$(distdir)/{}'
- find . -type f -name '*.c' -o -name '*.h' | xargs -I'{}' cp '{}' '$(distdir)/{}'
-
-distclean: clean
- /bin/rm -f Makefile
-
-cppcheck:
- cppcheck --template='{file}:{line}:{severity}:{message}' --quiet --enable=all --force -I ../include *.c protocols/*.c
-
-install: $(NDPI_LIBS)
- mkdir -p $(DESTDIR)$(libdir)
- cp $(NDPI_LIBS) $(DESTDIR)$(libdir)/
- cp -P $(NDPI_LIB_SHARED_BASE) $(DESTDIR)$(libdir)/
- cp -P $(NDPI_LIB_SHARED_BASE).$(NDPI_VERSION_MAJOR) $(DESTDIR)$(libdir)/
- mkdir -p $(DESTDIR)$(includedir)
- cp ../include/*.h $(DESTDIR)$(includedir)