trying to use osso-games-startup as gui
[drnoksnes] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
8
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12 # These are used for cross-compiling and for saving the configure script
13 # from having to guess our platform (since we know it already)
14 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
15 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16
17 # Determine Maemo version
18 MAEMO_VERSION := $(shell cut -d"." -f1 /etc/maemo_version)
19
20 CFLAGS = -Wall -g -DMAEMO -DMAEMO_VERSION=$(MAEMO_VERSION)
21 LDFLAGS = -Wl,-z,defs
22 CONFOPTS = 
23
24 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
25         CFLAGS += -O0
26 else ifneq (,$(findstring arm,$(DEB_BUILD_GNU_TYPE)))
27         CFLAGS += -Os
28         ifneq (,$(findstring vfp,$(DEB_BUILD_OPTIONS)))
29                 CFLAGS += -march=armv6j -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp
30         endif
31         # Fixes hang while exiting on Diablo.
32         CFLAGS += -static-libgcc
33 else # x86
34         echo "This package does not build in x86"
35         exit 1
36 endif
37
38 configure: configure-stamp
39 configure-stamp:
40         dh_testdir
41         # Add here commands to configure the package.
42
43         touch configure-stamp
44
45
46 build: build-stamp
47
48 build-stamp: configure-stamp 
49         dh_testdir
50
51         $(MAKE) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CFLAGS)"
52
53         touch $@
54
55 clean:
56         dh_testdir
57         dh_testroot
58         rm -f build-stamp configure-stamp
59
60         # Add here commands to clean up after the build process.
61         -$(MAKE) clean
62
63         dh_clean 
64
65 install: build
66         dh_testdir
67         dh_testroot
68         dh_clean -k 
69         dh_installdirs
70
71         # Add here commands to install the package into debian/drnoksnes.
72         $(MAKE) DESTDIR=$(CURDIR)/debian/drnoksnes install
73
74
75 # Build architecture-independent files here.
76 binary-indep: build install
77 # We have nothing to do by default.
78
79 # Build architecture-dependent files here.
80 binary-arch: build install
81         dh_testdir
82         dh_testroot
83         dh_installchangelogs 
84         dh_installdocs
85         dh_installexamples
86         dh_installman
87         dh_link
88         dh_strip
89         dh_compress
90         dh_fixperms
91         dh_installdeb
92         dh_shlibdeps
93         dh_gencontrol
94         dh_md5sums
95         dh_builddeb
96
97 binary: binary-indep binary-arch
98 .PHONY: build clean binary-indep binary-arch binary install configure