rules revision a0a9f39e8864357c2e1e61106958411240f5bf6b
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift# Copyright (C) 2006-2008 Sun Microsystems, Inc.
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift# This file is part of VirtualBox Open Source Edition (OSE), as
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift# available from http://www.virtualbox.org. This file is free software;
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift# you can redistribute it and/or modify it under the terms of the GNU
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift# General Public License as published by the Free Software Foundation,
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift# distribution. VirtualBox OSE is distributed in the hope that it will
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift# be useful, but WITHOUT ANY WARRANTY of any kind.
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift#export DH_VERBOSE=1
9355c1819517672f3cfe09356402fe0257c96facmatthew_swift# possible overrides:
9355c1819517672f3cfe09356402fe0257c96facmatthew_swift# OSE=1 force VBOX_OSE
9355c1819517672f3cfe09356402fe0257c96facmatthew_swift# NOPARALLEL=1 compile with -j1
9355c1819517672f3cfe09356402fe0257c96facmatthew_swift# LINUX=<dir> compile vboxdrv against Linux found in <dir>
9355c1819517672f3cfe09356402fe0257c96facmatthew_swift# VERBOSE=1 verbose build
9355c1819517672f3cfe09356402fe0257c96facmatthew_swift# DEBUG=1 debug build
9355c1819517672f3cfe09356402fe0257c96facmatthew_swift# NOSUBVER=1 disable generation of the sub-version field (which is
9355c1819517672f3cfe09356402fe0257c96facmatthew_swift# either the subversion rev [if available] or the build date)
9355c1819517672f3cfe09356402fe0257c96facmatthew_swift# NODOCS=1 don't build docs, use precompiled UserManual.pdf and
9355c1819517672f3cfe09356402fe0257c96facmatthew_swift# NOMODS=1 don't build any module
9355c1819517672f3cfe09356402fe0257c96facmatthew_swift# HEADLESS=1 build the headless version
9355c1819517672f3cfe09356402fe0257c96facmatthew_swift# STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift ifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),)
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift $(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found)
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift# Hack: Xandros is actually Debian/sarge ... :(
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swiftifneq ($(wildcard /etc/xandros-desktop-version),)
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift debrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),unknown)
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swiftgccver := $(subst ., ,$(shell gcc -dumpversion))
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swiftdebcfgs := VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/$(verpkg)\""
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift# Ubuntu dapper: gcc-4.0 does not work with recompiler, use gcc-3.4 instead
8d18638f85d4e46af664e5fc3c7c01ac0dfa7625matthew_swift cd $(vboxroot) && ./configure --odir=$(current)/debian --disable-qt3 $(if \
8d18638f85d4e46af664e5fc3c7c01ac0dfa7625matthew_swift $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) $(if \
8d18638f85d4e46af664e5fc3c7c01ac0dfa7625matthew_swift $(filter _Ubuntu_dapper,$(debrel)),--with-gcc=gcc-3.4 --with-g++=g++-3.4,) $(if \
8d18638f85d4e46af664e5fc3c7c01ac0dfa7625matthew_swift $(shell test $(gccvmaj) -eq 4 -a $(gccvmin) -gt 2 -o $(gccvmaj) -gt 4 && echo "yes"),--with-gcc=gcc-4.2 --with-g++=g++-4.2,) $(if \
8d18638f85d4e46af664e5fc3c7c01ac0dfa7625matthew_swift $(filter _xandros4.1 _ucs1.3,$(debrel)),--disable-sdl-ttf,) $(if \
8d18638f85d4e46af664e5fc3c7c01ac0dfa7625matthew_swift $(HEADLESS),--build-headless,) $(if $(DEBUG),--build-debug,)
8d18638f85d4e46af664e5fc3c7c01ac0dfa7625matthew_swiftbuild: debian/configure-stamp debian/build-stamp
64aae404dc4f3954c28e02993024eb22f456050dmatthew_swift $(VERBOSE),--print-directory,--no-print-directory) $(if \
$(debcfgs) \
$(debcfgs) \
dh_clean -k
VBoxHeadless; do \
install -D -g 0 -o 0 -m 0644 \
install -D -g 0 -o 0 -m 0644 \
dh_link \
sed \
sed \
dh_strip --keep-debug --exclude=libVBoxQtCore.so.4 --exclude=libVBoxQtGui.so.4 --exclude=libVBoxQtNetwork.so.4 --exclude=libqtaccessiblewidgets.so
for f in \
dh_gencontrol -- \