rules 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #!/usr/bin/make -f
  2. # uncomment this to turn on verbose mode.
  3. #export DH_VERBOSE=1
  4. include version.inc
  5. CFLAGS = -Wall -g
  6. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  7. CFLAGS += -O0
  8. else
  9. CFLAGS += -O2
  10. endif
  11. configure: configure-stamp
  12. configure-stamp:
  13. dh_testdir
  14. ./config.sh --platform unix --as-needed-hack \
  15. --enable-release $(CONFIG_FLAGS)
  16. touch configure-stamp
  17. build: build-stamp
  18. build-stamp: configure-stamp
  19. dh_testdir
  20. $(MAKE)
  21. touch $@
  22. test: test-stamp
  23. test-stamp: build-stamp
  24. dh_testdir
  25. $(MAKE) test
  26. touch test-stamp
  27. clean:
  28. dh_testdir
  29. dh_testroot
  30. rm -f build-stamp configure-stamp
  31. $(MAKE) distclean
  32. dh_clean
  33. install: test
  34. dh_testdir
  35. dh_testroot
  36. dh_clean -k
  37. dh_installdirs
  38. $(MAKE) DESTDIR=$(CURDIR)/debian/megazeux install
  39. mkdir -p $(CURDIR)/debian/megazeux/usr/share/lintian/overrides
  40. cp debian/binary.lintian-overrides \
  41. $(CURDIR)/debian/megazeux/usr/share/lintian/overrides/megazeux
  42. # Build architecture-independent files here.
  43. binary-indep: build install
  44. # We have nothing to do by default.
  45. # Build architecture-dependent files here.
  46. binary-arch: build install
  47. dh_testdir
  48. dh_testroot
  49. dh_installchangelogs
  50. dh_installdocs
  51. dh_installman
  52. dh_strip --dbg-package=megazeux-dbg
  53. dh_compress
  54. dh_fixperms
  55. dh_installdeb
  56. dh_shlibdeps
  57. dh_gencontrol
  58. dh_md5sums
  59. dh_builddeb
  60. binary: binary-indep binary-arch
  61. .PHONY: build clean binary-indep binary-arch binary install configure