rules 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #!/usr/bin/make -f
  2. # uncomment this to turn on verbose mode.
  3. #export DH_VERBOSE=1
  4. TARGET=$(shell grep -m1 TARGET Makefile | sed "s/ //g" | cut -d "=" -f 2)
  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 linux
  15. touch configure-stamp
  16. build: build-stamp
  17. build-stamp: configure-stamp
  18. dh_testdir
  19. $(MAKE) STRIP=/bin/true
  20. touch $@
  21. clean:
  22. dh_testdir
  23. dh_testroot
  24. rm -f build-stamp configure-stamp
  25. [ ! -f Makefile ] || $(MAKE) distclean
  26. dh_clean
  27. install: build
  28. dh_testdir
  29. dh_testroot
  30. dh_clean -k
  31. dh_installdirs
  32. $(MAKE) DESTDIR=$(CURDIR)/debian/megazeux install
  33. # Build architecture-independent files here.
  34. binary-indep: build install
  35. # We have nothing to do by default.
  36. # Build architecture-dependent files here.
  37. binary-arch: build install
  38. dh_testdir
  39. dh_testroot
  40. dh_installchangelogs
  41. dh_installdocs
  42. dh_installman
  43. dh_link megazeux.1 usr/share/man/man1/$(TARGET).1
  44. dh_strip
  45. dh_compress
  46. dh_fixperms
  47. dh_installdeb
  48. dh_shlibdeps
  49. dh_gencontrol
  50. dh_md5sums
  51. dh_builddeb
  52. binary: binary-indep binary-arch
  53. .PHONY: build clean binary-indep binary-arch binary install configure