File: rules

package info (click to toggle)
kido 0.1.0+dfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 27,196 kB
  • sloc: cpp: 91,364; python: 2,342; sh: 254; perl: 235; xml: 47; makefile: 25
file content (36 lines) | stat: -rwxr-xr-x 1,016 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

CMAKE_FLAGS = \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(CFLAGS)" \
        -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(CXXFLAGS)" \
        -DCMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO="$(LDFLAGS)" \
        -DCMAKE_BUILD_TYPE=RelWithDebInfo \
        -DCMAKE_SKIP_INSTALL_RPATH=TRUE

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

override_dh_clean:
	rm -rf build bin lib
	dh_clean

override_dh_auto_configure:
	mkdir -p build
	dh_auto_configure --builddirectory=build -- $(CMAKE_FLAGS)

override_dh_auto_build:
	cd build && $(MAKE)

override_dh_auto_install:
	dh_auto_install --builddirectory=build