#!/usr/bin/make -f # # Ubuntu/Debian build rules file for OOlite # Copyright (c) 2007 Chris Crowther # # Originally based on the exemplar hello project. # # Re-written by Darren Salt # Tweaked by Michael Werle GSMAKE = gs_make JS_SRC = deps/Cross-platform-deps/SpiderMonkey/js/src CFLAGS += -g ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O2 GSMAKE += debug=no override EXT = else CFLAGS += -O0 GSMAKE += debug=yes override EXT = .dbg endif export CFLAGS export GNUSTEP_INSTALLATION_DOMAIN = SYSTEM patch: debian/apply-patches touch patch unpatch: debian/apply-patches -R rm -f patch build: patch build-stamp build-stamp: dh_testdir $(MAKE) -C $(JS_SRC)/fdlibm -f Makefile.ref BUILD_OPT=1 $(MAKE) -C $(JS_SRC) -f Makefile.ref BUILD_OPT=1 $(GSMAKE) libespeak=yes touch $@ clean: clean-stamp unpatch clean-stamp: dh_testdir rm -f build-stamp $(GSMAKE) clean $(MAKE) -C $(JS_SRC)/fdlibm -f Makefile.ref clean $(MAKE) -C $(JS_SRC) -f Makefile.ref clean rm -rf oolite.app oolite.debug rm -f http+_www.apple.com_DTDs_PropertyList-1.0.dtd find $(JS_SRC) -name Linux_All_OPT.OBJ | xargs -r rm -rf dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs ifneq (,$(EXT)) mv -f "oolite.app/oolite$(EXT)" oolite.app/oolite endif binary-indep: build install dh_testdir dh_testroot dh_installchangelogs -i Doc/CHANGELOG.TXT dh_installdocs -i dh_install -i cd debian/oolite-data/usr/lib/GNUstep/Applications/oolite.app && rm -f oolite Resources/Info-gnustep.plist find debian/oolite-data -name .svn | xargs -r rm -rf dh_link -i dh_strip -i dh_compress -i -X.pdf -X.rtf dh_fixperms -i dh_installdeb -i dh_gencontrol -i dh_md5sums -i dh_builddeb -i binary-arch: build install dh_testdir dh_testroot dh_installman -a debian/oolite.6 dh_installmenu -a dh_install -a dh_desktop -a FreeDesktop/oolite.desktop rm -rf debian/oolite/usr/share/doc/oolite find debian/oolite -name .svn | xargs -r rm -rf dh_link -a dh_strip -a dh_compress -a dh_fixperms -a dh_installdeb -a dh_shlibdeps -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a binary: binary-arch binary-indep .PHONY: binary binary-arch binary-indep build clean install