From dae37bbf4e6ba21ca4e88326267937d0287d7ede Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Sun, 27 Jun 2021 17:10:55 -0400 Subject: [PATCH 1/1] core: Fix libdwarf and Qt build failure libdwarf headers are in /usr/include/libdwarf (at least on Debian), and the core code now uses Qt directly so the QtWidgets cflags/ldflags are needed to build the core library. Not sure if the core should be using Qt directly, but this gets it to build again on GNU/Linux. --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index 5ea57f8..369a664 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,11 @@ CXXFLAGS += $(CPPFLAGS) CFLAGS += -ffast-math -fomit-frame-pointer CXXFLAGS += -ffast-math -fomit-frame-pointer +ifeq "$(findstring Linux,$(OSTYPE))" "Linux" +CFLAGS += -I/usr/include/libdwarf +CXXFLAGS += -I/usr/include/libdwarf +endif + # Flags to pass on to qmake... QMAKE_EXTRA += "QMAKE_CFLAGS_RELEASE=$(CFLAGS)" QMAKE_EXTRA += "QMAKE_CXXFLAGS_RELEASE=$(CXXFLAGS)" @@ -44,6 +49,12 @@ QMAKE_EXTRA += "QMAKE_CFLAGS_DEBUG=$(CFLAGS)" QMAKE_EXTRA += "QMAKE_CXXFLAGS_DEBUG=$(CXXFLAGS)" QMAKE_EXTRA += "QMAKE_LFLAGS_DEBUG=$(LDFLAGS)" +# Add Qt flags on GNU/Linux since core code uses Qt Widgets now +ifeq "$(findstring Linux,$(OSTYPE))" "Linux" +CFLAGS += $(shell pkg-config --cflags Qt5Widgets) +CXXFLAGS += $(shell pkg-config --cflags Qt5Widgets) +LDFLAGS += $(shell pkg-config --libs Qt5Widgets) +endif all: prepare virtualjaguar @echo -e "\033[01;33m***\033[00;32m Success!\033[00m" -- 2.20.1