#!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk prefix=/usr crt_xargs= package = mingw-w64-crt target = x86_64-w64-mingw32 sysroot=$(prefix)/$(target) package32 = mingw-w32-crt target32 = i686-w64-mingw32 sysroot32=$(prefix)/$(target32) DESTDIR = $(shell /bin/pwd)/debian/$(package) DESTDIR32 = $(shell /bin/pwd)/debian/$(package32) docdir = debian/$(package)/usr/share/doc/$(package) DEB_INSTALL_DOCS_ALL := src/COPYING DEB_DH_ALWAYS_EXCLUDE := .svn # do not strip anything. # call 'strip' on a mingw lib*.a file causes the ranlib information to # be discarded rendering the libraries useless. DEB_DH_STRIP_ARGS := -Xlib INSTALL_PROGRAM = install common-build-indep:: rm -rf debian/$(package) mkdir -p debian/$(package)$(sysroot) rm -rf build mkdir build cd build && CC=$(target)-gcc CXX=$(target)-g++ ../src/configure --without-headers --host=$(target) --prefix=$(prefix) --datarootdir=$(sysroot)/share --disable-lib32 --enable-lib64 $(crt_xargs) cd build && make rm -rf debian/$(package32) mkdir -p debian/$(package32)$(sysroot32) rm -rf build32 mkdir build32 cd build32 && CC=$(target32)-gcc CXX=$(target32)-g++ ../src/configure --without-headers --host=$(target32) --prefix=$(prefix) --datarootdir=$(sysroot32)/share --disable-lib64 --enable-lib32 $(crt_xargs) cd build32 && make touch common-build-indep clean:: rm -f compile common-install-indep common-build-indep rm -rf *~ debian/$(package) debian/*~ debian/files* debian/substvars debian/compat rm -rf build rm -rf debian/$(package32) rm -rf build32 # # info pages, locale data and man pages are in /usr/$(target)/share # static helper libraries for host system (libiberty.a) are deleted # common-install-indep:: cd build && make DESTDIR=$(DESTDIR) install cd build32 && make DESTDIR=$(DESTDIR32) install touch common-install-indep