~ubuntu-branches/ubuntu/trusty/virtualbox-ose/trusty

« back to all changes in this revision

Viewing changes to src/VBox/Additions/common/VBoxGuest/Makefile.kmk

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
include $(KBUILD_PATH)/subheader.kmk
24
24
 
25
25
 
26
 
if1of ($(KBUILD_TARGET), \
27
 
        freebsd \
28
 
        $(if $(defined VBOX_WITH_OS2_ADDITIONS),os2,) \
29
 
        $(if $(defined VBOX_WITH_ADDITION_DRIVERS),linux,) \
30
 
        solaris) # linux is not yet using this code, just for syntax checking changes.
 
26
if1of ($(KBUILD_TARGET), freebsd $(if $(defined VBOX_WITH_ADDITION_DRIVERS),linux,) os2 solaris)
31
27
 #
32
28
 # VBoxGuest - The Guest Additions Driver (mixed case).
33
29
 #
37
33
 VBoxGuest_NAME.linux    = vboxguest
38
34
 VBoxGuest_NAME.solaris  = vboxguest
39
35
 VBoxGuest_NOINST.linux  = true
 
36
 VBoxGuest_DEFS.linux    = KBUILD_MODNAME=KBUILD_STR\(vboxguest\) KBUILD_BASENAME=KBUILD_STR\(vboxguest\) DEBUG_HASH=2 DEBUG_HASH2=3 EXPORT_SYMTAB
40
37
 VBoxGuest_DEFS.solaris  = VBOX_SVN_REV=$(VBOX_SVN_REV)
41
38
 VBoxGuest_DEPS.solaris += $(VBOX_SVN_REV_KMK)
42
39
 VBoxGuest_DEFS          = VBGL_VBOXGUEST VBOX_WITH_HGCM
43
40
 VBoxGuest_INCS          = .
44
 
 VBoxGuest_INCS.freebsd  = $(PATH_VBoxGuest)
 
41
 VBoxGuest_INCS.freebsd  = $(PATH_VBoxGuest) $(PATH_INS)/gen-sys-hdrs
 
42
 VBoxGuest_INCS.linux    = ../../../Runtime/r0drv/linux
45
43
 ifneq ($(KBUILD_TARGET),os2)
46
44
  ifn1of ($(KBUILD_TARGET), linux freebsd solaris)
47
45
   VBoxGuest_SOURCES     = VBoxGuest-$(KBUILD_TARGET).cpp
49
47
   VBoxGuest_SOURCES     = VBoxGuest-$(KBUILD_TARGET).c
50
48
  endif
51
49
  VBoxGuest_SOURCES     += VBoxGuest.cpp
52
 
  VBoxGuest_LIBS          = \
 
50
  VBoxGuest_LIBS         = \
53
51
        $(VBOX_LIB_VBGL_R0BASE) \
54
52
        $(VBOX_LIB_IPRT_GUEST_R0)
55
 
  VBoxGuest_INTERMEDIATES.freebsd = \
56
 
        $(PATH_VBoxGuest)/pci_if.h \
57
 
        $(PATH_VBoxGuest)/bus_if.h \
58
 
        $(PATH_VBoxGuest)/device_if.h
59
 
  VBoxGuest_CLEAN.freebsd = $(VBoxGuest_INTERMEDIATES.freebsd)
 
53
  VBoxGuest_ORDERDEPS.freebsd = \
 
54
        $(PATH_INS)/gen-sys-hdrs/pci_if.h \
 
55
        $(PATH_INS)/gen-sys-hdrs/bus_if.h \
 
56
        $(PATH_INS)/gen-sys-hdrs/device_if.h
60
57
 
61
58
 else # OS/2:
62
59
  # The library order is crucial, so a bit of trickery is necessary.
87
84
        VBoxGuest.cpp
88
85
 endif # OS/2
89
86
 
90
 
 ifeq ($(KBUILD_TARGET),freebsd)
91
 
  #
92
 
  # FreeBSD: Genereate bus, device and pci interface headers. (explain why)
93
 
  #
94
 
  # We cannot give a output path to the awk program, it will always generate
95
 
  # the header next to the source. So, we'll have to temporarily copy the
96
 
  # source file to the destination direction for it to work out correctly.
97
 
  #
98
 
  VBOX_AWK := /usr/bin/awk
99
 
  $$(PATH_VBoxGuest)/bus_if.h: $(VBOX_FREEBSD_SRC)/kern/bus_if.m
100
 
        $(call MSG_TOOL,awk,VBoxGuest,$<,$@)
