#!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk package = macosx-intel64-gcc #package32 = macosx-intel32-gcc 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:: export PATH=$PATH:/usr/$(target)/usr/bin rm -rf debian/$(package) mkdir debian/$(package) rm -rf $(builddir) mkdir $(builddir) cd $(builddir) && CFLAGS="-m32" CXXFLAGS="$CFLAGS" LDFLAGS="-m32" ../src/configure --prefix=$(prefix)/usr \ --disable-checking \ --enable-languages=c,objc,c++,obj-c++ \ --with-as=$(prefix)/usr/bin/$(target)-as \ --with-ld=$(prefix)/usr/bin/$(target)-ld64 \ --with-ar=$(prefix)/usr/bin/$(target)-ar \ --target=$(target) \ --with-sysroot=$(prefix) \ --enable-static \ --enable-shared \ --enable-nls \ --disable-multilib \ --disable-werror \ --enable-libgomp \ --with-gxx-include-dir=$(prefix)/usr/include/c++/4.2.1 \ --with-ranlib=$(prefix)/usr/bin/$(target)-ranlib \ --with-lipo=$(prefix)/usr/bin/$(target)-lipo cd $(builddir) && make #rm -rf debian/$(package32) #mkdir debian/$(package32) #rm -rf $(builddir32) #mkdir $(builddir32) #cd $(builddir32) && CFLAGS="-m32" CXXFLAGS="$CFLAGS" LDFLAGS="-m32" \ # ../src/configure --prefix=$(prefix32)/usr \ # --disable-checking \ # --enable-languages=c,objc,c++,obj-c++ \ # --with-as=$(prefix32)/usr/bin/$(target32)-as \ # --with-ld=$(prefix32)/usr/bin/$(target32)-ld64 \ # --with-ar=$(prefix32)/usr/bin/$(target32)-ar \ # --target=$(target32) \ # --with-sysroot=$(prefix32) \ # --enable-static \ # --enable-shared \ # --enable-nls \ # --disable-multilib \ # --disable-werror \ # --enable-libgomp \ # --with-gxx-include-dir=$(prefix32)/usr/include/c++/4.2.1 #cd $(builddir32) && make clean:: rm -f compile common-install-indep common-build-indep rm -rf *~ debian/$(package) debian/*~ debian/files* debian/substvars debian/compat #debian/$(package32) 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) && make DESTDIR=$(DESTDIR) install #cd $(builddir32) && make DESTDIR=$(DESTDIR32) install touch common-install-indep