VirtualBox

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

Last change on this file since 21104 was 21104, checked in by vboxsync, 15 years ago

another shot at the add build box.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.4 KB
Line 
1# $Id: Makefile.kmk 21104 2009-06-30 21:18: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)
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_INTERMEDIATES.freebsd = \
58 $(PATH_VBoxGuest)/pci_if.h \
59 $(PATH_VBoxGuest)/bus_if.h \
60 $(PATH_VBoxGuest)/device_if.h
61 VBoxGuest_CLEAN.freebsd = $(VBoxGuest_INTERMEDIATES.freebsd)
62
63 else # OS/2:
64 # The library order is crucial, so a bit of trickery is necessary.
65 # A library is used to make sure that VBoxGuestA-os2.asm is first in the link. (temporary hack?)
66 VBoxGuest_SOURCES = \
67 VBoxGuestA-os2.asm \
68 VBoxGuest-os2.def
69 #VBoxGuest_LDFLAGS = -s -t -v
70 VBoxGuest_LIBS = \
71 $(TARGET_VBoxGuestLibOs2Hack) \
72 $(VBOX_LIB_VBGL_R0BASE) \
73 $(VBOX_LIB_IPRT_GUEST_R0) \
74 $(VBOX_GCC_LIBGCC) \
75 end
76 ## When debugging init with kDrvTest:
77 #VBoxGuest_NAME = VBoxGst
78
79 # see
80 LIBRARIES += VBoxGuestLibOs2Hack
81 VBoxGuestLibOs2Hack_TEMPLATE = VBOXGUESTR0LIB
82 VBoxGuestLibOs2Hack_NOINST = true
83 VBoxGuestLibOs2Hack_DEFS = $(VBoxGuest_DEFS)
84 VBoxGuestLibOs2Hack_INCS = \
85 . \
86 $(PATH_ROOT)/src/VBox/Runtime/include # for the os2ddk
87 VBoxGuestLibOs2Hack_SOURCES = \
88 VBoxGuest-os2.cpp \
89 VBoxGuest.cpp
90 endif # OS/2
91
92 ifeq ($(KBUILD_TARGET),freebsd)
93 #
94 # FreeBSD: Genereate bus, device and pci interface headers. (explain why)
95 #
96 # We cannot give a output path to the awk program, it will always generate
97 # the header next to the source. So, we'll have to temporarily copy the
98 # source file to the destination direction for it to work out correctly.
99 #
100 VBOX_AWK := /usr/bin/awk
101 $$(PATH_VBoxGuest)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m
102 $(call MSG_TOOL,awk,VBoxGuest,$<,$@)
103 $(QUIET)$(CP) -f $(VBOX_FREEBSD_SRC)/kern/bus_if.m $(PATH_VBoxGuest)/bus_if.m
104 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(PATH_VBoxGuest)/bus_if.m -h -p
105 $(QUIET)$(RM) $(PATH_VBoxGuest)/bus_if.m
106
107 $$(PATH_VBoxGuest)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m
108 $(call MSG_TOOL,awk,VBoxGuest,$<,$@)
109 $(QUIET)$(CP) -f $(VBOX_FREEBSD_SRC)/kern/device_if.m $(PATH_VBoxGuest)/device_if.m
110 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(PATH_VBoxGuest)/device_if.m -h -p
111 $(QUIET)$(RM) $(PATH_VBoxGuest)/device_if.m
112
113 $$(PATH_VBoxGuest)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m
114 $(call MSG_TOOL,awk,VBoxGuest,$<,$@)
115 $(QUIET)$(CP) -f $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m $(PATH_VBoxGuest)/pci_if.m
116 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(PATH_VBoxGuest)/pci_if.m -h -p
117 $(QUIET)$(RM) $(PATH_VBoxGuest)/pci_if.m
118 endif # FreeBSD
119
120endif # enabled
121
122include $(KBUILD_PATH)/subfooter.kmk
123
Note: See TracBrowser for help on using the repository browser.

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