#!/usr/bin/make -f # # Based on the work by Marcus Brinkmann # Rewritten by Guillem Jover # pkg := gnumach pkg_udeb := gnumach-udeb pkg_dbg := gnumach-dbg pkg_dev := gnumach-dev D := $(CURDIR)/debian/tmp D_DBG := $(D)-dbg DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) CFLAGS = -Wall -g -pipe -fno-strict-aliasing ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif drivers := configure: configure.ac autoreconf -fi build/config.status: configure dh_testdir -mkdir build cd build && ../configure $(drivers) \ CFLAGS="$(CFLAGS)" \ --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \ --prefix=/usr \ --exec-prefix=/ build-dbg/config.status: configure dh_testdir -mkdir build-dbg cd build-dbg && ../configure --enable-kdb $(drivers) \ CFLAGS="$(CFLAGS)" \ --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \ --exec-prefix=/ build: build-gnumach-std build-gnumach-dbg build-gnumach-std: build/config.status dh_testdir ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) $(MAKE) -C build else $(MAKE) -C build check endif build-gnumach-dbg: build-dbg/config.status dh_testdir ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) $(MAKE) -C build-dbg else $(MAKE) -C build-dbg check endif clean: dh_testdir rm -f machine rm -rf build build-dbg $(D_DBG) # Clean up autogenerated cruft rm -rf autom4te.cache build-aux rm -f aclocal.m4 config.h.in configure INSTALL Makefile.in find -name '*~' -o -name '*.rej' -o -name '*.orig' | xargs rm -f dh_clean install: build dh_testdir dh_testroot dh_prep -a -rm -rf $(D_DBG) dh_installdirs -a $(MAKE) -C build install \ DESTDIR=$(D) $(MAKE) -C build-dbg install-exec \ DESTDIR=$(D_DBG) \ mv $(D_DBG)/boot/gnumach $(D_DBG)/boot/gnumach-dbg binary: binary-indep binary-arch binary-indep: binary-arch: install dh_testdir dh_testroot dh_install -a -N$(pkg_dbg) --sourcedir=$(D) dh_install -p$(pkg_dbg) --sourcedir=$(D_DBG) dh_installdocs -a dh_installchangelogs -a -k ChangeLog # dh_installinfo -a dh_link -a dh_strip -a -N$(pkg_dbg) dh_compress -p$(pkg) -p$(pkg_udeb) -A boot/gnumach dh_compress -p$(pkg_dbg) boot/gnumach-dbg dh_compress -p$(pkg_dev) dh_fixperms -a dh_installdeb -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a .PHONY: build build-gnumach-std build-gnumach-dbg clean .PHONY: install binary binary-indep binary-arch