#!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk prefix=/usr package = mingw-w64-binutils target = x86_64-w64-mingw32 sysroot=$(prefix)/$(target) docdir = debian/$(package)/usr/share/doc/$(package) DESTDIR = $(shell /bin/pwd)/debian/$(package) package32 = mingw-w32-binutils target32 = i686-w64-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) --datarootdir=$(prefix)/$(target)/share --localedir=$(prefix)/$(target)/share/locale cd build && make rm -rf build32 mkdir build32 cd build32 && ../src/configure --target=$(target32) --prefix=$(prefix) --with-sysroot=$(sysroot32) --datarootdir=$(prefix)/$(target32)/share --localedir=$(prefix)/$(target32)/share/locale 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 # # --localedir is inored rightaway, so correct it at post-install times. # common-install-arch:: rm -rf debian/$(package) mkdir debian/$(package) cd build && make DESTDIR=$(DESTDIR) install mkdir -p debian/$(package)$(prefix)/$(target)/share mv debian/$(package)$(prefix)/share/locale debian/$(package)$(prefix)/$(target)/share rm -f debian/$(package)$(prefix)/$(target)/share/info/dir rm -rf debian/$(package)/usr/lib/lib*.a rm -rf debian/$(package32) mkdir debian/$(package32) cd build32 && make DESTDIR=$(DESTDIR32) install mkdir -p debian/$(package32)$(prefix)/$(target32)/share mv debian/$(package32)$(prefix)/share/locale debian/$(package32)$(prefix)/$(target32)/share rm -f debian/$(package32)$(prefix)/$(target32)/share/info/dir rm -rf debian/$(package32)/usr/lib/lib*.a touch common-install-arch