File: rules

package info (click to toggle)
simgear 1%3A2020.3.19%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,184 kB
  • sloc: cpp: 86,895; ansic: 14,497; xml: 903; makefile: 31
file content (52 lines) | stat: -rwxr-xr-x 1,540 bytes parent folder | download | duplicates (3)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/make -f
# -*- makefile -*-
#
# debian/rules for simgear, by Markus Wanner
# based on the dh7 template provided by dh_make(1)

# Include makefile snippet for DEB_HOST_ARCH
include /usr/share/dpkg/architecture.mk

# Enable all hardening options
export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# http://wiki.debian.org/Hardening#Notes_for_packages_using_CMake
CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
ifneq (,$(findstring $(DEB_HOST_ARCH) , amd64 i386 mipsel ia64 armel armhf arm64 ))

# Note the spaces in the condition above. They stop 'mips' from
# matching 'mipsel'
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
else

# Required on big-endian architectures, see bug #722115
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) -fno-strict-aliasing
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS) -fno-strict-aliasing
endif
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)

CMAKE_FLAGS = \
	-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
	-DCMAKE_C_FLAGS="$(CFLAGS)" \
	-DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \
	-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -DNDEBUG" \
	-DCMAKE_SHARED_LINKER_FLAGS="$(LDFLAGS)" \
	-DCMAKE_INSTALL_PREFIX:PATH=/usr \
	-DSIMGEAR_SHARED=OFF \
	-DSYSTEM_EXPAT=ON \
	-DSYSTEM_UDNS=ON \
	-DENABLE_DNS=ON

%:
	dh $@ --buildsystem=cmake --builddirectory=build

override_dh_auto_configure:
	dh_auto_configure -- $(CMAKE_FLAGS)

override_dh_clean:
	dh_clean
	rm -rf CMakeFiles

override_dh_auto_test:
		dh_auto_test --no-parallel