rules 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. #./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
  30. export TIGCC=/usr; rm Makefile; ./configure
  31. build: build-stamp
  32. build-stamp: config.status
  33. dh_testdir
  34. # Add here commands to compile the package.
  35. $(MAKE)
  36. touch $@
  37. clean:
  38. dh_testdir
  39. dh_testroot
  40. rm -f build-stamp
  41. # Add here commands to clean up after the build process.
  42. -$(MAKE) distclean
  43. dh_clean
  44. install: build
  45. dh_testdir
  46. dh_testroot
  47. dh_clean -k
  48. dh_installdirs
  49. # Add here commands to install the package into debian/ktigcc
  50. $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/ktigcc install
  51. rm -Rf $(CURDIR)/debian/ktigcc/usr/doc
  52. # Build architecture-independent files here.
  53. binary-indep: build install
  54. # Build architecture-dependent files here.
  55. binary-arch: build install
  56. dh_testdir
  57. dh_testroot
  58. dh_installchangelogs ChangeLog
  59. dh_installdocs
  60. dh_installexamples
  61. dh_install
  62. dh_installman
  63. dh_installmenu
  64. # dh_installpam
  65. # dh_installmime
  66. dh_link
  67. dh_strip
  68. dh_compress
  69. dh_fixperms
  70. dh_makeshlibs
  71. dh_installdeb
  72. dh_shlibdeps
  73. dh_gencontrol
  74. dh_md5sums
  75. dh_builddeb
  76. binary: binary-indep binary-arch
  77. .PHONY: build clean binary-indep binary-arch binary install