1 | # $Id: Makefile.kmk 35380 2010-12-30 16:06:17Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the vboxvideo DRM module (FreeBSD kernel OpenGL module).
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2009 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_drm 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 | vboxvideo_drm_TEMPLATE = VBOXGUESTR0
|
---|
45 | vboxvideo_drm_NAME = vboxvideo
|
---|
46 | vboxvideo_drm_DEFS = VBOX_WITH_HGCM VBOX_SVN_REV=$(VBOX_SVN_REV)
|
---|
47 | vboxvideo_drm_DEPS += $(VBOX_SVN_REV_KMK)
|
---|
48 | vboxvideo_drm_INCS.freebsd = \
|
---|
49 | $(vboxvideo_drm_0_OUTDIR) \
|
---|
50 | $(PATH_INS)/gen-sys-hdrs
|
---|
51 | vboxvideo_drm_SOURCES = vboxvideo_drm.c
|
---|
52 | vboxvideo_drm_LIBS = \
|
---|
53 | $(VBOX_LIB_VBGL_R0) \
|
---|
54 | $(VBOX_LIB_IPRT_GUEST_R0)
|
---|
55 | vboxvideo_drm_ORDERDEPS.freebsd = \
|
---|
56 | $(PATH_INS)/gen-sys-hdrs/pci_if.h \
|
---|
57 | $(PATH_INS)/gen-sys-hdrs/bus_if.h \
|
---|
58 | $(PATH_INS)/gen-sys-hdrs/device_if.h \
|
---|
59 | $(vboxvideo_drm_0_OUTDIR)/opt_drm.h
|
---|
60 | vboxvideo_drm_CLEAN.freebsd = $(vboxvideo_drm_DEPS)
|
---|
61 |
|
---|
62 | #
|
---|
63 | # Header for DRM not included by us.
|
---|
64 | #
|
---|
65 | $$(vboxvideo_drm_0_OUTDIR)/opt_drm.h:
|
---|
66 | $(QUIET)$(MKDIR) -p $(vboxvideo_drm_0_OUTDIR)
|
---|
67 | $(QUIET)touch $(vboxvideo_drm_0_OUTDIR)/opt_drm.h
|
---|
68 |
|
---|
69 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
70 |
|
---|