VirtualBox

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

Last change on this file since 16684 was 16013, checked in by vboxsync, 16 years ago

VBoxGuest/Makefile: Corrected indentation.

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