#!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk prefix=/usr package = mingw-w64-gcc-stage1 target = x86_64-w64-mingw32 sysroot=$(prefix)/$(target) package32 = mingw-w32-gcc-stage1 target32 = i686-w64-mingw32 sysroot32=$(prefix)/$(target32) DESTDIR = $(shell /bin/pwd)/debian/$(package) DESTDIR32 = $(shell /bin/pwd)/debian/$(package32) DEB_INSTALL_DOCS_ALL := gcc/COPYING DEB_SHLIBDEPS_INCLUDE := 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-arch:: rm -rf debian/$(package) mkdir -p debian/$(package)$(sysroot) rm -rf gcc/build mkdir gcc/build cd gcc/build && ../configure --disable-multilib --target=$(target) --prefix=$(prefix) --with-sysroot=$(sysroot) --datadir=$(sysroot)/share --mandir=$(sysroot)/share/man --infodir=$(sysroot)/share/info cd gcc/build && make all-gcc rm -rf debian/$(package32) mkdir -p debian/$(package32)$(sysroot32) rm -rf gcc/build32 mkdir gcc/build32 cd gcc/build32 && ../configure --disable-multilib --target=$(target32) --prefix=$(prefix) --with-sysroot=$(sysroot32) --datadir=$(sysroot32)/share --mandir=$(sysroot32)/share/man --infodir=$(sysroot32)/share/info cd gcc/build32 && make all-gcc 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 gcc/build rm -rf *~ debian/$(package32) rm -rf gcc/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-arch:: cd gcc/build && make DESTDIR=$(DESTDIR) install-gcc rm -rf debian/$(package)/usr/lib/lib*.a rm -f debian/$(package)$(sysroot)/share/info/dir cd gcc/build32 && make DESTDIR=$(DESTDIR32) install-gcc rm -rf debian/$(package32)/usr/lib/lib*.a rm -f debian/$(package32)$(sysroot32)/share/info/dir touch common-install-arch