Git init
[framework/api/sim.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 
32         rm -rf $(CMAKE_BUILD_DIR)
33         rm -f *.pc
34         dh_clean
35         
36 install: build
37         dh_testdir
38         dh_testroot
39         dh_clean -k 
40         dh_installdirs
41
42         cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
43
44 binary-indep: build install
45
46 binary-arch: build install
47         dh_testdir
48         dh_testroot
49         dh_installchangelogs 
50         dh_installdocs
51         dh_installexamples
52         dh_install --sourcedir=debian/tmp
53         dh_installman
54         dh_link
55         dh_strip --dbg-package=capi-telephony-sim-dbg
56         dh_fixperms
57         dh_makeshlibs
58         dh_installdeb
59         dh_shlibdeps
60         dh_gencontrol
61         dh_md5sums
62         dh_builddeb
63
64 binary: binary-indep binary-arch
65 .PHONY: build clean binary-indep binary-arch binary install configure
66