From b503900b1456e8bd4b60d1deb0ef7cc3665676f1 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Sun, 4 Apr 2021 21:59:14 +0200 Subject: First step of cleaning up the Makefile.in hell. 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 --- src/lib/Makefile.in | 82 ----------------------------------------------------- 1 file changed, 82 deletions(-) delete mode 100644 src/lib/Makefile.in (limited to 'src/lib') 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) -- cgit v1.2.3