VirtualBox

source: vbox/trunk/src/VBox/ExtPacks/VNC/Makefile.kmk@ 41801

Last change on this file since 41801 was 41477, checked in by vboxsync, 13 years ago

/Makefile.kmk: Cosmetic changes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.7 KB
Line 
1# $Id: Makefile.kmk 41477 2012-05-29 11:43:27Z vboxsync $
2## @file
3# Sub-Makefile for the VNC Extension Pack.
4#
5
6#
7# Copyright (C) 2010-2012 Oracle Corporation
8#
9# Permission is hereby granted, free of charge, to any person
10# obtaining a copy of this software and associated documentation
11# files (the "Software"), to deal in the Software without
12# restriction, including without limitation the rights to use,
13# copy, modify, merge, publish, distribute, sublicense, and/or sell
14# copies of the Software, and to permit persons to whom the
15# Software is furnished to do so, subject to the following
16# conditions:
17#
18# The above copyright notice and this permission notice shall be
19# included in all copies or substantial portions of the Software.
20#
21# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
23# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
25# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
26# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
28# OTHER DEALINGS IN THE SOFTWARE.
29#
30
31SUB_DEPTH = ../../../..
32include $(KBUILD_PATH)/subheader.kmk
33
34#
35# Extend the extension pack templates.
36#
37TEMPLATE_VBoxR3ExtPackVNC = For the ring-3 context modules in the VNC extension pack.
38TEMPLATE_VBoxR3ExtPackVNC_EXTENDS = VBoxR3ExtPack
39TEMPLATE_VBoxR3ExtPackVNC_INST = $(INST_EXTPACK)VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
40
41TEMPLATE_VBoxR0ExtPackVNC = For the ring-0 context modules in the VNC extension pack.
42TEMPLATE_VBoxR0ExtPackVNC_EXTENDS = VBoxR0ExtPack
43TEMPLATE_VBoxR0ExtPackVNC_INST = $(INST_EXTPACK)VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
44
45TEMPLATE_VBoxRcExtPackVNC = For the raw-mode context modules in the VNC extension pack.
46TEMPLATE_VBoxRcExtPackVNC_EXTENDS = VBoxRcExtPack
47TEMPLATE_VBoxRcExtPackVNC_INST = $(INST_EXTPACK)VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
48
49TEMPLATE_VBoxInsExtPackVNC = For the install targets of an extension pack.
50TEMPLATE_VBoxInsExtPackVNC_EXTENDS = VBoxR0ExtPack
51TEMPLATE_VBoxInsExtPackVNC_INST = $(INST_EXTPACK)VNC/
52
53#
54# Globals.
55#
56VBOX_VNC_NAME = VNC
57VBOX_VNC_MANGLED_NAME = VNC
58VBOX_PATH_EXTPACK_VNC = $(PATH_STAGE)/$(INST_EXTPACK)VNC
59
60#
61# VBoxVNCMain - The module which the VirtualBox Main API talks to.
62#
63DLLS += VBoxVNCMain
64VBoxVNCMain_TEMPLATE = VBoxR3ExtPackVNC
65VBoxVNCMain_SOURCES = VBoxVNCMain.cpp
66VBoxVNCMain_DEFS =
67
68#
69# VBoxVNC - The VNC VRDE module.
70#
71DLLS += VBoxVNC
72VBoxVNC_TEMPLATE = VBoxR3ExtPackVNC
73VBoxVNC_SOURCES = VBoxVNC.cpp
74# NOTE: vncserver is covered by GPL, so the extpack must be GPL, too.
75VBoxVNC_LIBS = vncserver
76VBoxVNC_DEFS =
77
78#
79# Install the description.
80#
81INSTALLS += VBoxVNCIns
82VBoxVNCIns_TEMPLATE = VBoxInsExtPackVNC
83VBoxVNCIns_SOURCES = \
84 $(VBoxVNCIns_0_OUTDIR)/ExtPack.xml \
85 $(PATH_ROOT)/doc/License-gpl-2.html=>ExtPack-license.html \
86 $(PATH_ROOT)/doc/License-gpl-2.txt=>ExtPack-license.txt \
87 $(PATH_ROOT)/doc/License-gpl-2.rtf=>ExtPack-license.rtf
88$(call VBOX_EDIT_VERSION_RULE_FN,VBoxVNCIns,ExtPack.xml)
89
90
91#
92# Packing.
93#
94ifndef VBOX_WITHOUT_EXTPACK_VNC_PACKING
95 PACKING += $(VBOX_PATH_PACKAGES)/$(VBOX_VNC_MANGLED_NAME)-$(VBOX_VERSION_STRING)r$(VBOX_SVN_REV).vbox-extpack
96endif
97
98ifndef VBOX_WITH_EXTPACK_OS_ARCHS
99 VBOX_WITH_EXTPACK_OS_ARCHS = $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)
100endif
101
102# Build the file list. The macro takes 1=darwin.x86, 2=dist/VirtualBox.app/Contents/MacOS, 3=dylib
103VBOX_VNC_FILES_MACRO = \
104 $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_VNC_MANGLED_NAME)/$(1)/VBoxVNCMain.$(3)=>$(1)/VBoxVNCMain.$(3) \
105 $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_VNC_MANGLED_NAME)/$(1)/VBoxVNC.$(3)=>$(1)/VBoxVNC.$(3)
106
107VBOX_VNC_FILES := \
108 $(VBOX_PATH_EXTPACK_VNC)/ExtPack.xml=>ExtPack.xml \
109 $(VBOX_PATH_EXTPACK_VNC)/ExtPack-license.html=>ExtPack-license.html \
110 $(VBOX_PATH_EXTPACK_VNC)/ExtPack-license.rtf=>ExtPack-license.rtf \
111 $(VBOX_PATH_EXTPACK_VNC)/ExtPack-license.txt=>ExtPack-license.txt
112
113
114if1of (darwin.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
115 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,darwin.amd64,dist/VirtualBox.app/Contents/MacOS,dylib)
116endif
117if1of (darwin.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
118 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,darwin.x86,dist/VirtualBox.app/Contents/MacOS,dylib)
119endif
120if1of (freebsd.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
121 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,freebsd.amd64,bin,so)
122endif
123if1of (freebsd.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
124 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,freebsd.x86,bin,so)
125endif
126if1of (linux.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
127 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,linux.amd64,bin,so)
128endif
129if1of (linux.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
130 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,linux.x86,bin,so)
131endif
132if1of (os2.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
133 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,os2.x86,bin,so)
134endif
135if1of (solaris.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
136 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,solaris.amd64,bin,so)
137endif
138if1of (solaris.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
139 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,solaris.x86,bin,so)
140endif
141if1of (win.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
142 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,win.amd64,bin,dll)
143endif
144if1of (win.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
145 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,win.x86,bin,dll)
146endif
147
148# Pack it all up using a temporary staging directory.
149$(VBOX_PATH_PACKAGES)/$(VBOX_VNC_MANGLED_NAME)-$(VBOX_VERSION_STRING)r$(VBOX_SVN_REV).vbox-extpack: \
150 $$(foreach file, $$(VBOX_VNC_FILES), $$(firstword $$(subst =>,$$(SP),$$(file)))) \
151 | $(VBOX_PATH_PACKAGES)/
152 $(RM) -f $(wildcard $(VBOX_PATH_PACKAGES)/$(VBOX_VNC_MANGLED_NAME)-*.vbox-extpack) \
153 $(VBoxVNCIns_0_OUTDIR)/ExtPack.manifest \
154 $(VBoxVNCIns_0_OUTDIR)/ExtPack.signature
155# Stage all the files
156 $(RM) -Rf $(VBoxVNCIns_0_OUTDIR)/Stage/
157 $(foreach file, $(VBOX_VNC_FILES),\
158 $(NLTAB)$(MKDIR) -p $(dir $(lastword $(subst =>,$(SP)$(VBoxVNCIns_0_OUTDIR)/Stage/,$(file)))) \
159 $(NLTAB)$(CP) $(subst =>,$(SP)$(VBoxVNCIns_0_OUTDIR)/Stage/,$(file)) )
160# Create the manifest
161 $(VBOX_RTMANIFEST) \
162 --manifest $(VBoxVNCIns_0_OUTDIR)/Stage/ExtPack.manifest \
163 --chdir $(VBoxVNCIns_0_OUTDIR)/Stage/ \
164 $(foreach file, $(VBOX_VNC_FILES), $(lastword $(subst =>,$(SP),$(file))))
165 $(APPEND) $(VBoxVNCIns_0_OUTDIR)/Stage/ExtPack.signature "todo"
166 $(CHMOD) a+r \
167 $(VBoxVNCIns_0_OUTDIR)/Stage/ExtPack.manifest \
168 $(VBoxVNCIns_0_OUTDIR)/Stage/ExtPack.signature
169# Tar it up.
170 tar -cvf - -C $(VBoxVNCIns_0_OUTDIR)/Stage/ . | gzip -9c > $@
171# Clean up
172 $(RM) -Rf $(VBoxVNCIns_0_OUTDIR)/Stage/
173
174BLDDIRS += $(VBOX_PATH_PACKAGES)/
175
176include $(FILE_KBUILD_SUB_FOOTER)
177
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