File: rules

package info (click to toggle)
android-tools 5.1.1.r38-1.1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 5,296 kB
  • sloc: ansic: 54,050; sh: 273; python: 131; makefile: 38
file content (55 lines) | stat: -rwxr-xr-x 1,596 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
#!/usr/bin/make -f

export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)

export CC := $(DEB_HOST_GNU_TYPE)-gcc
export SRCDIR := $(CURDIR)

M := $(CURDIR)/debian/makefiles

INSTALL := install
INSTALL_PROGRAM = $(INSTALL)

# Map Debian Host architectures to Android architectures
# used to include the architecture specific AndroidConfig.h
linux_arm := arm64 armel armhf
ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(linux_arm)))
	export android_arch := linux-arm
endif
linux_mips := mips mipsel
ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(linux_mips)))
	export android_arch := linux-mips
endif
linux_x86 := amd64 i386
ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(linux_x86)))
	export android_arch := linux-x86
endif

%:
	dh $@ --with python2

override_dh_clean:
	dh_clean
	rm -rf builddir/

override_dh_auto_build:
# 	mkdir -p builddir/adb
# 	$(MAKE) -f $(M)/adb.mk -C builddir/adb
# 	mkdir -p builddir/fastboot
# 	$(MAKE) -f $(M)/fastboot.mk -C builddir/fastboot
	mkdir -p builddir/ext4_utils
	$(MAKE) -f $(M)/ext4_utils.mk -C builddir/ext4_utils
	mkdir -p builddir/mkbootimg
	$(MAKE) -f $(M)/mkbootimg.mk -C builddir/mkbootimg
ifeq (,$(filter $(DEB_HOST_ARCH),powerpc))
	mkdir -p builddir/adbd
	$(MAKE) -f $(M)/adbd.mk -C builddir/adbd
endif

override_dh_install:
	dh_install
	$(INSTALL_PROGRAM) system/core/libsparse/simg_dump.py debian/android-tools-fsutils/usr/bin/simg_dump
	$(INSTALL_PROGRAM) system/extras/ext4_utils/mkuserimg.sh debian/android-tools-fsutils/usr/bin/mkuserimg

override_dh_installudev:
	dh_installudev --priority=70