File: rules

package info (click to toggle)
coin3 4.0.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 52,388 kB
  • sloc: cpp: 254,256; ansic: 23,018; makefile: 8,672; sh: 3,141; perl: 1,504; lex: 1,372; lisp: 1,247; pascal: 961; xml: 604; yacc: 388; sed: 68
file content (44 lines) | stat: -rwxr-xr-x 1,574 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
38
39
40
41
42
43
44
#!/usr/bin/make -f

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

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_BUILD_OPTIONS += nocheck
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
        NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
        MAKEFLAGS += -j$(NUMJOBS)
endif

# These don't need to be exported and if they are we'll get the flags
# duplicated in the command line.
#unexport CFLAGS
#unexport CXXFLAGS
#unexport LDFLAGS

CMAKE_FLAGS = \
        -DCOIN_BUILD_DOCUMENTATION=ON \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR="/usr/lib/$(DEB_HOST_MULTIARCH)" \
        -DCMAKE_VERBOSE_MAKEFILE=ON \
        -DCMAKE_C_FLAGS_RELEASE="$(CFLAGS)" \
        -DCMAKE_CXX_FLAGS_RELEASE="$(CXXFLAGS)" \
        -DCMAKE_SHARED_LINKER_FLAGS_RELEASE="$(LDFLAGS)" \
        -DCMAKE_BUILD_TYPE=RelWithDebInfo \
        -DCMAKE_SKIP_INSTALL_RPATH=TRUE \
        -DUSE_EXTERNAL_EXPAT=ON

%:
	dh $@ --buildsystem=cmake --without autoreconf

override_dh_auto_configure:
	dh_auto_configure -- $(CMAKE_FLAGS) $(CMAKE_ARCH_FLAGS)

override_dh_installdocs:
	dh_installdocs
	find $(CURDIR)/debian/libcoin-doc/ -type f -print0 | xargs --no-run-if-empty -0 sed -i 's/http:\/\/www\.web3d\.org//g'