#!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk prefix=/usr package = mingw-w64-gdb target = x86_64-w64-mingw32 prefix = /usr/$(target) docdir = debian/$(package)/usr/share/doc/$(package) builddir = build DESTDIR = $(shell /bin/pwd)/debian/$(package) package32 = mingw-w32-gdb target32 = i686-w64-mingw32 prefix32 = /usr/$(target32) docdir32 = debian/$(package32)/usr/share/doc/$(package32) builddir32 = build32 DESTDIR32 = $(shell /bin/pwd)/debian/$(package32) DEB_INSTALL_DOCS_ALL := src/README src/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-indep:: rm -rf $(builddir) mkdir $(builddir) cd $(builddir) && CC=$(target)-gcc CXX=$(target)-g++ ../src/configure --host=$(target) --prefix=$(prefix) cd $(builddir) && make all rm -rf $(builddir32) mkdir $(builddir32) cd $(builddir32) && CC=$(target32)-gcc CXX=$(target32)-g++ ../src/configure --host=$(target32) --prefix=$(prefix32) cd $(builddir32) && make all touch common-build-indep clean:: rm -f compile common-install-indep common-build-indep rm -rf *~ debian/$(package) debian/$(package32) debian/*~ debian/files* debian/substvars debian/compat rm -rf $(builddir) rm -rf $(builddir32) # # libiberty.a is installed by gcc, so drop it here. # opcodes.mo, bfd.mo, standards.info, configure.info are installed by binutils, # drop these, too. # common-install-indep:: rm -rf debian/$(package) mkdir debian/$(package) cd $(builddir) && make DESTDIR=$(DESTDIR) install rm -f $(DESTDIR)$(prefix)/lib64/libiberty.a rm -rf $(DESTDIR)$(prefix)/share/locale rm -f $(DESTDIR)$(prefix)/share/info/standards.info rm -f $(DESTDIR)$(prefix)/share/info/configure.info rm -f $(DESTDIR)$(prefix)/share/info/bfd.info rm -f $(DESTDIR)$(prefix)/share/info/dir rm -rf debian/$(package32) mkdir debian/$(package32) cd $(builddir32) && make DESTDIR=$(DESTDIR32) install rm -f $(DESTDIR32)$(prefix32)/lib32/libiberty.a rm -rf $(DESTDIR32)$(prefix32)/share/locale rm -f $(DESTDIR32)$(prefix32)/share/info/standards.info rm -f $(DESTDIR32)$(prefix32)/share/info/configure.info rm -f $(DESTDIR32)$(prefix32)/share/info/bfd.info rm -f $(DESTDIR32)$(prefix32)/share/info/dir touch common-install-indep