#!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk prefix=/usr package = mingw-w64-binutils target = x86_64-pc-mingw32 sysroot=$(prefix)/$(target) docdir = debian/$(package)/usr/share/doc/$(package) DESTDIR = $(shell /bin/pwd)/debian/$(package) package32 = mingw-w32-binutils target32 = i686-pc-mingw32 sysroot32=$(prefix)/$(target32) docdir32 = debian/$(package32)/usr/share/doc/$(package32) DESTDIR32 = $(shell /bin/pwd)/debian/$(package32) DEB_INSTALL_DOCS_ALL := src/COPYING DEB_SHLIBDEPS_INCLUDE := debian/$(package)/usr/bin/$(target)-nm debian/$(package32)/usr/bin/$(target32)-nm DEB_DH_ALWAYS_EXCLUDE := .svn INSTALL_PROGRAM = install common-build-arch:: rm -rf build mkdir build cd build && ../src/configure --target=$(target) --prefix=$(prefix) --with-sysroot=$(sysroot) --mandir=$(prefix)/share/man cd build && make rm -rf build32 mkdir build32 cd build32 && ../src/configure --target=$(target32) --prefix=$(prefix) --with-sysroot=$(sysroot32) --mandir=$(prefix)/share/man cd build32 && make touch common-build-arch clean:: rm -f compile common-install-arch common-build-arch rm -rf *~ debian/$(package) debian/*~ debian/files* debian/substvars debian/compat rm -rf build build32 # # info pages, locale data and static libraries may conflict with # already installed binutils packages. # common-install-arch:: rm -rf debian/$(package) mkdir debian/$(package) cd build && make DESTDIR=$(DESTDIR) install rm -rf debian/$(package)/usr/share/locale rm -rf debian/$(package)/usr/info rm -rf debian/$(package)/usr/lib/lib*.a rm -rf debian/$(package32) mkdir debian/$(package32) cd build32 && make DESTDIR=$(DESTDIR32) install rm -rf debian/$(package32)/usr/share/locale rm -rf debian/$(package32)/usr/info rm -rf debian/$(package32)/usr/lib/lib*.a touch common-install-arch