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