Skip to content

Commit

Permalink
Fix linux/debian/rules for building on Ubuntu 20.04
Browse files Browse the repository at this point in the history
  • Loading branch information
softins committed Feb 13, 2024
1 parent 535da26 commit 586ad2c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion linux/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@ DEB_TARGET_GNU_TYPE := $(shell dpkg-architecture -qDEB_TARGET_GNU_TYPE)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

# DEB_BUILD_GNU_TYPE is the system running the build (this system)
# DEB_HOST_GNU_TYPE is the system jamulus is being built for (the target)
# DEB_TARGET_GNU_TYPE is only relevant when building cross-compilers
$(info DEB_BUILD_GNU_TYPE=$(DEB_BUILD_GNU_TYPE) DEB_HOST_GNU_TYPE=$(DEB_HOST_GNU_TYPE) DEB_TARGET_GNU_TYPE=$(DEB_TARGET_GNU_TYPE))

ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
QMAKE := qmake
else
QMAKE := "/usr/lib/$(DEB_BUILD_GNU_TYPE)/qt5/bin/qmake" -qtconf "/usr/lib/$(DEB_TARGET_GNU_TYPE)/qt5/qt.conf" -spec "/usr/lib/$(DEB_TARGET_GNU_TYPE)/qt5/mkspecs/$(DEB_TARGET_GNU_TYPE)-g++" LIBS+="-lstdc++ -lm"
# For an unknown reason, when called from this makefile in Ubuntu 20.04,
# qmake needs an option between qmake and -qtconf, else it gives an error.
# We use -makefile, which is the default mode anyway, and this avoids the issue.
QMAKE := qmake -makefile -qtconf "/usr/lib/$(DEB_HOST_GNU_TYPE)/qt5/qt.conf" -spec "/usr/lib/$(DEB_HOST_GNU_TYPE)/qt5/mkspecs/$(DEB_HOST_GNU_TYPE)-g++" LIBS+="-lstdc++ -lm"
endif

%:
Expand Down

0 comments on commit 586ad2c

Please sign in to comment.