VirtualBox

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

Last change on this file since 79449 was 78135, checked in by vboxsync, 6 years ago

linux/vboxsf: Various build fixes for older kernels. bugref:9172

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
1# $Id: Makefile.module 78135 2019-04-16 01:18:25Z 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-2019 Oracle Corporation
10#
11# This file is part of VirtualBox Open Source Edition (OSE), as
12# available from http://www.virtualbox.org. This file is free software;
13# you can redistribute it and/or modify it under the terms of the GNU
14# General Public License (GPL) as published by the Free Software
15# Foundation, in version 2 as it comes in the "COPYING" file of the
16# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
17# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
18#
19
20# Linux kbuild sets this to our source directory if we are called from there
21obj ?= $(CURDIR)
22include $(obj)/Makefile-header.gmk
23VBOXSF_DIR = $(VBOX_MODULE_SRC_DIR)
24
25VBOXMOD_NAME = vboxsf
26VBOXMOD_OBJS = \
27 vfsmod.o \
28 dirops.o \
29 lnkops.o \
30 regops.o \
31 utils.o \
32 VBoxGuestR0LibGenericRequest.o \
33 VBoxGuestR0LibHGCM.o \
34 VBoxGuestR0LibIdc.o \
35 VBoxGuestR0LibIdc-unix.o \
36 VBoxGuestR0LibInit.o \
37 VBoxGuestR0LibPhysHeap.o \
38 VBoxGuestR0LibSharedFolders.o
39ifeq ($(BUILD_TARGET_ARCH),x86)
40VBOXMOD_OBJS += \
41 divdi3.o \
42 moddi3.o \
43 udivdi3.o \
44 udivmoddi4.o \
45 umoddi3.o \
46 qdivrem.o
47endif
48VBOXMOD_INCL = \
49 $(VBOXSF_DIR) \
50 $(VBOXSF_DIR)include \
51 $(VBOXSF_DIR)r0drv/linux
52VBOXMOD_DEFS = \
53 RT_OS_LINUX \
54 IN_RING0 \
55 IN_RT_R0 \
56 IN_SUP_R0 \
57 VBOX \
58 VBOX_WITH_HGCM \
59 IN_MODULE \
60 IN_GUEST \
61 IN_GUEST_R0 \
62 RT_NO_EXPORT_SYMBOL
63ifeq ($(BUILD_TARGET_ARCH),amd64)
64VBOXMOD_DEFS += VBOX_WITH_64_BITS_GUESTS
65endif
66ifneq ($(filter %uek.x86_64,$(KERN_VER)),)
67VBOXMOD_DEFS += VBOX_UEK
68endif
69VBOXMOD_CFLAGS := $(call VBOX_GCC_CHECK_CC,-Wno-declaration-after-statement,-Wno-declaration-after-statement,,)
70VBOXMOD_CFLAGS += $(call VBOX_GCC_CHECK_CC,-fno-pie,-fno-pie,,)
71ifneq ($(KERN_VERSION),24)
72VBOXMOD_CFLAGS += -include $(VBOXSF_DIR)/include/VBox/VBoxGuestMangling.h
73## @todo r-bird: What's with -fshort-wchar here?? We either need that or we dont, right? It should be 2.6+ only.
74VBOXMOD_CFLAGS += -fshort-wchar
75endif
76ifdef VBOX_NO_OMIT_FRAME_POINTER
77VBOXMOD_CFLAGS += -fno-omit-frame-pointer
78endif
79
80ifneq ($(KERN_VERSION),24)
81# special hack for Fedora Core 6 2.6.18 (fc6), rhel5 2.6.18 (el5),
82# ClarkConnect 4.3 (cc4) and ClarkConnect 5 (v5)
83 ifeq ($(KERNELRELEASE),)
84VBOXMOD_CFLAGS += $(foreach inc,$(KERN_INCL),\
85 $(if $(wildcard $(inc)/linux/utsrelease.h),\
86 $(if $(shell grep '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h; \
87 grep '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h; \
88 grep '"2.6.18.*v5.*"' $(inc)/linux/utsrelease.h; \
89 grep '"2.6.18.*cc4.*"' $(inc)/linux/utsrelease.h),\
90 -DKERNEL_FC6,),))
91 else
92VBOXMOD_CFLAGS += $(if $(shell echo "$(KERNELRELEASE)"|grep '2.6.18.*fc6.*';\
93 echo "$(KERNELRELEASE)"|grep '2.6.18.*el5.*';\
94 echo "$(KERNELRELEASE)"|grep '2.6.18.*v5.*';\
95 echo "$(KERNELRELEASE)"|grep '2.6.18.*cc4.*'),\
96 -DKERNEL_FC6,)
97 endif
98endif
99
100VBOXMOD_CLEAN = . linux r0drv r0drv/linux
101
102include $(obj)/Makefile-footer.gmk
103
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