rules 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. build:
  27. dh_testdir
  28. # Add here commands to compile the package.
  29. #$(MAKE)
  30. # No build.
  31. rm ChangeLog; ln -s CHANGELOG ChangeLog;
  32. touch $@
  33. clean:
  34. dh_testdir
  35. dh_testroot
  36. rm -f build-stamp
  37. # Add here commands to clean up after the build process.
  38. #-$(MAKE) distclean
  39. # No clean.
  40. dh_clean
  41. install: build
  42. dh_testdir
  43. dh_testroot
  44. dh_clean -k
  45. dh_installdirs
  46. # Add here commands to install the package into debian/tigcc.
  47. #$(MAKE) DESTDIR=$(CURDIR)/debian/tigcc install
  48. # No install.
  49. mkdir -p /tmp/tigcc
  50. export TIGCC=/tmp/tigcc
  51. #./scripts/Install_All
  52. mkdir -p $(CURDIR)/debian/tigcc/usr
  53. mkdir -p $(CURDIR)/debian/tigcc/usr/local
  54. mkdir -p $(CURDIR)/debian/tigcc/usr/local/tigcc
  55. cp -R /tmp/tigcc $(CURDIR)/debian/tigcc/usr/local
  56. # Build architecture-independent files here.
  57. binary-indep: build install
  58. # Build architecture-dependent files here.
  59. binary-arch: build install
  60. dh_testdir
  61. dh_testroot
  62. dh_installchangelogs ChangeLog
  63. dh_installdocs
  64. dh_installexamples
  65. dh_install
  66. dh_installman
  67. dh_installmenu
  68. # dh_installpam
  69. # dh_installmime
  70. dh_link
  71. dh_strip
  72. dh_compress
  73. dh_fixperms
  74. dh_makeshlibs
  75. dh_installdeb
  76. dh_shlibdeps
  77. dh_gencontrol
  78. dh_md5sums
  79. dh_builddeb
  80. binary: binary-indep binary-arch
  81. .PHONY: build clean binary-indep binary-arch binary install