VirtualBox

source: vbox/trunk/src/VBox/Additions/common/VBoxGuest/Makefile.kmk@ 23487

Last change on this file since 23487 was 23452, checked in by vboxsync, 16 years ago

Makefiles: Corrected properties.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.5 KB
Line 
1# $Id: Makefile.kmk 23452 2009-09-30 20:33:08Z vboxsync $
2## @file
3# Makefile for the Cross Platform Guest Additions Driver.
4#
5
6#
7# Copyright (C) 2007 Sun Microsystems, Inc.
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# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
18# Clara, CA 95054 USA or visit http://www.sun.com if you need
19# additional information or have any questions.
20#
21
22SUB_DEPTH = ../../../../..
23include $(KBUILD_PATH)/subheader.kmk
24
25
26if1of ($(KBUILD_TARGET), \
27 freebsd \
28 $(if $(defined VBOX_WITH_OS2_ADDITIONS),os2,) \
29 $(if $(defined VBOX_WITH_ADDITION_DRIVERS),linux,) \
30 solaris)
31 #
32 # VBoxGuest - The Guest Additions Driver (mixed case).
33 #
34 SYSMODS += VBoxGuest
35 VBoxGuest_TEMPLATE = VBOXGUESTR0
36 VBoxGuest_NAME.freebsd = vboxguest
37 VBoxGuest_NAME.linux = vboxguest
38 VBoxGuest_NAME.solaris = vboxguest
39 VBoxGuest_NOINST.linux = true
40 VBoxGuest_DEFS.linux = KBUILD_MODNAME=KBUILD_STR\(vboxguest\) KBUILD_BASENAME=KBUILD_STR\(vboxguest\) EXPORT_SYMTAB
41 VBoxGuest_DEFS.solaris = VBOX_SVN_REV=$(VBOX_SVN_REV)
42 VBoxGuest_DEPS.solaris += $(VBOX_SVN_REV_KMK)
43 VBoxGuest_DEFS = VBGL_VBOXGUEST VBOX_WITH_HGCM
44 VBoxGuest_INCS = .
45 VBoxGuest_INCS.freebsd = $(PATH_VBoxGuest) $(PATH_INS)/gen-sys-hdrs
46 VBoxGuest_INCS.linux = ../../../Runtime/r0drv/linux
47 ifneq ($(KBUILD_TARGET),os2)
48 ifn1of ($(KBUILD_TARGET), linux freebsd solaris)
49 VBoxGuest_SOURCES = VBoxGuest-$(KBUILD_TARGET).cpp
50 else
51 VBoxGuest_SOURCES = VBoxGuest-$(KBUILD_TARGET).c
52 endif
53 VBoxGuest_SOURCES += VBoxGuest.cpp
54 VBoxGuest_LIBS = \
55 $(VBOX_LIB_VBGL_R0BASE) \
56 $(VBOX_LIB_IPRT_GUEST_R0)
57 VBoxGuest_ORDERDEPS.freebsd = \
58 $(PATH_INS)/gen-sys-hdrs/pci_if.h \
59 $(PATH_INS)/gen-sys-hdrs/bus_if.h \
60 $(PATH_INS)/gen-sys-hdrs/device_if.h
61
62 else # OS/2:
63 # The library order is crucial, so a bit of trickery is necessary.
64 # A library is used to make sure that VBoxGuestA-os2.asm is first in the link. (temporary hack?)
65 VBoxGuest_SOURCES = \
66 VBoxGuestA-os2.asm \
67 VBoxGuest-os2.def
68 #VBoxGuest_LDFLAGS = -s -t -v
69 VBoxGuest_LIBS = \
70 $(TARGET_VBoxGuestLibOs2Hack) \
71 $(VBOX_LIB_VBGL_R0BASE) \
72 $(VBOX_LIB_IPRT_GUEST_R0) \
73 $(VBOX_GCC_LIBGCC) \
74 end
75 ## When debugging init with kDrvTest:
76 #VBoxGuest_NAME = VBoxGst
77
78 # see
79 LIBRARIES += VBoxGuestLibOs2Hack
80 VBoxGuestLibOs2Hack_TEMPLATE = VBOXGUESTR0LIB
81 VBoxGuestLibOs2Hack_NOINST = true
82 VBoxGuestLibOs2Hack_DEFS = $(VBoxGuest_DEFS)
83 VBoxGuestLibOs2Hack_INCS = \
84 . \
85 $(PATH_ROOT)/src/VBox/Runtime/include # for the os2ddk
86 VBoxGuestLibOs2Hack_SOURCES = \
87 VBoxGuest-os2.cpp \
88 VBoxGuest.cpp
89 endif # OS/2
90
91endif # enabled
92
93ifeq ($(KBUILD_TARGET),linux)
94 #
95 # Install the source files and script(s).
96 #
97 include $(PATH_SUB_CURRENT)/linux/files_vboxguest
98 # sources and stuff.
99 INSTALLS += vboxguest-src
100 vboxguest-src_INST = $(INST_ADDITIONS)src/vboxguest/
101 vboxguest-src_MODE = a+r,u+w
102 vboxguest-src_SOURCES = $(subst ",,$(FILES_VBOXGUEST_NOBIN))
103 vboxguest-src_SOURCES += $(if $(VBOX_OSE),,$(vboxguest-sh_0_OUTDIR)/dkms.conf)
104 vboxguest-src_CLEAN = $(vboxguest-sh_0_OUTDIR)/dkms.conf
105
106 $$(vboxguest-sh_0_OUTDIR)/dkms.conf: \
107 $(PATH_SUB_CURRENT)/linux/dkms.conf \
108 $(VBOX_VERSION_STAMP) \
109 | $$(dir $$@)
110 $(call MSG_TOOL,Creating,,$@)
111 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $<
112
113 # scripts.
114 INSTALLS += vboxguest-sh
115 vboxguest-sh_INST = $(INST_ADDITIONS)src/vboxguest/
116 vboxguest-sh_MODE = a+rx,u+w
117 vboxguest-sh_SOURCES = $(subst ",,$(FILES_VBOXGUEST_BIN))
118 vboxguest-sh_SOURCES += $(if $(VBOX_OSE),,$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers)
119 vboxguest-sh_SOURCES += $(vboxguest-sh_0_OUTDIR)/build_in_tmp
120 vboxguest-sh_CLEAN = $(vboxguest-sh_0_OUTDIR)/build_in_tmp
121
122 $$(vboxguest-sh_0_OUTDIR)/build_in_tmp: \
123 $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
124 $(VBOX_VERSION_STAMP) \
125 | $$(dir $$@)
126 $(call MSG_TOOL,Creating,,$@)
127 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxguest;g" --output $@ $<
128 $(QUIET)$(CHMOD) 0755 $@
129
130endif # Linux
131
132include $(KBUILD_PATH)/subfooter.kmk
133
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette