rules 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #!/usr/bin/make -f
  2. # -*- makefile -*-
  3. # Sample debian/rules that uses debhelper.
  4. # This file was originally written by Joey Hess and Craig Small.
  5. # As a special exception, when this file is copied by dh-make into a
  6. # dh-make output file, you may use that output file without restriction.
  7. # This special exception was added by Craig Small in version 0.37 of dh-make.
  8. # Uncomment this to turn on verbose mode.
  9. export DH_VERBOSE=1
  10. # These are used for cross-compiling and for saving the configure script
  11. # from having to guess our platform (since we know it already)
  12. DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
  13. DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
  14. CFLAGS = -Wall -g
  15. ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  16. CFLAGS += -O0
  17. else
  18. CFLAGS += -O2
  19. endif
  20. ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
  21. CFLAGS += -g
  22. endif
  23. ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  24. INSTALL_PROGRAM += -s
  25. endif
  26. config.status: configure
  27. dh_testdir
  28. # Add here commands to configure the package.
  29. export TIGCC=/usr; rm Makefile; ./configure --prefix=/usr
  30. build: build-stamp
  31. build-stamp: config.status
  32. dh_testdir
  33. # Add here commands to compile the package.
  34. $(MAKE)
  35. touch $@
  36. clean:
  37. dh_testdir
  38. dh_testroot
  39. rm -f build-stamp
  40. # Add here commands to clean up after the build process.
  41. -$(MAKE) distclean
  42. dh_clean
  43. install: build
  44. dh_testdir
  45. dh_testroot
  46. dh_clean -k
  47. dh_installdirs
  48. # Add here commands to install the package into debian/ktigcc
  49. $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/ktigcc install
  50. rm -Rf $(CURDIR)/debian/ktigcc/usr/doc
  51. # Build architecture-independent files here.
  52. binary-indep: build install
  53. # Build architecture-dependent files here.
  54. binary-arch: build install
  55. dh_testdir
  56. dh_testroot
  57. dh_installchangelogs ChangeLog
  58. dh_installdocs
  59. dh_installexamples
  60. dh_install
  61. dh_installman
  62. dh_installmenu
  63. # dh_installpam
  64. # dh_installmime
  65. dh_link
  66. dh_strip
  67. dh_compress
  68. dh_fixperms
  69. dh_makeshlibs
  70. dh_installdeb
  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