1 | # $Id: Makefile.kmk 106061 2024-09-16 14:03:52Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the vboxvideo DRM module (FreeBSD kernel OpenGL module).
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2009-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 |
|
---|
29 | SUB_DEPTH = ../../../../..
|
---|
30 | include $(KBUILD_PATH)/subheader.kmk
|
---|
31 |
|
---|
32 | INSTALLS += vboxvideo-mod
|
---|
33 |
|
---|
34 | ifdef VBOX_WITH_ADDITION_DRIVERS
|
---|
35 | SYSMODS += vboxvideo_drm
|
---|
36 | endif
|
---|
37 | ifneq ($(KBUILD_HOST),freebsd)
|
---|
38 | $(error "The FreeBSD guest additions can only be built on FreeBSD!")
|
---|
39 | endif
|
---|
40 |
|
---|
41 | #
|
---|
42 | # Populate FILES_VBOXVIDEO_DRM_NOBIN
|
---|
43 | #
|
---|
44 | include $(PATH_SUB_CURRENT)/files_vboxvideo_drm
|
---|
45 |
|
---|
46 | # vboxvideo source
|
---|
47 | vboxvideo-mod_INST = $(INST_ADDITIONS)src/vboxvideo_drm/
|
---|
48 | vboxvideo-mod_MODE = a+r,u+w
|
---|
49 | vboxvideo-mod_SOURCES = $(subst ",,$(FILES_VBOXVIDEO_DRM_NOBIN))
|
---|
50 |
|
---|
51 | #
|
---|
52 | # vboxvideo - The Video DRM (Direct Rendering Module) kernel module
|
---|
53 | #
|
---|
54 | # Note! Syntax checking only.
|
---|
55 | #
|
---|
56 | vboxvideo_drm_TEMPLATE = VBoxGuestR0Drv
|
---|
57 | vboxvideo_drm_NAME = vboxvideo
|
---|
58 | vboxvideo_drm_DEFS = VBOX_WITH_HGCM VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
59 | vboxvideo_drm_DEPS += $(VBOX_SVN_REV_KMK)
|
---|
60 | vboxvideo_drm_INCS.freebsd = \
|
---|
61 | $(vboxvideo_drm_0_OUTDIR) \
|
---|
62 | $(PATH_STAGE)/gen-sys-hdrs
|
---|
63 | vboxvideo_drm_SOURCES = vboxvideo_drm.c
|
---|
64 | vboxvideo_drm_LIBS = \
|
---|
65 | $(VBOX_LIB_VBGL_R0) \
|
---|
66 | $(VBOX_LIB_IPRT_GUEST_R0)
|
---|
67 | vboxvideo_drm_ORDERDEPS.freebsd = \
|
---|
68 | $(PATH_STAGE)/gen-sys-hdrs/pci_if.h \
|
---|
69 | $(PATH_STAGE)/gen-sys-hdrs/bus_if.h \
|
---|
70 | $(PATH_STAGE)/gen-sys-hdrs/device_if.h \
|
---|
71 | $(vboxvideo_drm_0_OUTDIR)/opt_drm.h
|
---|
72 | vboxvideo_drm_CLEAN.freebsd = $(vboxvideo_drm_DEPS)
|
---|
73 |
|
---|
74 | #
|
---|
75 | # Header for DRM not included by us.
|
---|
76 | #
|
---|
77 | $$(vboxvideo_drm_0_OUTDIR)/opt_drm.h:
|
---|
78 | $(QUIET)$(MKDIR) -p $(vboxvideo_drm_0_OUTDIR)
|
---|
79 | $(QUIET)touch $(vboxvideo_drm_0_OUTDIR)/opt_drm.h
|
---|
80 |
|
---|
81 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
82 |
|
---|