VirtualBox

source: vbox/trunk/src/VBox/Installer/linux/Makefile.kmk@ 6512

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

added vboxwebsrv to all Linux packages

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.3 KB
Line 
1# $Id: Makefile.kmk 6512 2008-01-25 11:34:26Z vboxsync $
2## @file
3# Makefile for the Linux installer.
4#
5
6#
7# Copyright (C) 2006-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 = ../../../..
19include $(PATH_KBUILD)/header.kmk
20
21ifneq ($(BUILD_PLATFORM),linux)
22$(error "The Linux installer can only be built on Linux!") # yeah, right.
23endif
24
25VBOX_NO_LINUX_RUN_INSTALLER ?= $(VBOX_OSE)
26
27PROGRAMS = VBoxTunctl
28PACKING = $(if $(VBOX_NO_LINUX_RUN_INSTALLER),,$(PATH_BIN)/VirtualBox.run)
29PACKING += $(PATH_BIN)/VirtualBox.tar.bz2
30OTHER_CLEAN = $(addprefix $(PATH_TARGET)/install/,\
31 install.sh deffiles routines.sh \
32 VBoxAddIF.sh vboxdrv.sh vboxnet.sh \
33 VirtualBox.tar.bz2 LICENSE) \
34 $(wildcard $(PATH_TARGET)/VirtualBox-*)
35INSTALLS = linux-bin linux-doc
36
37VBoxTunctl_TEMPLATE = VBOXR3EXE
38VBoxTunctl_SOURCES = tunctl.c
39
40#
41# Linux installs.
42#
43linux-bin_INST = bin/
44linux-bin_MODE = a+rx,u+w
45linux-bin_SOURCES = \
46 VBoxSysInfo.sh \
47 VBox.sh=>VBox.sh
48
49linux-doc_INST = bin/
50linux-doc_MODE = a+r,u+w
51linux-doc_SOURCES = \
52 $(if $(VBOX_OSE),,$(PATH_ROOT)/doc/License.txt=>LICENSE) \
53 VBox.png=>VBox.png
54
55# Strip these binaries
56LINUXSTRIPBIN = \
57 VBoxDD.so \
58 VBoxDD2.so \
59 VBoxManage \
60 VBoxREM.so \
61 VBoxRT.so \
62 $(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \
63 VBoxSettings.so \
64 VBoxSVC \
65 VBoxDDU.so \
66 VBoxVMM.so \
67 VBoxXPCOM.so \
68 VBoxXPCOMIPCD \
69 $(if $(VBOX_WITH_QTGUI),VBoxKeyboard.so,) \
70 $(if $(VBOX_WITH_QTGUI),VirtualBox,) \
71 tstVMM \
72 VBoxTunctl \
73 components/VBoxC.so \
74 components/VBoxSVCM.so \
75 components/VBoxXPCOMIPCC.so
76
77# Do not remove relocation information of these binaries
78LINUXSTRIPOBJ = \
79 VBoxDD2GC.gc \
80 VBoxDD2R0.r0 \
81 VBoxDDGC.gc \
82 VBoxDDR0.r0 \
83 VMMGC.gc \
84 VMMR0.r0
85ifeq ($(BUILD_TARGET_ARCH),amd64)
86LINUXSTRIPOBJ += \
87 VBoxREM2.rel
88endif
89
90# Do not strip anything of these files
91LINUXNOSTRIP = \
92 $(if $(VBOX_OSE),,LICENSE) \
93 $(if $(VBOX_WITH_QTGUI),\
94 $(if $(VBOX_OSE),,License-$(VBOX_LICENSE_VER).html)) \
95 components/VBoxXPCOMBase.xpt \
96 components/VirtualBox_XPCOM.xpt \
97 VBoxSysInfo.sh \
98 VBox.sh \
99 VBox.png \
100 VBoxAddIF.sh \
101 $(if $(VBOX_WITH_QTGUI),VirtualBox.desktop,) \
102 $(if $(VBOX_WITH_QTGUI),$(foreach f,\
103 $(shell $(CAT_EXT) \
104 $(PATH_ROOT)/src/VBox/Frontends/VirtualBox/nls/ApprovedLanguages.txt),\
105 nls/VirtualBox_$(f).qm nls/qt_$(f).qm),) \
106 src \
107 sdk
108
109# Guest Additions
110LINUXNOSTRIP += \
111 $(if $(VBOX_OSE),,additions/VBoxGuestAdditions.iso)
112
113# Shared Folders
114LINUXSTRIPBIN += \
115 VBoxSharedFolders.so \
116 $(if $(VBOX_OSE),,VRDPAuth.so)
117
118# Shared Clipboard
119LINUXSTRIPBIN += \
120 VBoxSharedClipboard.so \
121 $(if $(VBOX_WITH_DEBUGGER_GUI),VBoxDbg.so,)
122
123ifdef VBOX_WITH_DOCS
124 LINUXNOSTRIP += \
125 UserManual.pdf
126 LINUXSTRIPBIN += \
127 $(if $(VBOX_WITH_QTGUI),kchmviewer,)
128 ifneq ($(wildcard $(PATH_BIN)/VirtualBox.chm),)
129 # our 64-bit tinderboxes are not able to generate VirtualBox.chm so far
130 # but for building .deb/.rpm packages we use precompiled binaries.
131 LINUXNOSTRIP += \
132 VirtualBox.chm
133 endif
134 ifneq ($(wildcard $(PATH_BIN)/VirtualBoxAPI.chm),)
135 # same applies to VirtualBoxAPI.chm
136 LINUXNOSTRIP += \
137 VirtualBoxAPI.chm
138 endif
139endif
140ifdef VBOX_WITH_VRDP
141 LINUXSTRIPBIN += \
142 VBoxVRDP.so \
143 VBoxVRDP
144
145 LINUXNOSTRIP += \
146 rdesktop-vrdp.tar.gz
147endif
148ifdef VBOX_WITH_HEADLESS
149 LINUXSTRIPBIN += \
150 VBoxHeadless
151endif
152ifdef VBOX_WITH_WEBSERVICES
153 LINUXSTRIPBIN += \
154 vboxwebsrv \
155 webtest
156endif
157
158LINUXARCHFILES := $(LINUXSTRIPBIN) $(LINUXSTRIPOBJ) $(LINUXNOSTRIP)
159
160OTHER_CLEAN += $(addprefix $(PATH_TARGET)/archive/,$(LINUXARCHFILES))
161
162include $(PATH_KBUILD)/footer.kmk
163
164$(PATH_BIN)/VirtualBox.run: \
165 $(PATH_TARGET)/install/VirtualBox.tar.bz2 \
166 install.sh \
167 $(VBOX_VERSION_STAMP) \
168 routines.sh \
169 deffiles \
170 vboxnet.sh \
171 vboxdrv.sh \
172 $(if $(VBOX_OSE),,$(PATH_ROOT)/doc/License.txt)
173 $(call MSG_TOOL,makeself,,,$@)
174 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" \
175 -e "s;_BUILD_;$(shell date);g" \
176 -e "s;_ARCH_;${BUILD_TARGET_ARCH};g" \
177 < install.sh > $(PATH_TARGET)/install/install.sh
178 $(QUIET)chmod 0744 $(PATH_TARGET)/install/install.sh
179 $(QUIET)$(INSTALL) -m 0755 routines.sh $(PATH_TARGET)/install
180 $(QUIET)$(INSTALL) -m 0755 deffiles $(PATH_TARGET)/install
181 $(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(PATH_ROOT)/doc/License.txt $(PATH_TARGET)/install/LICENSE)
182 $(QUIET)$(INSTALL) -m 0755 vboxnet.sh $(PATH_TARGET)/install
183 $(QUIET)$(INSTALL) -m 0755 vboxdrv.sh $(PATH_TARGET)/install
184 $(QUIET)$(RM) -f $@
185 $(QUIET)$(VBOX_MAKESELF) --follow $(PATH_TARGET)/install $@ \
186 "VirtualBox for Linux installation" ./install.sh "\$$0 1> /dev/null"
187
188# .tar.bz2 for converting into .run
189$(PATH_TARGET)/install/VirtualBox.tar.bz2: \
190 $(addprefix $(PATH_TARGET)/archive/, $(LINUXARCHFILES)) \
191 Makefile.kmk \
192 $(VBOX_VERSION_STAMP) \
193 $(PATH_TARGET)/VirtualBox-$(VBOX_VERSION_STRING)
194 $(call MSG_L1,Packing $@)
195 $(QUIET)$(MKDIR) -p $(@D)
196 $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(PATH_TARGET)/VirtualBox-$(VBOX_VERSION_STRING) $(LINUXARCHFILES)
197 $(QUIET)chmod 0644 $@
198
199# .tar.bz2 for distribution
200$(PATH_BIN)/VirtualBox.tar.bz2: \
201 $(addprefix $(PATH_TARGET)/archive/, $(LINUXARCHFILES)) \
202 Makefile.kmk \
203 $(VBOX_VERSION_STAMP) \
204 $(PATH_TARGET)/VirtualBox-$(VBOX_VERSION_STRING)
205 $(call MSG_L1,Packing $@)
206 $(QUIET)$(MKDIR) -p $(PATH_TARGET)
207 $(QUIET)tar --owner 0 --group 0 -cjRhf $@ -C $(PATH_TARGET) \
208 $(addprefix VirtualBox-$(VBOX_VERSION_STRING)/,$(LINUXARCHFILES))
209
210$(PATH_TARGET)/VirtualBox-$(VBOX_VERSION_STRING): $(PATH_TARGET)/archive
211 $(call MSG_INST_SYM,$<,$@)
212 $(QUIET)$(MKDIR) -p $(@D)
213 $(QUIET)rm -rf $@
214 $(QUIET)$(LN_SYMLINK) $< $@
215
216$(PATH_BIN)/VBoxAddIF.sh: VBoxAddIF.sh $(VBOX_VERSION_STAMP)
217 $(call MSG_GENERATE,,$@,$<)
218 $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" $< > $@
219 $(QUIET)chmod 0755 $@
220
221$(PATH_BIN)/VirtualBox.desktop: VirtualBox.desktop $(VBOX_VERSION_STAMP)
222 $(call MSG_GENERATE,,$@,$<)
223ifdef VBOX_PATH_PACKAGE_DOCS
224 $(QUIET)$(SED) -e "s+\$$VBOX_DOC_PATH+$(VBOX_PATH_PACKAGE_DOCS)+" $< > $@
225else
226 $(QUIET)$(SED) -e "s+\$$VBOX_DOC_PATH+/opt/VirtualBox-$(VBOX_VERSION_STRING)+" $< > $@
227endif
228
229# Note: The -m <mode> feature of kmk_builtin_install does not work together with fakeroot!
230# Note: $(INSTALL) -s is currently not reliable when used in parallel builds. Fixed in 0.1.1.
231$(foreach f,$(LINUXSTRIPBIN),$(PATH_TARGET)/archive/$(f)): \
232 $(PATH_TARGET)/archive/% : $(PATH_BIN)/% | $(call DIRDEP,$(PATH_TARGET)/archive)
233 $(call MSG_INST_FILE,$<,$@)
234 $(QUIET)install -D -m 0755 $(if $(VBOX_DO_STRIP),-s,) $< $@
235
236$(foreach f,$(LINUXSTRIPOBJ),$(PATH_TARGET)/archive/$(f)): \
237 $(PATH_TARGET)/archive/% : $(PATH_BIN)/% | $(call DIRDEP,$(PATH_TARGET)/archive)
238 $(call MSG_INST_FILE,$<,$@)
239 $(QUIET)$(if $(VBOX_DO_STRIP),objcopy --strip-unneeded -R .comment $< $@,cp $< $@)
240
241$(foreach f,$(LINUXNOSTRIP),$(PATH_TARGET)/archive/$(f)): \
242 $(PATH_TARGET)/archive/% : $(PATH_BIN)/% | $(call DIRDEP,$(PATH_TARGET)/archive)
243 $(call MSG_INST_SYM,$<,$@)
244 $(QUIET)$(RM) -f $@
245 $(QUIET)$(MKDIR) -p $(@D)
246 $(QUIET)$(LN_SYMLINK) $< $@
247
248$(foreach d,archive install,$(PATH_TARGET)/$(d)/):
249 $(QUIET)$(MKDIR) -p $@
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