VirtualBox

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

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

added License.html to Linux packages

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