1 | # $Id: Makefile.kmk 106061 2024-09-16 14:03:52Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the FreeBSD Shared folder kernel module.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2007-2024 Oracle and/or its affiliates.
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox base platform packages, as
|
---|
10 | # available from https://www.virtualbox.org.
|
---|
11 | #
|
---|
12 | # This program is free software; you can redistribute it and/or
|
---|
13 | # modify it under the terms of the GNU General Public License
|
---|
14 | # as published by the Free Software Foundation, in version 3 of the
|
---|
15 | # License.
|
---|
16 | #
|
---|
17 | # This program is distributed in the hope that it will be useful, but
|
---|
18 | # WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | # General Public License for more details.
|
---|
21 | #
|
---|
22 | # You should have received a copy of the GNU General Public License
|
---|
23 | # along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | #
|
---|
25 | # SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | #
|
---|
27 |
|
---|
28 | SUB_DEPTH = ../../../../..
|
---|
29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
30 |
|
---|
31 | ifneq ($(KBUILD_HOST),freebsd)
|
---|
32 | $(error "The FreeBSD guest additions can only be built on FreeBSD!")
|
---|
33 | endif
|
---|
34 |
|
---|
35 | #
|
---|
36 | # vboxvfs - The Shared Folder Driver
|
---|
37 | #
|
---|
38 | SYSMODS.freebsd += vboxvfs
|
---|
39 | vboxvfs_TEMPLATE = VBoxGuestR0Drv
|
---|
40 | vboxvfs_DEFS = VBOX_WITH_HGCM
|
---|
41 | vboxvfs_INCS = \
|
---|
42 | . \
|
---|
43 | $(vboxvfs_0_OUTDIR)
|
---|
44 | vboxvfs_SOURCES = \
|
---|
45 | vboxvfs_vfsops.c \
|
---|
46 | vboxvfs_vnops.c
|
---|
47 | vboxvfs_LIBS = \
|
---|
48 | $(VBOX_LIB_VBGL_R0) \
|
---|
49 | $(VBOX_LIB_IPRT_GUEST_R0)
|
---|
50 | vboxvfs_DEPS = \
|
---|
51 | $$(vboxvfs_0_OUTDIR)/vnode_if.h \
|
---|
52 | $$(vboxvfs_0_OUTDIR)/vnode_if_newproto.h \
|
---|
53 | $$(vboxvfs_0_OUTDIR)/vnode_if_typedef.h
|
---|
54 | vboxvfs_CLEAN += $(vboxvfs_DEPS)
|
---|
55 |
|
---|
56 | VBOX_AWK := /usr/bin/awk
|
---|
57 |
|
---|
58 | $$(vboxvfs_0_OUTDIR)/vnode_if.h: $(VBOX_FREEBSD_SRC)/kern/vnode_if.src
|
---|
59 | $(call MSG_TOOL,awk,VBoxGuest,$<,$@)
|
---|
60 | $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/vnode_if.awk $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -h
|
---|
61 | $(QUIET)$(MV) $(vboxvfs_0_OUTDIR)/vnode_if.h $(vboxvfs_0_OUTDIR)/vnode_if.h
|
---|
62 |
|
---|
63 | $$(vboxvfs_0_OUTDIR)/vnode_if_newproto.h: $(VBOX_FREEBSD_SRC)/kern/vnode_if.src
|
---|
64 | $(call MSG_TOOL,awk,VBoxGuest,$<,$@)
|
---|
65 | $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/vnode_if.awk $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -p
|
---|
66 | $(QUIET)$(MV) $(vboxvfs_0_OUTDIR)/vnode_if_newproto.h $(vboxvfs_0_OUTDIR)/vnode_if_newproto.h
|
---|
67 |
|
---|
68 | $$(vboxvfs_0_OUTDIR)/vnode_if_typedef.h: $(VBOX_FREEBSD_SRC)/kern/vnode_if.src
|
---|
69 | $(call MSG_TOOL,awk,VBoxGuest,$<,$@)
|
---|
70 | $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/vnode_if.awk $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -q
|
---|
71 | $(QUIET)$(MV) $(vboxvfs_0_OUTDIR)/vnode_if_typedef.h $(vboxvfs_0_OUTDIR)/vnode_if_typedef.h
|
---|
72 |
|
---|
73 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
74 |
|
---|