From c2b7d77784beeae5f86f19e33ba3da5ddce55898 Mon Sep 17 00:00:00 2001 From: Sam James Date: Tue, 18 Jan 2022 13:30:14 +0000 Subject: build: respect environment options more (#1392) * build: update m4/ax_pthread.m4 from serial 23 -> serial 31 Update ax_pthread.m4 to the latest version from the autoconf-archive project. Signed-off-by: Sam James * build: properly detect AR, CC, RANLIB It's necessary to be able to override choice of AR/CC/RANLIB and other toolchain variables/tools for cross-compilation, testing with other toolchains, and to ensure the compiler chosen by the user is actually used for the build. Previously, GNU_PREFIX was kind-of used for this but this isn't a standard variable (at all) and it wasn't applied consistently anyway. We now use the standard autoconf mechanisms for finding these tools. (RANLIB is already covered by LT_INIT.) Signed-off-by: Sam James * build: use $(MAKE) This ensures that parallel make works correctly, as otherwise, a fresh make job will be started without the jobserver fd, and hence not know about its parent, forcing -j1. * build: respect CPPFLAGS, LDFLAGS - CPPFLAGS is for the C preprocessor (usually for setting defines) - LDFLAGS should be placed before objects for certain flags to work (e.g. -Wl,--as-needed) Signed-off-by: Sam James Co-authored-by: Luca Deri --- packages/ubuntu/Makefile.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages/ubuntu') diff --git a/packages/ubuntu/Makefile.in b/packages/ubuntu/Makefile.in index 13dfa7298..f1f0fdfda 100644 --- a/packages/ubuntu/Makefile.in +++ b/packages/ubuntu/Makefile.in @@ -6,7 +6,7 @@ ndpi: mkdir -p ./debian/ndpi-tmp ./debian/ndpi-dev-tmp mkdir -p ./debian/ndpi-tmp/usr/lib ./debian/ndpi-tmp/usr/bin mkdir -p ./debian/ndpi-dev-tmp/usr/lib ./debian/ndpi-dev-tmp/usr/include/ndpi ./debian/ndpi-dev-tmp/usr/lib/pkgconfig - cd ${NDPI_HOME}; ./autogen.sh; ./configure; make + cd ${NDPI_HOME}; ./autogen.sh; ./configure; $(MAKE) cp $(NDPI_HOME)/src/lib/libndpi.so.@NDPI_VERS@ ./debian/ndpi-tmp/usr/lib/ cd ./debian/ndpi-tmp/usr/lib/; ln -s libndpi.so.@NDPI_VERS@ libndpi.so; cd - cd ./debian/ndpi-tmp/usr/lib/; ln -s libndpi.so.@NDPI_VERS@ libndpi.so.@MAJOR_RELEASE@; cd - @@ -33,11 +33,11 @@ ndpi: @echo "-------------------------------" distclean: - -cd ${NDPI_HOME} && make distclean + -cd ${NDPI_HOME} && $(MAKE) distclean install: - cd ${NDPI_HOME}; make install DESTDIR="${NDPI_BUILD}/debian/tmp" AM_UPDATE_INFO_DIR=no + cd ${NDPI_HOME}; $(MAKE) install DESTDIR="${NDPI_BUILD}/debian/tmp" AM_UPDATE_INFO_DIR=no clean: - -cd ${NDPI_HOME} && make clean + -cd ${NDPI_HOME} && $(MAKE) clean -rm -rf *~ *deb ./usr ./debian/ndpi ./debian/ndpi-dev ./debian/ndpi ./debian/ndpi-dev -- cgit v1.2.3