blob: f039a557943cd9a1e755914c308f24975bcca57d [file] [log] [blame]
Thomas Jarosch06023f32011-02-08 22:09:36 +00001#!/usr/bin/make -f
2
Dave Chapman9e638c72011-02-11 19:51:29 +00003# We deduce the target based on the available version of the Maemo SDK
4ifeq (1,$(shell pkg-config --atleast-version=5 maemo-version && echo 1))
5TARGET=nokian900
6else
7TARGET=nokian8xx
8endif
9
Thomas Jarosch2d5d3042011-02-27 16:15:59 +000010CONFIGURE_OPTIONS := --target=$(TARGET) --ram=8 --rbdir=/.rockbox --type=N
Thomas Jarosch06023f32011-02-08 22:09:36 +000011DESKTOP_DIR := `pkg-config --variable=desktopentrydir osso-af-settings`
12
13export DH_VERBOSE=1
14
15builddir:
16 test -d builddir || mkdir -p builddir
17
18builddir/Makefile: builddir
19 cd builddir && test -f Makefile || ../tools/configure $(CONFIGURE_OPTIONS)
20
21build: build-stamp
22
23build-stamp: builddir/Makefile
24 dh_testdir
25 cd builddir && $(MAKE)
26 touch $@
27
28clean:
29 dh_testdir
30 dh_testroot
31 rm -f build-stamp
32 rm -rf builddir
33 dh_clean
34install: build
35 dh_testdir
36 dh_testroot
37 dh_clean -k
38 dh_installdirs
39
40 cd builddir && $(MAKE) PREFIX=$(CURDIR)/debian/rockbox/opt/rockbox fullinstall
41
42 # Install icon and .desktop file
43 mkdir -p $(CURDIR)/debian/rockbox/usr/share/icons/hicolor/64x64/apps
44 cp -f debian/maemo/rockbox.png $(CURDIR)/debian/rockbox/usr/share/icons/hicolor/64x64/apps
45 mkdir -p $(CURDIR)/debian/rockbox$(DESKTOP_DIR)
46 cp -f debian/maemo/rockbox.desktop $(CURDIR)/debian/rockbox$(DESKTOP_DIR)
47
48 # Ignore built in sounds
49 mkdir -p $(CURDIR)/debian/rockbox/usr/share/sounds
50 touch $(CURDIR)/debian/rockbox/usr/share/sounds/database.ignore
51
52# Build architecture-independent files here.
53binary-indep:
54# We have nothing to do by default.
55
56# Build architecture-dependent files here.
57binary-arch: build install
58 dh_testdir
59 dh_testroot
60 dh_installdocs
61 dh_installexamples
62 dh_installman
63 dh_link
64 dh_strip --dbg-package=rockbox-dbg
65 dh_compress
66 dh_fixperms
67 dh_installdeb
68 dh_shlibdeps
69 dh_gencontrol
70 dh_md5sums
71 dh_builddeb
72
73binary: binary-indep binary-arch
74.PHONY: build clean binary-indep binary-arch binary install configure