File: rules

package info (click to toggle)
generate-ninja 0.0~git20250917.1a7c151-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,640 kB
  • sloc: cpp: 87,856; python: 2,121; sh: 205; objc: 159; lisp: 130; makefile: 23; xml: 7
file content (34 lines) | stat: -rwxr-xr-x 797 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
#!/usr/bin/make -f
include /usr/share/dpkg/buildflags.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
CXXFLAGS += $(CPPFLAGS) -fPIE
LDFLAGS += -pie

include /usr/share/dpkg/architecture.mk
ifeq "$(DEB_HOST_ARCH)" "armel"
LDFLAGS += -latomic
endif

#Needed by gn-describe when building outside git tree
include /usr/share/dpkg/pkg-info.mk
export DEB_VERSION_UPSTREAM

#gn uses clang if CXX is not set
DPKG_EXPORT_BUILDFLAGS := 1
include /usr/share/dpkg/architecture.mk
export CXX = $(DEB_HOST_GNU_TYPE)-g++
export AR = $(DEB_HOST_GNU_TYPE)-ar

%:
	dh $@ --buildsystem=ninja --builddirectory=out

override_dh_auto_configure:
	python3 $(CURDIR)/build/gen.py

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(CURDIR)/out/gn_unittests
endif

override_dh_auto_install:
	#noop