rules 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #!/usr/bin/make -f
  2. # These would be needed to create usr/lib/pkgconfig/*.pc files
  3. #include /usr/share/cdbs/1/rules/debhelper.mk
  4. #include /usr/share/cdbs/1/class/autotools.mk
  5. DEB_BUILD_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)
  6. CFLAGS = -Wall -g -fPIC
  7. #To disable fastpath asserts uncomment following line
  8. #CFLAGS += -DFASTPATH=1
  9. #To disable asserts all together uncomment following line
  10. #CFLAGS += -DNDEBUG=1
  11. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  12. CFLAGS += -O0 -rdynamic -fno-omit-frame-pointer -mapcs-frame
  13. else
  14. CFLAGS += -O3
  15. endif
  16. ifeq ($(DEB_BUILD_ARCH),armel)
  17. CFLAGS += -mfpu=neon -mfloat-abi=softfp
  18. endif
  19. ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
  20. ifeq ($(DEB_BUILD_ARCH), armel)
  21. CFLAGS += -mthumb
  22. endif
  23. endif
  24. CONFIGURE_ARGS = \
  25. --enable-shave=no \
  26. --enable-cmtspeech
  27. configure: configure-stamp
  28. configure-stamp:
  29. dh_testdir
  30. CFLAGS="${CFLAGS}" ./bootstrap.sh $(CONFIGURE_ARGS)
  31. touch $@
  32. build: build-stamp
  33. build-stamp: configure-stamp
  34. dh_testdir
  35. $(MAKE)
  36. touch $@
  37. clean:
  38. dh_testdir
  39. dh_testroot
  40. rm -f build-stamp configure-stamp
  41. [ ! -f Makefile ] || $(MAKE) distclean
  42. dh_clean
  43. install: build
  44. dh_testdir
  45. dh_testroot
  46. dh_clean -k
  47. dh_installdirs
  48. dh_installmodules -ppulseaudio-module-nokia-cmtspeech
  49. $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
  50. mkdir -p $(CURDIR)/debian/tmp/usr/share/lintian
  51. cp -a $(CURDIR)/debian/overrides $(CURDIR)/debian/tmp/usr/share/lintian
  52. binary-indep: build install
  53. dh_installudev -ppulseaudio-module-nokia-cmtspeech --priority=93
  54. binary-arch: build install
  55. dh_testdir
  56. dh_testroot
  57. dh_install --sourcedir=debian/tmp
  58. dh_link
  59. dh_strip --dbg-package=pulseaudio-module-nokia-common-dbg -p pulseaudio-module-nokia-common
  60. dh_strip --dbg-package=pulseaudio-module-nokia-voice-dbg -p pulseaudio-module-nokia-voice
  61. dh_strip --dbg-package=pulseaudio-module-nokia-cmtspeech-dbg -p pulseaudio-module-nokia-cmtspeech
  62. dh_strip --dbg-package=pulseaudio-module-nokia-music-dbg -p pulseaudio-module-nokia-music
  63. dh_strip --dbg-package=pulseaudio-module-nokia-record-dbg -p pulseaudio-module-nokia-record
  64. dh_strip --dbg-package=pulseaudio-module-nokia-test-dbg -p pulseaudio-module-nokia-test
  65. dh_strip --dbg-package=pulseaudio-module-nokia-mainvolume-dbg -p pulseaudio-module-nokia-mainvolume
  66. dh_fixperms
  67. dh_installdocs
  68. dh_installchangelogs
  69. dh_installdeb
  70. dh_compress
  71. dh_shlibdeps
  72. dh_gencontrol
  73. dh_md5sums
  74. dh_builddeb
  75. binary: binary-indep binary-arch
  76. .PHONY: build clean binary-indep binary-arch binary install configure