summaryrefslogtreecommitdiff
path: root/debian/rules
blob: e8f4d30980eabc41fb245812e68dffa2daa8ecd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/make -f
export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS=hardening=-format
export LAGRANGE_CMAKE_FLAGS= -DCMAKE_BUILD_TYPE=Release -DENABLE_WINDOWPOS_FIX=YES

# SSE4.1 support (or lack thereof) is only a concern on x86_64/x86 machines
ifeq ($(DEB_BUILD_ARCH), amd64)
	LAGRANGE_CMAKE_FLAGS += -DTFDN_ENABLE_SSE41=NO
else ifeq ($(DEB_BUILD_ARCH), i386)
	LAGRANGE_CMAKE_FLAGS += -DTFDN_ENABLE_SSE41=NO
endif

# on non x86_64/x86, specifically armhf, arm64, arm, OpenGL hw acceleration under X11 is a bit too slow.
ifneq ($(DEB_BUILD_ARCH), amd64)
	LAGRANGE_CMAKE_FLAGS += -DENABLE_KERNING=NO -DENABLE_X11_SWRENDER=YES
endif


%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -- $(LAGRANGE_CMAKE_FLAGS) -DCMAKE_INSTALL_PREFIX=/usr/