Comment fix
[mim] / debian / rules
1 #!/usr/bin/make -f
2
3 include /usr/share/cdbs/1/rules/debhelper.mk
4 include /usr/share/cdbs/1/class/autotools.mk
5 include /usr/share/cdbs/1/rules/simple-patchsys.mk
6
7 DEB_DH_INSTALL_SOURCEDIR=debian/tmp
8 DEB_DESTDIR=$(CURDIR)/debian/tmp
9
10 DEB_DH_STRIP_ARGS=--dbg-package=mim-pinyin-dbg
11
12 ifeq (,$(findstring nolauncher,$(DEB_BUILD_OPTIONS)))
13         DEB_CONFIGURE_EXTRA_FLAGS+=--enable-maemo-launcher
14 endif
15
16 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
17         DEB_CONFIGURE_EXTRA_FLAGS+=--enable-debug
18 endif
19
20 ifneq (,$(findstring coverage,$(DEB_BUILD_OPTIONS)))
21         SBOX_USE_CCACHE := no
22         DEB_CONFIGURE_EXTRA_FLAGS+=--enable-coverage
23 endif
24
25 ifneq (,$(findstring respui,$(DEB_BUILD_OPTIONS)))
26         DEB_CONFIGURE_EXTRA_FLAGS+=--enable-respui
27 endif
28
29 # Use soft-float and thumb mode if it enabled.
30 ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
31         CFLAGS += -mthumb
32 endif
33
34 ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS)))
35     PARALLEL_JOBS := $(shell echo $(DEB_BUILD_OPTIONS) | \
36             sed -e 's/.*parallel=\([0-9]\+\).*/\1/')
37     ifeq ($(DEB_BUILD_OPTIONS),$(PARALLEL_JOBS))
38         PARALLEL_JOBS := $(shell if [ -f /proc/cpuinfo ]; \
39                     then echo `cat /proc/cpuinfo | grep 'processor' | wc -l`; \
40                                 else echo 1; fi)
41     endif
42     NJOBS := -j$(PARALLEL_JOBS)
43 endif
44 DEB_MAKE_ENVVARS := MAKEFLAGS=$(NJOBS)
45
46 makebuilddir/mim-pinyin:: configure
47 configure:
48         ./autogen.sh
49
50 common-binary-predeb-arch::
51         dh_maemolauncher