Initialize Tizen 2.3
[framework/api/wav-player.git] / wearable / debian / rules
1 #!/usr/bin/make -f
2
3 CFLAGS = -Wall -g
4
5 FULLVER ?= $(shell dpkg-parsechangelog | grep Version: | cut -d ' ' -f 2 | cut -d '-' -f 1)
6 MAJORVER ?= $(shell echo $(FULLVER) | cut -d '.' -f 1)
7
8
9 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
10         CFLAGS += -O0
11 else
12         CFLAGS += -O2
13 endif
14 CMAKE_ROOT_DIR ?= $(CURDIR)
15 CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
16
17 configure: configure-stamp
18 configure-stamp:
19         dh_testdir
20         mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && cmake .. -DFULLVER=${FULLVER} -DMAJORVER=${MAJORVER}
21         touch configure-stamp
22
23
24 build: build-stamp
25 build-stamp: configure-stamp 
26         dh_testdir
27         cd $(CMAKE_BUILD_DIR) && $(MAKE)
28         touch $@
29
30 clean:
31         cd $(CMAKE_ROOT_DIR)
32         dh_testdir
33         dh_testroot
34         rm -f build-stamp configure-stamp
35         rm -f 
36         rm -rf $(CMAKE_BUILD_DIR)
37         dh_clean
38         
39 install: build
40         dh_testdir
41         dh_testroot
42         dh_clean -k 
43         dh_installdirs
44
45         cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
46
47 binary-indep: build install
48
49 binary-arch: build install
50         dh_testdir
51         dh_testroot
52         dh_installchangelogs 
53         dh_installdocs
54         dh_installexamples
55         dh_install --sourcedir=debian/tmp
56         dh_installman
57         dh_link
58         dh_strip --dbg-package=capi-media-wav-player-dbg
59         dh_fixperms
60         dh_makeshlibs
61         dh_installdeb
62         dh_shlibdeps
63         dh_gencontrol
64         dh_md5sums
65         dh_builddeb
66
67 binary: binary-indep binary-arch
68 .PHONY: build clean binary-indep binary-arch binary install configure
69