VirtualBox

source: vbox/trunk/src/VBox/Additions/linux/sharedfolders/Makefile.module@ 105266

Last change on this file since 105266 was 100191, checked in by vboxsync, 17 months ago

*: Some of the easy build fixes for linux.arm64 not warranting their own commit, bugref:10457

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 KB
Line 
1# $Id: Makefile.module 100191 2023-06-16 08:04:11Z vboxsync $
2## @file
3# VBox Linux Shared Folders VFS Module Makefile.
4#
5# (For 2.6.x this file must be 'Makefile'!)
6#
7
8#
9# Copyright (C) 2006-2023 Oracle and/or its affiliates.
10#
11# This file is part of VirtualBox base platform packages, as
12# available from https://www.virtualbox.org.
13#
14# This program is free software; you can redistribute it and/or
15# modify it under the terms of the GNU General Public License
16# as published by the Free Software Foundation, in version 3 of the
17# License.
18#
19# This program is distributed in the hope that it will be useful, but
20# WITHOUT ANY WARRANTY; without even the implied warranty of
21# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22# General Public License for more details.
23#
24# You should have received a copy of the GNU General Public License
25# along with this program; if not, see <https://www.gnu.org/licenses>.
26#
27# SPDX-License-Identifier: GPL-3.0-only
28#
29
30# Linux kbuild sets this to our source directory if we are called from there
31obj ?= $(CURDIR)
32include $(obj)/Makefile-header.gmk
33VBOXSF_DIR = $(VBOX_MODULE_SRC_DIR)
34
35# Allow building directly from the subdirectory without assuming the toplevel
36# makefile has done the copying. Not the default use case, but can be handy.
37ifndef KBUILD_EXTRA_SYMBOLS
38KBUILD_EXTRA_SYMBOLS=$(abspath $(VBOXSF_DIR)/../vboxguest/Module.symvers)
39endif
40
41VBOXMOD_NAME = vboxsf
42VBOXMOD_OBJS = \
43 vfsmod.o \
44 dirops.o \
45 lnkops.o \
46 regops.o \
47 utils.o \
48 VBoxGuestR0LibGenericRequest.o \
49 VBoxGuestR0LibHGCM.o \
50 VBoxGuestR0LibIdc.o \
51 VBoxGuestR0LibIdc-unix.o \
52 VBoxGuestR0LibInit.o \
53 VBoxGuestR0LibPhysHeap.o \
54 VBoxGuestR0LibSharedFolders.o
55ifeq ($(VBOX_KBUILD_TARGET_ARCH),x86)
56VBOXMOD_OBJS += \
57 divdi3.o \
58 moddi3.o \
59 udivdi3.o \
60 udivmoddi4.o \
61 umoddi3.o \
62 qdivrem.o
63endif
64VBOXMOD_INCL = \
65 $(VBOXSF_DIR) \
66 $(VBOXSF_DIR)include \
67 $(VBOXSF_DIR)r0drv/linux
68VBOXMOD_DEFS = \
69 RT_OS_LINUX \
70 IN_RING0 \
71 IN_RT_R0 \
72 IN_SUP_R0 \
73 VBOX \
74 VBOX_WITH_HGCM \
75 IN_MODULE \
76 IN_GUEST \
77 IN_GUEST_R0 \
78 RT_NO_EXPORT_SYMBOL
79ifeq ($(VBOX_KBUILD_TARGET_ARCH),amd64)
80VBOXMOD_DEFS += VBOX_WITH_64_BITS_GUESTS
81endif
82ifeq ($(VBOX_KBUILD_TARGET_ARCH),arm64)
83VBOXMOD_DEFS += VBOX_WITH_64_BITS_GUESTS
84endif
85ifneq ($(filter %uek.x86_64,$(KERN_VER)),)
86VBOXMOD_DEFS += VBOX_UEK
87endif
88VBOXMOD_CFLAGS := $(call VBOX_GCC_CHECK_CC,-Wno-declaration-after-statement,-Wno-declaration-after-statement,,)
89VBOXMOD_CFLAGS += $(call VBOX_GCC_CHECK_CC,-fno-pie,-fno-pie,,)
90ifneq ($(KERN_VERSION),24)
91VBOXMOD_CFLAGS += -include $(VBOXSF_DIR)/include/VBox/VBoxGuestMangling.h
92## @todo r-bird: What's with -fshort-wchar here?? We either need that or we dont, right? It should be 2.6+ only.
93VBOXMOD_CFLAGS += -fshort-wchar
94endif
95ifdef VBOX_NO_OMIT_FRAME_POINTER
96VBOXMOD_CFLAGS += -fno-omit-frame-pointer
97endif
98
99ifneq ($(KERN_VERSION),24)
100# special hack for Fedora Core 6 2.6.18 (fc6), rhel5 2.6.18 (el5),
101# ClarkConnect 4.3 (cc4) and ClarkConnect 5 (v5)
102 ifeq ($(KERNELRELEASE),)
103VBOXMOD_CFLAGS += $(foreach inc,$(KERN_INCL),\
104 $(if $(wildcard $(inc)/linux/utsrelease.h),\
105 $(if $(shell grep '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h; \
106 grep '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h; \
107 grep '"2.6.18.*v5.*"' $(inc)/linux/utsrelease.h; \
108 grep '"2.6.18.*cc4.*"' $(inc)/linux/utsrelease.h),\
109 -DKERNEL_FC6,),))
110 else
111VBOXMOD_CFLAGS += $(if $(shell echo "$(KERNELRELEASE)"|grep '2.6.18.*fc6.*';\
112 echo "$(KERNELRELEASE)"|grep '2.6.18.*el5.*';\
113 echo "$(KERNELRELEASE)"|grep '2.6.18.*v5.*';\
114 echo "$(KERNELRELEASE)"|grep '2.6.18.*cc4.*'),\
115 -DKERNEL_FC6,)
116 endif
117endif
118
119VBOXMOD_CLEAN = . linux r0drv r0drv/linux
120
121include $(obj)/Makefile-footer.gmk
122
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