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
|
---|
21 | obj ?= $(CURDIR)
|
---|
22 | include $(obj)/Makefile-header.gmk
|
---|
23 | VBOXSF_DIR = $(VBOX_MODULE_SRC_DIR)
|
---|
24 |
|
---|
25 | VBOXMOD_NAME = vboxsf
|
---|
26 | VBOXMOD_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
|
---|
39 | ifeq ($(BUILD_TARGET_ARCH),x86)
|
---|
40 | VBOXMOD_OBJS += \
|
---|
41 | divdi3.o \
|
---|
42 | moddi3.o \
|
---|
43 | udivdi3.o \
|
---|
44 | udivmoddi4.o \
|
---|
45 | umoddi3.o \
|
---|
46 | qdivrem.o
|
---|
47 | endif
|
---|
48 | VBOXMOD_INCL = \
|
---|
49 | $(VBOXSF_DIR) \
|
---|
50 | $(VBOXSF_DIR)include \
|
---|
51 | $(VBOXSF_DIR)r0drv/linux
|
---|
52 | VBOXMOD_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
|
---|
63 | ifeq ($(BUILD_TARGET_ARCH),amd64)
|
---|
64 | VBOXMOD_DEFS += VBOX_WITH_64_BITS_GUESTS
|
---|
65 | endif
|
---|
66 | ifneq ($(filter %uek.x86_64,$(KERN_VER)),)
|
---|
67 | VBOXMOD_DEFS += VBOX_UEK
|
---|
68 | endif
|
---|
69 | VBOXMOD_CFLAGS := $(call VBOX_GCC_CHECK_CC,-Wno-declaration-after-statement,-Wno-declaration-after-statement,,)
|
---|
70 | VBOXMOD_CFLAGS += $(call VBOX_GCC_CHECK_CC,-fno-pie,-fno-pie,,)
|
---|
71 | ifneq ($(KERN_VERSION),24)
|
---|
72 | VBOXMOD_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.
|
---|
74 | VBOXMOD_CFLAGS += -fshort-wchar
|
---|
75 | endif
|
---|
76 | ifdef VBOX_NO_OMIT_FRAME_POINTER
|
---|
77 | VBOXMOD_CFLAGS += -fno-omit-frame-pointer
|
---|
78 | endif
|
---|
79 |
|
---|
80 | ifneq ($(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),)
|
---|
84 | VBOXMOD_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
|
---|
92 | VBOXMOD_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
|
---|
98 | endif
|
---|
99 |
|
---|
100 | VBOXMOD_CLEAN = . linux r0drv r0drv/linux
|
---|
101 |
|
---|
102 | include $(obj)/Makefile-footer.gmk
|
---|
103 |
|
---|