From b6df7a19c777a1399f1f9c400698279382e3d6ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?IOhannes=20m=20zm=C3=B6lnig=20=28Debian/GNU=29?= Date: Wed, 11 Jan 2023 17:11:33 +0100 Subject: [PATCH] Simplify pkg-config handling --- debian/rules | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/debian/rules b/debian/rules index 58ad929..773f3bd 100755 --- a/debian/rules +++ b/debian/rules @@ -17,11 +17,12 @@ else endif JUCE_VERSION := $(shell dpkg-query --show --showformat='$${source:Version}' juce-modules-source) +pkglibs = libjpeg libpng libcurl rtaudio DEB_CPPFLAGS_MAINT_APPEND += -DBUILD_DATE='"$(BUILD_DATE)"' -DTEST_RESOURCES_DIR='"tests/resources/"' DEB_CXXFLAGS_MAINT_APPEND += -std=c++17 -Wno-error -Wno-error=format-security -LIBS=$(shell pkg-config --libs libjpeg libpng libcurl rtaudio) -DEB_CXXFLAGS_MAINT_APPEND += $(shell pkg-config --cflags libjpeg libpng libcurl rtaudio) +DEB_CXXFLAGS_MAINT_APPEND += $(shell pkg-config --cflags $(pkglibs)) +DEB_LDFLAGS_MAINT_APPEND += $(shell pkg-config --libs $(pkglibs)) # JUCE (used by giada) uses some c++11 features requiring atomic_store_8 and # atomic_load_8, so we need to link with libatomic on @@ -33,11 +34,9 @@ DEB_CXXFLAGS_MAINT_APPEND += $(shell pkg-config --cflags libjpeg libpng libcurl noatomicarch = $(shell dpkg-architecture -qDEB_HOST_ARCH | egrep -x "(armel|powerpc|powerpcspe|m68k|mips|mipsel|sh4|riscv64)") # link with libatomic on architectures without built-in atomic ifeq ($(if $(noatomicarch),atomic), atomic) - LIBS += -latomic + DEB_LDFLAGS_MAINT_APPEND += -latomic endif -DEB_LDFLAGS_MAINT_APPEND += $(LIBS) - %: dh $@ -- 2.30.2