File: rules

package info (click to toggle)
oolite 1.76.1-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 26,660 kB
  • sloc: objc: 100,667; ansic: 2,314; makefile: 29; sh: 1
file content (70 lines) | stat: -rwxr-xr-x 2,530 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/make -f

# Ubuntu/Debian build rules file for OOlite

# Copyright (c) 2007-2009 Chris Crowther <hikari@hikari.org.uk>
# Copyright (c) 2009      Darren Salt <linux@youmustbejoking.demon.co.uk>
# Copyright (c) 2009      Michael Werle <micha@michaelwerle.com>
# Copyright (c) 2010-2012 Nicolas Boulenguez <nicolas.boulenguez@free.fr>

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@

GSMAKE := gs_make
GSMAKE += messages=yes # Display compilation flags to log checkers.

# Usually, "debug=yes strip=no" would be enough, but upstream uses
# "debug" to toggle mozjs features absent from the packaged
# libmozjs185-dev. So we failback to an Ugly Work-Around.
ifneq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
  GSMAKE += STRIP=true
endif

# Oolite configuration. Non-default settings may require libpng12-dev
# libffi-dev, or even libmozjs recompilation.
GSMAKE += ESPEAK=no # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591717
GSMAKE += OO_JAVASCRIPT_TRACE=no # Forced by libmozjs185 settings
GSMAKE += DEPLOYMENT_RELEASE_CONFIGURATION=yes

# Use Debian default build options.
include /usr/share/dpkg/buildflags.mk
GSMAKE += CFLAGS="$(CFLAGS)"
GSMAKE += CPPFLAGS="$(CPPFLAGS)"
GSMAKE += LDFLAGS="-Wl,--as-needed $(LDFLAGS)"
GSMAKE += OBJCFLAGS="$(CFLAGS)"

# Ignore GNUSTEP optimization setting, noopt is handled by CFLAGS.
GSMAKE += OPTFLAG=""

# Use all processors unless parallel is set in DEB_BUILD_OPTIONS.
# http://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
NUMJOBS := $(filter parallel=%,$(DEB_BUILD_OPTIONS))
ifneq (,$(NUMJOBS))
  GSMAKE += --jobs=$(subst parallel=,,$(NUMJOBS))
else
  GSMAKE += --jobs=$(shell getconf _NPROCESSORS_ONLN)
endif

override_dh_auto_build:
	$(GSMAKE)

override_dh_auto_clean:
	$(GSMAKE) distclean clean
	rm -rf oolite.app

override_dh_installchangelogs:
	dh_installchangelogs --all Doc/CHANGELOG.TXT