Tizen 2.1 base
[platform/core/api/tethering.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 build: build-stamp
20 build-stamp: configure-stamp
21         dh_testdir
22         cd $(CMAKE_BUILD_DIR) && $(MAKE)
23         touch $@
24
25 clean:
26         cd $(CMAKE_ROOT_DIR)
27         dh_testdir
28         dh_testroot
29         rm -f build-stamp configure-stamp
30         rm -f `find . -name *.pc`
31         rm -rf $(CMAKE_BUILD_DIR)
32         dh_clean
33
34 install: build
35         dh_testdir
36         dh_testroot
37         dh_clean -k
38         dh_installdirs
39
40         cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
41
42 binary-indep: build install
43
44 binary-arch: build install
45         dh_testdir
46         dh_testroot
47         dh_installchangelogs
48         dh_installdocs
49         dh_installexamples
50         dh_install --sourcedir=debian/tmp
51         dh_installman
52         dh_link
53         dh_strip --dbg-package=capi-network-tethering-dbg
54         dh_fixperms
55         dh_makeshlibs
56         dh_installdeb
57         dh_shlibdeps
58         dh_gencontrol
59         dh_md5sums
60         dh_builddeb
61
62 binary: binary-indep binary-arch
63 .PHONY: build clean binary-indep binary-arch binary install configure
64