101
 
        $(QUIET)$(CP) -f $(VBOX_FREEBSD_SRC)/kern/bus_if.m $(PATH_VBoxGuest)/bus_if.m
102
 
        $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(PATH_VBoxGuest)/bus_if.m -h -p
103
 
        $(QUIET)$(RM) $(PATH_VBoxGuest)/bus_if.m
104
 
 
105
 
  $$(PATH_VBoxGuest)/device_if.h: $(VBOX_FREEBSD_SRC)/kern/device_if.m
106
 
        $(call MSG_TOOL,awk,VBoxGuest,$<,$@)
107
 
        $(QUIET)$(CP) -f $(VBOX_FREEBSD_SRC)/kern/device_if.m $(PATH_VBoxGuest)/device_if.m
108
 
        $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(PATH_VBoxGuest)/device_if.m -h -p
109
 
        $(QUIET)$(RM) $(PATH_VBoxGuest)/device_if.m
110
 
 
111
 
  $$(PATH_VBoxGuest)/pci_if.h: $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m
112
 
        $(call MSG_TOOL,awk,VBoxGuest,$<,$@)
113
 
        $(QUIET)$(CP) -f $(VBOX_FREEBSD_SRC)/dev/pci/pci_if.m $(PATH_VBoxGuest)/pci_if.m
114
 
        $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/makeobjops.awk $(PATH_VBoxGuest)/pci_if.m -h -p
115
 
        $(QUIET)$(RM) $(PATH_VBoxGuest)/pci_if.m
116
 
 endif # FreeBSD
117
 
 
118
87
endif # enabled
119
88
 
 
89
ifeq ($(KBUILD_TARGET),linux)
 
90
 #
 
91
 # Install the source files and script(s).
 
92
 #
 
93
 include $(PATH_SUB_CURRENT)/linux/files_vboxguest
 
94
 # sources and stuff.
 
95
 INSTALLS += vboxguest-src
 
96
 vboxguest-src_INST     = $(INST_ADDITIONS)src/vboxguest/
 
97
 vboxguest-src_MODE     = a+r,u+w
 
98
 vboxguest-src_SOURCES  = $(subst ",,$(FILES_VBOXGUEST_NOBIN))
 
99
 vboxguest-src_SOURCES += $(if $(VBOX_OSE),,$(vboxguest-sh_0_OUTDIR)/dkms.conf)
 
100
 vboxguest-src_CLEAN    = $(vboxguest-sh_0_OUTDIR)/dkms.conf
 
101
 
 
102
 $$(vboxguest-sh_0_OUTDIR)/dkms.conf: \
 
103
                $(PATH_SUB_CURRENT)/linux/dkms.conf \
 
104
                $(VBOX_VERSION_STAMP) \
 
105
                | $$(dir $$@)
 
106
        $(call MSG_TOOL,Creating,,$@)
 
107
        $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g" --output $@ $<
 
108
 
 
109
 # scripts.
 
110
 INSTALLS += vboxguest-sh
 
111
 vboxguest-sh_INST      = $(INST_ADDITIONS)src/vboxguest/
 
112
 vboxguest-sh_MODE      = a+rx,u+w
 
113
 vboxguest-sh_SOURCES   = $(subst ",,$(FILES_VBOXGUEST_BIN))
 
114
 vboxguest-sh_SOURCES  += $(if $(VBOX_OSE),,$(PATH_ROOT)/src/VBox/HostDrivers/linux/do_Module.symvers)
 
115
 vboxguest-sh_SOURCES  += $(vboxguest-sh_0_OUTDIR)/build_in_tmp
 
116
 vboxguest-sh_CLEAN     = $(vboxguest-sh_0_OUTDIR)/build_in_tmp
 
117
 
 
118
 $$(vboxguest-sh_0_OUTDIR)/build_in_tmp: \
 
119
                $(PATH_ROOT)/src/VBox/HostDrivers/linux/build_in_tmp \
 
120
                $(VBOX_VERSION_STAMP) \
 
121
                | $$(dir $$@)
 
122
        $(call MSG_TOOL,Creating,,$@)
 
123
        $(QUIET)$(SED) -e "s;_VERSION_;${VBOX_VERSION_STRING};g; s;_MODULE_;vboxguest;g" --output $@ $<
 
124
        $(QUIET)$(CHMOD) 0755 $@
 
125
 
 
126
endif # Linux
 
127
 
120
128
include $(KBUILD_PATH)/subfooter.kmk
121
129