Makefile revision d35bc16bb4e4d1795110172a6f4afb9a29d0d0cd
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:
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync @echo "*** Building 'vboxguest' module ***"
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxguest
d35bc16bb4e4d1795110172a6f4afb9a29d0d0cdvboxsync @if [ -f vboxguest/vboxguest.ko ]; then \
d35bc16bb4e4d1795110172a6f4afb9a29d0d0cdvboxsync cp vboxguest/vboxguest.ko .; \
d35bc16bb4e4d1795110172a6f4afb9a29d0d0cdvboxsync else \
d35bc16bb4e4d1795110172a6f4afb9a29d0d0cdvboxsync cp vboxguest/vboxguest.o .; \
d35bc16bb4e4d1795110172a6f4afb9a29d0d0cdvboxsync fi
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @echo
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @if [ -d vboxvfs ]; then \
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync if [ -f vboxguest/Module.symvers ]; then \
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync cp vboxguest/Module.symvers vboxvfs; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync fi; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync echo "*** Building 'vboxvfs' module ***"; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvfs; \
d35bc16bb4e4d1795110172a6f4afb9a29d0d0cdvboxsync if [ -f vboxvfs/vboxvfs.ko ]; then \
d35bc16bb4e4d1795110172a6f4afb9a29d0d0cdvboxsync cp vboxvfs/vboxvfs.ko .; \
315856d1cef638b31ac9f73fe6ca4831701f5223vboxsync else \
d35bc16bb4e4d1795110172a6f4afb9a29d0d0cdvboxsync cp vboxvfs/vboxvfs.o .; \
315856d1cef638b31ac9f73fe6ca4831701f5223vboxsync fi; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync fi
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsyncinstall:
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxguest install
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @if [ -d vboxvfs ]; then \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxvfs install; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync fi
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsyncclean:
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync @$(MAKE) -C vboxguest clean
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @if [ -d vboxvfs ]; then \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync $(MAKE) -C vboxvfs clean; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync fi
315856d1cef638b31ac9f73fe6ca4831701f5223vboxsync rm -f vboxguest.*o vboxvfs.*o
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsyncload:
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @/sbin/rmmod vboxvfs || true
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync @/sbin/rmmod vboxguest || true
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync @/sbin/insmod vboxguest.ko
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync @if [ -f vboxvfs.ko ]; then /sbin/insmod vboxvfs.ko; fi