VirtualBox

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

Last change on this file since 62873 was 62496, checked in by vboxsync, 8 years ago

(C) 2016

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.1 KB
Line 
1# $Id: Makefile.kmk 62496 2016-07-22 18:47:44Z vboxsync $
2## @file
3# Sub-Makefile for the VNC Extension Pack.
4#
5
6#
7# Copyright (C) 2010-2016 Oracle Corporation
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
18SUB_DEPTH = ../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21#
22# Extend the extension pack templates.
23#
24TEMPLATE_VBoxR3ExtPackVNC = For the ring-3 context modules in the VNC extension pack.
25TEMPLATE_VBoxR3ExtPackVNC_EXTENDS = VBoxR3ExtPack
26TEMPLATE_VBoxR3ExtPackVNC_INST = $(INST_EXTPACK)VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
27
28TEMPLATE_VBoxR0ExtPackVNC = For the ring-0 context modules in the VNC extension pack.
29TEMPLATE_VBoxR0ExtPackVNC_EXTENDS = VBoxR0ExtPack
30TEMPLATE_VBoxR0ExtPackVNC_INST = $(INST_EXTPACK)VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
31
32TEMPLATE_VBoxRcExtPackVNC = For the raw-mode context modules in the VNC extension pack.
33TEMPLATE_VBoxRcExtPackVNC_EXTENDS = VBoxRcExtPack
34TEMPLATE_VBoxRcExtPackVNC_INST = $(INST_EXTPACK)VNC/$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)/
35
36TEMPLATE_VBoxInsExtPackVNC = For the install targets of an extension pack.
37TEMPLATE_VBoxInsExtPackVNC_EXTENDS = VBoxR0ExtPack
38TEMPLATE_VBoxInsExtPackVNC_INST = $(INST_EXTPACK)VNC/
39
40#
41# Globals.
42#
43VBOX_VNC_NAME = VNC
44VBOX_VNC_MANGLED_NAME = VNC
45VBOX_PATH_EXTPACK_VNC = $(PATH_STAGE)/$(INST_EXTPACK)VNC
46
47#
48# VBoxVNCMain - The module which the VirtualBox Main API talks to.
49#
50DLLS += VBoxVNCMain
51VBoxVNCMain_TEMPLATE = VBoxR3ExtPackVNC
52VBoxVNCMain_SOURCES = VBoxVNCMain.cpp
53VBoxVNCMain_DEFS =
54
55#
56# VBoxVNC - The VNC VRDE module.
57#
58DLLS += VBoxVNC
59VBoxVNC_TEMPLATE = VBoxR3ExtPackVNC
60VBoxVNC_SOURCES = VBoxVNC.cpp
61# NOTE: vncserver is covered by GPL, so the extpack must be GPL, too.
62VBoxVNC_LIBS = vncserver
63VBoxVNC_DEFS =
64
65#
66# Install the description.
67#
68INSTALLS += VBoxVNCIns
69VBoxVNCIns_TEMPLATE = VBoxInsExtPackVNC
70VBoxVNCIns_SOURCES = \
71 $(VBoxVNCIns_0_OUTDIR)/ExtPack.xml \
72 $(PATH_ROOT)/doc/License-gpl-2.html=>ExtPack-license.html \
73 $(PATH_ROOT)/doc/License-gpl-2.txt=>ExtPack-license.txt \
74 $(PATH_ROOT)/doc/License-gpl-2.rtf=>ExtPack-license.rtf
75$(call VBOX_EDIT_VERSION_RULE_FN,VBoxVNCIns,ExtPack.xml)
76
77
78#
79# Packing.
80#
81ifndef VBOX_WITHOUT_EXTPACK_VNC_PACKING
82 PACKING += $(VBOX_PATH_PACKAGES)/$(VBOX_VNC_MANGLED_NAME)-$(VBOX_VERSION_STRING)r$(VBOX_SVN_REV).vbox-extpack
83endif
84
85ifndef VBOX_WITH_EXTPACK_OS_ARCHS
86 VBOX_WITH_EXTPACK_OS_ARCHS = $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)
87endif
88
89# Build the file list. The macro takes 1=darwin.x86, 2=dist/VirtualBox.app/Contents/MacOS, 3=dylib
90VBOX_VNC_FILES_MACRO = \
91 $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_VNC_MANGLED_NAME)/$(1)/VBoxVNCMain.$(3)=>$(1)/VBoxVNCMain.$(3) \
92 $(PATH_OUT_BASE)/$(1)/$(KBUILD_TYPE)/$(2)/ExtensionPacks/$(VBOX_VNC_MANGLED_NAME)/$(1)/VBoxVNC.$(3)=>$(1)/VBoxVNC.$(3)
93
94VBOX_VNC_FILES := \
95 $(VBOX_PATH_EXTPACK_VNC)/ExtPack.xml=>ExtPack.xml \
96 $(VBOX_PATH_EXTPACK_VNC)/ExtPack-license.html=>ExtPack-license.html \
97 $(VBOX_PATH_EXTPACK_VNC)/ExtPack-license.rtf=>ExtPack-license.rtf \
98 $(VBOX_PATH_EXTPACK_VNC)/ExtPack-license.txt=>ExtPack-license.txt
99
100
101if1of (darwin.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
102 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,darwin.amd64,dist/VirtualBox.app/Contents/MacOS,dylib)
103endif
104if1of (darwin.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
105 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,darwin.x86,dist/VirtualBox.app/Contents/MacOS,dylib)
106endif
107if1of (freebsd.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
108 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,freebsd.amd64,bin,so)
109endif
110if1of (freebsd.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
111 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,freebsd.x86,bin,so)
112endif
113if1of (linux.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
114 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,linux.amd64,bin,so)
115endif
116if1of (linux.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
117 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,linux.x86,bin,so)
118endif
119if1of (os2.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
120 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,os2.x86,bin,so)
121endif
122if1of (solaris.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
123 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,solaris.amd64,bin,so)
124endif
125if1of (solaris.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
126 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,solaris.x86,bin,so)
127endif
128if1of (win.amd64, $(VBOX_WITH_EXTPACK_OS_ARCHS))
129 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,win.amd64,bin,dll)
130endif
131if1of (win.x86, $(VBOX_WITH_EXTPACK_OS_ARCHS))
132 VBOX_VNC_FILES += $(call VBOX_VNC_FILES_MACRO,win.x86,bin,dll)
133endif
134
135# Pack it all up using a temporary staging directory.
136$(VBOX_PATH_PACKAGES)/$(VBOX_VNC_MANGLED_NAME)-$(VBOX_VERSION_STRING)r$(VBOX_SVN_REV).vbox-extpack: \
137 $$(foreach file, $$(VBOX_VNC_FILES), $$(firstword $$(subst =>,$$(SP),$$(file)))) \
138 | $(VBOX_PATH_PACKAGES)/
139 $(RM) -f $(wildcard $(VBOX_PATH_PACKAGES)/$(VBOX_VNC_MANGLED_NAME)-*.vbox-extpack) \
140 $(VBoxVNCIns_0_OUTDIR)/ExtPack.manifest \
141 $(VBoxVNCIns_0_OUTDIR)/ExtPack.signature
142# Stage all the files
143 $(RM) -Rf $(VBoxVNCIns_0_OUTDIR)/Stage/
144 $(foreach file, $(VBOX_VNC_FILES),\
145 $(NLTAB)$(MKDIR) -p $(dir $(lastword $(subst =>,$(SP)$(VBoxVNCIns_0_OUTDIR)/Stage/,$(file)))) \
146 $(NLTAB)$(CP) $(subst =>,$(SP)$(VBoxVNCIns_0_OUTDIR)/Stage/,$(file)) )
147# Create the manifest
148 $(VBOX_RTMANIFEST) \
149 --manifest $(VBoxVNCIns_0_OUTDIR)/Stage/ExtPack.manifest \
150 --chdir $(VBoxVNCIns_0_OUTDIR)/Stage/ \
151 $(foreach file, $(VBOX_VNC_FILES), $(lastword $(subst =>,$(SP),$(file))))
152 $(APPEND) $(VBoxVNCIns_0_OUTDIR)/Stage/ExtPack.signature "todo"
153 $(CHMOD) a+r \
154 $(VBoxVNCIns_0_OUTDIR)/Stage/ExtPack.manifest \
155 $(VBoxVNCIns_0_OUTDIR)/Stage/ExtPack.signature
156# Tar it up.
157 tar -cvf - -C $(VBoxVNCIns_0_OUTDIR)/Stage/ . | gzip -9c > $@
158# Clean up
159 $(RM) -Rf $(VBoxVNCIns_0_OUTDIR)/Stage/
160
161BLDDIRS += $(VBOX_PATH_PACKAGES)/
162
163include $(FILE_KBUILD_SUB_FOOTER)
164
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