File: rules

package info (click to toggle)
hmat-oss 1.2.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 988 kB
  • sloc: cpp: 9,682; ansic: 1,234; makefile: 27
file content (37 lines) | stat: -rwxr-xr-x 1,433 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
37
#!/usr/bin/make -f

ifeq ($(findstring parallel=,$(DEB_BUILD_OPTIONS)),)
	export DEB_BUILD_OPTIONS+=parallel=$(shell getconf _NPROCESSORS_ONLN)
endif
$(info DEB_BUILD_OPTIONS:$(origin DEB_BUILD_OPTIONS)=$(DEB_BUILD_OPTIONS))

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)
ldflags += -Wl,--as-needed

# Explicitly set builddir directory
builddir := obj-$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)


%:
	dh $@ --buildsystem=cmake --builddirectory=$(builddir) --with quilt --parallel

override_dh_auto_configure:
	dh_auto_configure -- \
            $(with_tbb) \
            -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
            -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING='$(cflags)' \
            -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING='$(cxxflags)' \
            -DCMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING='$(ldflags)' \
            -DCMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING='$(ldflags)' \
            -DCMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING='$(ldflags)' \
            -DCMAKE_INSTALL_PREFIX:PATH=/usr \
            -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib \
            -DINSTALL_INCLUDE_DIR:PATH=/usr/include/hmat \
            -DINSTALL_DESTDIR:PATH=$(CURDIR)/debian/tmp

override_dh_strip:
	dh_strip --dbg-package=libhmat-oss1-dbg