VirtualBox

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

Last change on this file since 4050 was 4050, checked in by vboxsync, 18 years ago

Export installer to OSE again and fix a few copyright headers.

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