1 | # $Id: Makefile.kmk 41477 2012-05-29 11:43:27Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the vboxvideo DRM module (FreeBSD kernel OpenGL module).
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2009-2012 Oracle Corporation
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 |
|
---|
18 |
|
---|
19 | SUB_DEPTH = ../../../../..
|
---|
20 | include $(KBUILD_PATH)/subheader.kmk
|
---|
21 |
|
---|
22 | INSTALLS += vboxvideo-mod
|
---|
23 |
|
---|
24 | ifdef VBOX_WITH_ADDITION_DRIVERS
|
---|
25 | SYSMODS += vboxvideo_drm
|
---|
26 | endif
|
---|
27 | ifneq ($(KBUILD_HOST),freebsd)
|
---|
28 | $(error "The FreeBSD guest additions can only be built on FreeBSD!")
|
---|
29 | endif
|
---|
30 |
|
---|
31 | #
|
---|
32 | # Populate FILES_VBOXVIDEO_DRM_NOBIN
|
---|
33 | #
|
---|
34 | include $(PATH_SUB_CURRENT)/files_vboxvideo_drm
|
---|
35 |
|
---|
36 | # vboxvideo source
|
---|
37 | vboxvideo-mod_INST = $(INST_ADDITIONS)src/vboxvideo_drm/
|
---|
38 | vboxvideo-mod_MODE = a+r,u+w
|
---|
39 | vboxvideo-mod_SOURCES = $(subst ",,$(FILES_VBOXVIDEO_DRM_NOBIN))
|
---|
40 |
|
---|
41 | #
|
---|
42 | # vboxvideo - The Video DRM (Direct Rendering Module) kernel module
|
---|
43 | #
|
---|
44 | # Note! Syntax checking only.
|
---|
45 | #
|
---|
46 | vboxvideo_drm_TEMPLATE = VBOXGUESTR0
|
---|
47 | vboxvideo_drm_NAME = vboxvideo
|
---|
48 | vboxvideo_drm_DEFS = VBOX_WITH_HGCM VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
49 | vboxvideo_drm_DEPS += $(VBOX_SVN_REV_KMK)
|
---|
50 | vboxvideo_drm_INCS.freebsd = \
|
---|
51 | $(vboxvideo_drm_0_OUTDIR) \
|
---|
52 | $(PATH_STAGE)/gen-sys-hdrs
|
---|
53 | vboxvideo_drm_SOURCES = vboxvideo_drm.c
|
---|
54 | vboxvideo_drm_LIBS = \
|
---|
55 | $(VBOX_LIB_VBGL_R0) \
|
---|
56 | $(VBOX_LIB_IPRT_GUEST_R0)
|
---|
57 | vboxvideo_drm_ORDERDEPS.freebsd = \
|
---|
58 | $(PATH_STAGE)/gen-sys-hdrs/pci_if.h \
|
---|
59 | $(PATH_STAGE)/gen-sys-hdrs/bus_if.h \
|
---|
60 | $(PATH_STAGE)/gen-sys-hdrs/device_if.h \
|
---|
61 | $(vboxvideo_drm_0_OUTDIR)/opt_drm.h
|
---|
62 | vboxvideo_drm_CLEAN.freebsd = $(vboxvideo_drm_DEPS)
|
---|
63 |
|
---|
64 | #
|
---|
65 | # Header for DRM not included by us.
|
---|
66 | #
|
---|
67 | $$(vboxvideo_drm_0_OUTDIR)/opt_drm.h:
|
---|
68 | $(QUIET)$(MKDIR) -p $(vboxvideo_drm_0_OUTDIR)
|
---|
69 | $(QUIET)touch $(vboxvideo_drm_0_OUTDIR)/opt_drm.h
|
---|
70 |
|
---|
71 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
72 |
|
---|