Makefile revision b1ae8b1c40ec6bb82e7984b72712df5661332e2c
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync#
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# Makefile for the VirtualBox Linux Guest Drivers.
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync#
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync#
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync#
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# Copyright (C) 2009 Sun Microsystems, Inc.
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync#
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# This file is part of VirtualBox Open Source Edition (OSE), as
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# available from http://www.virtualbox.org. This file is free software;
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# you can redistribute it and/or modify it under the terms of the GNU
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# General Public License (GPL) as published by the Free Software
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# Foundation, in version 2 as it comes in the "COPYING" file of the
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync#
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# Clara, CA 95054 USA or visit http://www.sun.com if you need
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# additional information or have any questions.
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync#
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsyncKBUILD_VERBOSE =
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsyncall:
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @echo "*** Building 'vboxadd' module ***"
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxadd
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @cp vboxadd/vboxadd.ko .
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @echo
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @if [ -d vboxvfs ]; then \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync if [ -f vboxadd/Module.symvers ]; then \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync cp vboxadd/Module.symvers vboxvfs; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync fi; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync echo "*** Building 'vboxvfs' module ***"; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvfs; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync cp vboxvfs/vboxvfs.ko .; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync fi
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsyncinstall:
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxadd install
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @if [ -d vboxvfs ]; then \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvfs install; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync fi
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsyncclean:
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @$(MAKE) -C vboxadd clean
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @if [ -d vboxvfs ]; then \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync $(MAKE) -C vboxvfs clean; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync fi
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync rm -f vboxadd.ko vboxvfs.ko
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsyncload:
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @/sbin/rmmod vboxvfs || true
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @/sbin/rmmod vboxadd || true
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @/sbin/insmod vboxadd.ko
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @if [ -f vboxvfs.ko ]; then /sbin/insmod vboxvfs.ko; fi