File: rules

package info (click to toggle)
android-platform-art 10.0.0+r36-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 78,308 kB
  • sloc: cpp: 488,455; java: 151,268; asm: 29,126; python: 9,122; sh: 5,840; ansic: 4,161; xml: 2,846; perl: 77; makefile: 57
file content (83 lines) | stat: -rwxr-xr-x 2,693 bytes parent folder | download
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk

export DEB_HOST_MULTIARCH

# Security Hardening
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -fPIC
export DEB_CXXFLAGS_MAINT_APPEND = -fPIC
export DEB_LDFLAGS_MAINT_APPEND = -fPIC

DEB_CPPFLAGS_MAINT_APPEND += \
  -DNDEBUG \
  -I/usr/include/android \
  -UDEBUG
# Clang defines a macro `mips = 1` which disrupts the namespace declaration `art::mips`
DEB_CPPFLAGS_MAINT_APPEND += -Umips
export DEB_CPPFLAGS_MAINT_APPEND


COMPONENTS = debian/out/dmtracedump
MAN_COMPONENTS = debian/out/dmtracedump.1

# MIPS is left out because ART only supports MIPSr6 while Debian is by default MIPSr2
ifneq ($(filter amd64 i386 armel armhf arm64,$(DEB_HOST_ARCH)),)
 ifeq ($(findstring stage1,$(DEB_VERSION)),)
  COMPONENTS += debian/out/dexdump debian/out/dexlist
  MAN_COMPONENTS += debian/out/dexdump.1
 endif
  COMPONENTS += debian/out/libdexfile_external.so debian/out/libdexfile_support.so
  export CC=clang
  export CXX=clang++
endif

debian/out:
	mkdir -p $@

debian/out/dmtracedump: debian/dmtracedump.mk
	dh_auto_build --buildsystem=makefile -- --file=$<

debian/out/libdexfile_support.so: debian/libdexfile_support.mk
	dh_auto_build --buildsystem=makefile -- --file=$<

debian/out/libsigchain.so: debian/libsigchain.mk
	dh_auto_build --buildsystem=makefile -- --file=$<

debian/out/dexlist: debian/out/libart.so
	dh_auto_build --buildsystem=makefile -- --file=debian/dexlist.mk

debian/out/dexdump: debian/out/libart.so
	dh_auto_build --buildsystem=makefile -- --file=debian/dexdump.mk

debian/out/libdexfile_external.so: debian/out/libart.so
	dh_auto_build --buildsystem=makefile -- --file=debian/libdexfile_external.mk

debian/out/libart.so: debian/out/asm_defines.h debian/out/libsigchain.so
	dh_auto_build --buildsystem=makefile -- --file=debian/libart.mk

# Only for debug purpose to build standalone object
debian/out/asm_defines.h debian/out/operator_out.cc: debian/out
	dh_auto_build --buildsystem=makefile -- --file=debian/libart.mk $@
debian/out/mterp.S: debian/out debian/out/asm_defines.h
	dh_auto_build --buildsystem=makefile -- --file=debian/libart.mk $@
runtime/%.o libartbase/%.o libdexfile/%.o debian/out/%.o: debian/out
	dh_auto_build --buildsystem=makefile -- --file=debian/libart.mk $@

debian/out/%.1: debian/out/%
	help2man -N -n "Dex Tool" --no-discard-stderr --version-string="$(DEB_VERSION)" \
		-o $@ $<

%:
	dh $@

override_dh_auto_build: debian/out $(COMPONENTS) $(MAN_COMPONENTS)

override_dh_auto_clean:
	dh_auto_clean
	make clean --file=debian/libart.mk

override_dh_shlibdeps:
	dh_shlibdeps -l/usr/lib/$(DEB_HOST_MULTIARCH)/android