#!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk package = macosx-intel64-odcctools package32 = macosx-intel32-odcctools target = x86_64-apple-darwin10 target32 = i686-apple-darwin10 prefix = /usr/$(target) prefix32 = /usr/$(target32) docdir = debian/$(package)/usr/share/doc/$(package) builddir = build builddir32 = build32 DESTDIR = $(shell /bin/pwd)/debian/$(package) DESTDIR32 = $(shell /bin/pwd)/debian/$(package32) DEB_INSTALL_DOCS_ALL := 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 debian/$(package) mkdir debian/$(package) rm -rf $(builddir) mkdir $(builddir) cd $(builddir) && CFLAGS="-m32" LDFLAGS="-m32" CXXFLAGS="-m32" ../src/configure --prefix=$(prefix)/usr --target=$(target) --with-sysroot=$(prefix) --enable-ld64 cd $(builddir)/libstuff && make cd $(builddir)/ld64 && make rm -rf debian/$(package32) mkdir debian/$(package32) rm -rf $(builddir32) mkdir $(builddir32) cd $(builddir32) && CFLAGS="-m32" LDFLAGS="-m32" CXXFLAGS="-m32" ../src/configure --prefix=$(prefix32)/usr --target=$(target32) --with-sysroot=$(prefix32) --enable-ld64 cd $(builddir32)/libstuff && make cd $(builddir32)/ld64 && make 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) $(builddir32) # # info pages, locale data and static libraries may conflict with # already installed binutils packages. # common-install-indep:: rm -rf debian/$(package) mkdir debian/$(package) rm -rf debian/$(package32) mkdir debian/$(package32) cd $(builddir)/ld64 && make DESTDIR=$(DESTDIR) install cd $(DESTDIR) && mkdir usr/bin cd $(DESTDIR) && for file in $$(ls usr/$(target)/usr/bin); do (cd usr/bin && ln -s ../$(target)/usr/bin/$$file); done cd $(builddir32)/ld64 && make DESTDIR=$(DESTDIR32) install cd $(DESTDIR32) && mkdir usr/bin cd $(DESTDIR32) && for file in $$(ls usr/$(target32)/usr/bin); do (cd usr/bin && ln -s ../$(target32)/usr/bin/$$file); done touch common-install-indep