Makefile revision 80096fb54d147045204dcc7e3ff273158de03f81
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync#
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync# Makefile for the VirtualBox Linux Guest Drivers.
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync#
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync#
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync#
e64031e20c39650a7bc902a3e1aba613b9415deevboxsync# Copyright (C) 2009 Oracle Corporation
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
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
80096fb54d147045204dcc7e3ff273158de03f81vboxsync @if [ -d vboxsf ]; then \
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync if [ -f vboxguest/Module.symvers ]; then \
80096fb54d147045204dcc7e3ff273158de03f81vboxsync cp vboxguest/Module.symvers vboxsf; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync fi; \
80096fb54d147045204dcc7e3ff273158de03f81vboxsync echo "*** Building 'vboxsf' module ***"; \
80096fb54d147045204dcc7e3ff273158de03f81vboxsync $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxsf; \
80096fb54d147045204dcc7e3ff273158de03f81vboxsync if [ -f vboxsf/vboxsf.ko ]; then \
80096fb54d147045204dcc7e3ff273158de03f81vboxsync cp vboxsf/vboxsf.ko .; \
315856d1cef638b31ac9f73fe6ca4831701f5223vboxsync else \
80096fb54d147045204dcc7e3ff273158de03f81vboxsync cp vboxsf/vboxsf.o .; \
315856d1cef638b31ac9f73fe6ca4831701f5223vboxsync fi; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync fi
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsyncinstall:
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync @$(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxguest install
80096fb54d147045204dcc7e3ff273158de03f81vboxsync @if [ -d vboxsf ]; then \
80096fb54d147045204dcc7e3ff273158de03f81vboxsync $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C vboxsf install; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync fi
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsyncclean:
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync @$(MAKE) -C vboxguest clean
80096fb54d147045204dcc7e3ff273158de03f81vboxsync @if [ -d vboxsf ]; then \
80096fb54d147045204dcc7e3ff273158de03f81vboxsync $(MAKE) -C vboxsf clean; \
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync fi
80096fb54d147045204dcc7e3ff273158de03f81vboxsync rm -f vboxguest.*o vboxsf.*o
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsync
b1ae8b1c40ec6bb82e7984b72712df5661332e2cvboxsyncload:
80096fb54d147045204dcc7e3ff273158de03f81vboxsync @/sbin/rmmod vboxsf || true
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync @/sbin/rmmod vboxguest || true
7b1a1a5dea048e6a23a740ed5b5ef456f3958a0avboxsync @/sbin/insmod vboxguest.ko
80096fb54d147045204dcc7e3ff273158de03f81vboxsync @if [ -f vboxsf.ko ]; then /sbin/insmod vboxsf.ko; fi