VirtualBox

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

Last change on this file since 7587 was 7585, checked in by vboxsync, 17 years ago

Additions: build fix.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1# $Id: Makefile.kmk 7585 2008-03-26 18:44:48Z vboxsync $
2## @file
3# Makefile for the Cross Platform Guest Additions Driver.
4#
5
6#
7# Copyright (C) 2007 innotek GmbH
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
18DEPTH ?= ../../../../..
19SUB_DEPTH = ../..
20include $(PATH_KBUILD)/subheader.kmk
21
22# PORTME: OSes using mixed case driver names join OS/2, the others join Solaris below.
23
24if1of ($(BUILD_TARGET), os2)
25 #
26 # VBoxGuest - The Guest Additions Driver (mixed case).
27 #
28 ifdef VBOX_WITH_OS2_ADDITIONS
29 SYSMODS.os2 += VBoxGuest
30 LIBRARIES += VBoxGuestLibOs2Hack
31 endif
32 VBoxGuest_TEMPLATE = VBOXGUESTR0
33 VBoxGuest_DEFS = VBGL_VBOXGUEST VBOX_HGCM
34 VBoxGuest_INCS := $(PATH_SUB_CURRENT)
35 ifneq ($(BUILD_TARGET),os2)
36 VBoxGuest_SOURCES = \
37 VBoxGuest-$(BUILD_TARGET).cpp \
38 VBoxGuest.cpp
39 VBoxGuest_LIBS = \
40 $(VBOX_LIB_VBGL_R0BASE) \
41 $(VBOX_LIB_IPRT_GUEST_R0)
42 else # OS/2:
43 # The library order is crusial, so a bit of trickery is necessary.
44 # A library is used to make sure that VBoxGuestA-os2.asm is first in the link. (temporary hack?)
45 VBoxGuest_SOURCES = \
46 VBoxGuestA-os2.asm \
47 VBoxGuest-os2.def
48 #VBoxGuest_LDFLAGS = -s -t -v
49 VBoxGuest_LIBS = \
50 $(TARGET_VBoxGuestLibOs2Hack) \
51 $(VBOX_LIB_VBGL_R0BASE) \
52 $(VBOX_LIB_IPRT_GUEST_R0) \
53 $(VBOX_GCC_LIBGCC) \
54 end
55 ## When debugging init with kDrvTest:
56 #VBoxGuest_NAME = VBoxGst
57
58 VBoxGuestLibOs2Hack_TEMPLATE = VBOXGUESTR0LIB
59 VBoxGuestLibOs2Hack_NOINST = 1
60 VBoxGuestLibOs2Hack_DEFS = $(VBoxGuest_DEFS)
61 VBoxGuestLibOs2Hack_INCS := \
62 $(PATH_SUB_CURRENT) \
63 $(PATH_TARGET) \
64 $(PATH_ROOT)/src/VBox/Runtime/include # for the os2ddk
65 VBoxGuestLibOs2Hack_SOURCES = \
66 VBoxGuest-os2.cpp \
67 VBoxGuest.cpp
68 endif # OS/2
69
70else if1of ($(BUILD_TARGET), freebsd solaris)
71 #
72 # vboxguest - The Guest Additions Driver (lower cased).
73 #
74 SYSMODS.solaris += vboxguest
75 SYSMODS.freebsd += vboxguest
76 vboxguest_TEMPLATE = VBOXGUESTR0
77 vboxguest_DEFS = VBGL_VBOXGUEST VBOX_HGCM
78 vboxguest_INCS := \
79 $(PATH_SUB_CURRENT)
80 vboxguest_INCS.freebsd = \
81 $(PATH_TARGET)
82 vboxguest_SOURCES = \
83 VBoxGuest-$(BUILD_TARGET).c \
84 VBoxGuest.cpp
85 vboxguest_LIBS = \
86 $(VBOX_LIB_VBGL_R0BASE) \
87 $(VBOX_LIB_IPRT_GUEST_R0)
88 vboxguest_DEPS.freebsd = \
89 $(PATH_TARGET)/pci_if.h \
90 $(PATH_TARGET)/bus_if.h \
91 $(PATH_TARGET)/device_if.h
92 vboxguest_CLEAN.freebsd = $(vboxguest_DEPS.freebsd)
93
94 #
95 # FreeBSD: Genereate bus, device and pci interface headers. (explain why)
96 #
97 # We cannot give a output path to the awk program, it will always generate
98 # the header next to the source. So, we'll have to temporarily copy the
99 # source file to the destination direction for it to work out correctly.
100 #
101 VBOX_AWK := /usr/bin/awk
102 $(PATH_TARGET)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m
103 $(call MSG_TOOL,awk,VBoxGuest,$<,$@)
104 $(QUIET)$(CP) -f $(VBOX_FREEBSD_SRC)/kern/bus_if.m $(PATH_TARGET)/bus_if.m
105 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(PATH_TARGET)/bus_if.m -h -p
106 $(QUIET)$(RM) $(PATH_TARGET)/bus_if.m
107
108 $(PATH_TARGET)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m
109 $(call MSG_TOOL,awk,VBoxGuest,$<,$@)
110 $(QUIET)$(CP) -f $(VBOX_FREEBSD_SRC)/kern/device_if.m $(PATH_TARGET)/device_if.m
111 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(PATH_TARGET)/device_if.m -h -p
112 $(QUIET)$(RM) $(PATH_TARGET)/device_if.m
113
114 $(PATH_TARGET)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m
115 $(call MSG_TOOL,awk,VBoxGuest,$<,$@)
116 $(QUIET)$(CP) -f $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m $(PATH_TARGET)/pci_if.m
117 $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(PATH_TARGET)/pci_if.m -h -p
118 $(QUIET)$(RM) $(PATH_TARGET)/pci_if.m
119
120endif
121
122include $(PATH_KBUILD)/subfooter.kmk
123
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