rules revision bbfc28b1a00ce00001b2ead074d47254bec3e5cf
3939cc42d8157258c3e65b99da2415e8adb532d3Tinderbox User#export DH_VERBOSE=1
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# possible overrides:
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# OSE=1 force VBOX_OSE
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt# NOPARALLEL=1 compile with -j1 (-j2 is default)
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt# LINUX=<dir> compile vboxdrv against Linux found in <dir>
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt# VERBOSE=1 verbose build
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt# DEBUG=1 debug build
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt# NOSUBVER=1 disable generation of the sub-version field (which is
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt# either the subversion rev [if available] or the build date)
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt# NODOCS=1 don't build docs, use precompiled UserManual.pdf and
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt# NOMODS=1 don't build any module
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt# HEADLESS=1 build the headless version
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt# STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Huntose := $(if $(OSE),1,$(if $(wildcard $(vboxroot)/src/VBox/Devices/USB),,1))
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Huntifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),)
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt$(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found)
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt# Hack: Xandros is actually Debian/sarge ... :(
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Huntdebrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),)
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt# Ubuntu dapper: gcc-4.0 does not work with recompiler, use gcc-3.4 instead
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt cd $(vboxroot) && ./configure --odir=$(current)/debian $(if \
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) $(if \
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt $(filter _Ubuntu_dapper,$(debrel)),--with-gcc=gcc-3.4 --with-g++=g++-3.4,) $(if \
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt $(filter _xandros4.1,$(debrel)),--build-xalan,) $(if \
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt $(filter _xandros4.1 _ucs1.3,$(debrel)),--disable-sdl-ttf,) $(if \
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt $(HEADLESS),--build-headless,) $(if $(DEBUG),--build-debug,)
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt $(VERBOSE),--print-directory,--no-print-directory) $(if \
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt VBOX_WITH_LINUX_ADDITIONS= VBOX_WITH_WIN32_ADDITIONS=,) \
f9ee67d9cef83dacac985d0f89e34cc0ac65948bMark Andrews $(if $(NODOCS),cp $(vboxroot)/prebuild/UserManual.pdf $(builddir)/bin,)
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt $(if $(NODOCS),cp $(vboxroot)/prebuild/VirtualBox.chm $(builddir)/bin,)
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt $(if $(STAGEDISO),cp $(STAGEDISO)/VBoxGuestAdditions.iso $(builddir)/bin/additions,)
e32d354f754a5d7847a0862bcd6302827ea225bfEvan Hunt $(VERBOSE),--print-directory,--no-print-directory) $(if \
dh_clean -k
install -D -g 0 -o 0 -m 0644 \
dh_link \
for f in \