summaryrefslogtreecommitdiff
path: root/debian/rules
blob: f85bd1588180ae95a620f099fe199f4bd1cea88e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/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 $@

override_dh_auto_configure:
	cmake . $(LAGRANGE_CMAKE_FLAGS) -DCMAKE_INSTALL_PREFIX=/usr/

override_dh_auto_build:
	cmake --build .