oolite/debian/rules
Michael Werle d915f5fde5 Makefiles - rework to accomodate new Javascript library
(Combined effort from Micha, Konstantinos, and Nikos)
 + removed support for building legacy libjs
 + (Linux only) now use the MacOS update script to auto-download the JS library
     - download script failure checks tweaked for older versions of bash
 + new Makefiles:
     - libjs.make - to download & build libjs (Linux only)
     - config.make - contains shared configuration variables between makefiles
 + debian packaging rules updated to suit



git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4362 127b21dd-08f5-0310-b4b7-95ae10353056
2011-02-16 13:24:56 +00:00

103 lines
2.7 KiB
Makefile
Executable File

#!/usr/bin/make -f
#
# Ubuntu/Debian build rules file for OOlite
# Copyright (c) 2007 Chris Crowther <hikari@hikari.org.uk>
#
# Originally based on the exemplar hello project.
#
# Re-written by Darren Salt
# Tweaked by Michael Werle
GSMAKE = gs_make
GSMAKE_FLAGS = use_deps=no libespeak=yes
UPDATE_SCRIPTS_DIR = deps/Cocoa-deps/scripts
LIBJS_BUILD_DIR = deps/Cross-platform-deps/mozilla/js/src/build-release
CFLAGS += -g
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O2
GSMAKE_FLAGS += debug=no OO_JAVASCRIPT_TRACE=no
override EXT =
else
CFLAGS += -O0
GSMAKE_FLAGS += debug=yes OO_JAVASCRIPT_TRACE=yes
override EXT = .dbg
endif
export CFLAGS
export GNUSTEP_INSTALLATION_DOMAIN = SYSTEM
build: build-stamp
build-stamp: build-libjs-stamp
dh_testdir
$(GSMAKE) $(GSMAKE_FLAGS)
touch $@
build-libjs-stamp:
make -f libjs.make $(GSMAKE_FLAGS)
touch $@
clean: clean-stamp
clean-stamp: clean-libjs-stamp
dh_testdir
rm -f build-stamp
$(GSMAKE) clean $(GSMAKE_FLAGS)
rm -rf oolite.app oolite.debug
rm -f http+_www.apple.com_DTDs_PropertyList-1.0.dtd
dh_clean
clean-libjs-stamp:
-make -f libjs.make clean $(GSMAKE_FLAGS)
rm -f build-libjs-stamp
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
ifneq (,$(EXT))
cp -a "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_lintian -i # Do not fail here, since dh_lintian is only present in debhelper >= 6.0.7, and Ubuntu Hardy has 6.0.4
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 installers/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_lintian -a # Do not fail here, since dh_lintian is only present in debhelper >= 6.0.7, and Ubuntu Hardy has 6.0.4
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