VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/installer/Makefile.include.header@ 29743

Last change on this file since 29743 was 28998, checked in by vboxsync, 15 years ago

Linux Additions: rename the vboxvfs module to vboxsf to make it load by demand of the Linux kernel

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1#
2# VirtualBox Guest Additions kernel module Makefile, common parts.
3#
4# (For 2.6.x, the main file must be called 'Makefile'!)
5#
6# Copyright (C) 2006-2007 Oracle Corporation
7#
8# This file is part of VirtualBox Open Source Edition (OSE), as
9# available from http://www.virtualbox.org. This file is free software;
10# you can redistribute it and/or modify it under the terms of the GNU
11# General Public License (GPL) as published by the Free Software
12# Foundation, in version 2 as it comes in the "COPYING" file of the
13# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15#
16
17#
18# These file should be included by the Makefiles for any kernel modules we
19# build as part of the Guest Additions. The intended way of doing this is as
20# follows:
21#
22# # Linux kbuild sets this to our source directory if we are called from
23# # there
24# obj ?= $(CURDIR)
25# include $(obj)/Makefile.include.header
26# MOD_NAME = <name of the module to be built, without extension>
27# MOD_OBJS = <list of object files which should be included>
28# MOD_FLAGS = <any additional CFLAGS which this module needs>
29# include $(obj)/Makefile.include.footer
30#
31# The kmk kBuild define KBUILD_TARGET_ARCH is available.
32#
33# @todo the shared folders module Makefile also includes the following bits.
34# Integrate them if necessary.
35# MOD_FLAGS += -DEXPORT_SYMTAB -DVBGL_VBOXGUEST -DRT_WITH_VBOX
36#
37# # special hack for Fedora Core 6 2.6.18 (fc6), rhel5 2.6.18 (el5),
38# # ClarkConnect 4.3 (cc4) and ClarkConnect 5 (v5)
39# ifeq ($(KERNELRELEASE),)
40# KFLAGS += $(foreach inc,$(KERN_INCL),\
41# $(if $(wildcard $(inc)/linux/utsrelease.h),\
42# $(if $(shell grep '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h; \
43# grep '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h; \
44# grep '"2.6.18.*v5.*"' $(inc)/linux/utsrelease.h; \
45# grep '"2.6.18.*cc4.*"' $(inc)/linux/utsrelease.h),\
46# -DKERNEL_FC6,),))
47# else
48# KFLAGS += $(if $(shell echo "$(KERNELRELEASE)"|grep '2.6.18.*fc6.*';\
49# echo "$(KERNELRELEASE)"|grep '2.6.18.*el5.*';\
50# echo "$(KERNELRELEASE)"|grep '2.6.18.*v5.*';\
51# echo "$(KERNELRELEASE)"|grep '2.6.18.*cc4.*'),\
52# -DKERNEL_FC6,)
53# endif
54#
55## important: Don't remove Module.symvers! DKMS does 'make clean' before building ...
56# rm -rf .vboxsf* .tmp_ver* vboxsf.* Modules.symvers modules.order
57#
58
59#
60# First, figure out which architecture we're targeting and the build type.
61# (We have to support basic cross building (ARCH=i386|x86_64).)
62# While at it, warn about BUILD_* vars found to help with user problems.
63#
64ifneq ($(filter-out amd64 x86,$(BUILD_TARGET_ARCH)),)
65 $(warning Ignoring unknown BUILD_TARGET_ARCH value '$(BUILD_TARGET_ARCH)'.)
66 BUILD_TARGET_ARCH :=
67endif
68ifeq ($(BUILD_TARGET_ARCH),)
69 ifeq ($(ARCH),x86_64)
70 BUILD_TARGET_ARCH := amd64
71 else
72 ifeq ($(ARCH),i386)
73 BUILD_TARGET_ARCH := x86
74 else
75 ifeq ($(filter-out x86_64 amd64 AMD64,$(shell uname -m)),)
76 BUILD_TARGET_ARCH := amd64
77 else
78 BUILD_TARGET_ARCH := x86
79 endif
80 endif
81 endif
82else
83 $(warning Using BUILD_TARGET_ARCH='$(BUILD_TARGET_ARCH)' from the $(origin BUILD_TARGET_ARCH).)
84endif
85
86ifneq ($(filter-out release profile debug strict,$(BUILD_TYPE)),)
87 $(warning Ignoring unknown BUILD_TYPE value '$(BUILD_TYPE)'.)
88 BUILD_TYPE :=
89endif
90ifeq ($(BUILD_TYPE),)
91 BUILD_TYPE := release
92else
93 $(warning Using BUILD_TYPE='$(BUILD_TYPE)' from the $(origin BUILD_TYPE).)
94endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette