File: rules

package info (click to toggle)
sunxi-tools 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 520 kB
  • ctags: 959
  • sloc: ansic: 6,136; makefile: 133; asm: 120; sh: 67
file content (32 lines) | stat: -rwxr-xr-x 882 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
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/dpkg/architecture.mk

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	rm -f bin/fel-pio.* bin/*.sunxi bin/*.scr
	if [ -f fel-to-spl-thunk.h.pristine ] ; then \
		mv fel-to-spl-thunk.h.pristine fel-to-spl-thunk.h ; \
	fi

override_dh_auto_build:
	if [ ! -f fel-to-spl-thunk.h.pristine ] ; then \
		cp fel-to-spl-thunk.h fel-to-spl-thunk.h.pristine ; \
	fi
	ruby -x fel-to-spl-thunk.S > fel-to-spl-thunk.h

	$(MAKE) EXTRA_CFLAGS="$(CFLAGS) $(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" tools
	mkimage -A arm -T script -d bin/ramboot.uboot-sh bin/ramboot.scr

override_dh_auto_install: PKG := debian/sunxi-tools
override_dh_auto_install:
	$(MAKE) install-tools DESTDIR=$(CURDIR)/$(PKG) PREFIX=/usr

	install -m0644 bin/ramboot.scr $(PKG)/usr/share/sunxi-tools/ramboot.scr