1 #!/usr/bin/make -f 2 # MAde with the aid of dh_make, by Craig Small 3 # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. 4 # Some lines taken from debmake, by Cristoph Lameter. 5 6 # Uncomment this to turn on verbose mode. 7 #export DH_VERBOSE=1 8 9 # These are used for cross-compiling and for saving the configure script 10 # from having to guess our platform (since we know it already) 11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) 12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) 13 14 CFLAGS = 15 16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) 17 CFLAGS += -O0 18 else 19 CFLAGS += -O2 20 endif 21 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) 22 INSTALL_PROGRAM += -s 23 endif 24 25 26 configure: configure-stamp 27 configure-stamp: 28 dh_testdir 29 30 CFLAGS="$(CFLAGS)" ./configure \ 31 --host=$(DEB_HOST_GNU_TYPE) \ 32 --build=$(DEB_BUILD_GNU_TYPE) \ 33 --prefix=/usr \ 34 --mandir=\$${prefix}/share/man \ 35 --sysconfdir=/etc \ 36 --program-transform-name='s,^,b,' 37 38 touch configure-stamp 39 40 build: build-stamp 41 build-stamp: configure-stamp 42 dh_testdir 43 44 $(MAKE) 45 46 touch build-stamp 47 48 clean: 49 dh_testdir 50 dh_testroot 51 52 [ ! -f Makefile ] || $(MAKE) clean 53 54 rm -f configure-stamp build-stamp install-stamp \ 55 config.cache config.h config.status config.log makefile 56 57 rm -f *.o yacc 58 59 dh_clean 60 61 install: install-stamp 62 install-stamp: build-stamp 63 dh_testdir 64 dh_testroot 65 dh_clean -k 66 dh_installdirs 67 68 $(MAKE) install DESTDIR=$(CURDIR)/debian/byacc 69 70 touch install-stamp 71 72 # Build architecture-independent files here. 73 binary-indep: build install 74 # No binary-indep target. 75 76 # Build architecture-dependent files here. 77 binary-arch: build install 78 dh_testdir 79 dh_testroot 80 dh_installdocs 81 dh_installexamples 82 dh_installchangelogs CHANGES 83 dh_strip 84 dh_compress 85 dh_fixperms 86 dh_installdeb 87 dh_shlibdeps 88 dh_gencontrol 89 dh_md5sums 90 dh_builddeb 91 92 binary: binary-indep binary-arch 93 .PHONY: build clean binary-indep binary-arch binary install install-stamp 94