From ce32413633dacf3f4e371e063e84b9e67a8840ff Mon Sep 17 00:00:00 2001 From: mazmazz Date: Tue, 27 Nov 2018 01:26:44 -0500 Subject: [PATCH] Smarter libgme ldflag detection --- debian/rules | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/rules b/debian/rules index bbaace8bb..9434a739e 100755 --- a/debian/rules +++ b/debian/rules @@ -71,8 +71,15 @@ MENUFILE2 = title="$(TITLE)" command="/$(PKGDIR)/$(PACKAGE)" export PKG_CONFIG_LIBDIR = /usr/lib/$(CROSS_COMPILE_HOST)/pkgconfig BINDIR := $(DIR)/bin/Linux/Release LDFLAGS += "-Wl,-rpath=/usr/lib/$(CROSS_COMPILE_HOST)" + # FIXME some libgme-dev packages don't use pkg-config yet, so include the linker flag ourselves +PKG_CONFIG?=pkg-config +LIBGME_PKGCONFIG?=libgme +LIBGME_LDFLAGS?=$(shell $(PKG_CONFIG) $(LIBGME_PKGCONFIG) --libs) + +ifeq ($(LIBGME_LDFLAGS),) MAKEARGS += LIBGME_LDFLAGS=-lgme +endif build: $(MKDIR) $(BINDIR)/debug