Changeset 36467 in vbox for trunk/src/VBox/Installer
- Timestamp:
- Mar 29, 2011 8:34:18 PM (14 years ago)
- Location:
- trunk/src/VBox/Installer/linux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/linux/Makefile.include.footer
r36463 r36467 25 25 # MOD_DEFS = <any additional defines which this module needs> 26 26 # MOD_INCL = <any additional include paths which this module needs> 27 # MOD_ FLAGS = <any additional CFLAGS which this module needs>27 # MOD_CFLAGS = <any additional CFLAGS which this module needs> 28 28 # MOD_CLEAN = <list of directories that the clean target should look at> 29 29 # … … 32 32 # @todo the shared folders module Makefile also includes the following bits. 33 33 # Integrate them if necessary. 34 # MOD_ FLAGS += -DEXPORT_SYMTAB -DVBGL_VBOXGUEST -DRT_WITH_VBOX34 # MOD_CFLAGS += -DEXPORT_SYMTAB -DVBGL_VBOXGUEST -DRT_WITH_VBOX 35 35 # 36 36 # # special hack for Fedora Core 6 2.6.18 (fc6), rhel5 2.6.18 (el5), … … 63 63 64 64 ifneq ($(MAKECMDGOALS),clean) 65 66 ifeq ($(KERNELRELEASE),)67 68 #69 # building from this directory70 #71 72 # kernel base directory73 ifndef KERN_DIR74 KERN_DIR := /lib/modules/$(shell uname -r)/build75 ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)76 KERN_DIR := /usr/src/linux77 ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)78 $(error Error: unable to find the sources of your current Linux kernel. \79 Specify KERN_DIR=<directory> and run Make again)80 endif81 $(warning Warning: using /usr/src/linux as the source directory of your \82 Linux kernel. If this is not correct, specify \83 KERN_DIR=<directory> and run Make again.)84 endif85 else86 ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)87 $(error Error: KERN_DIR does not point to a directory)88 endif89 endif90 91 # includes92 ifndef KERN_INCL93 KERN_INCL = $(KERN_DIR)/include94 endif95 ifneq ($(shell if test -d $(KERN_INCL); then echo yes; fi),yes)96 $(error Error: unable to find the include directory for your current Linux \97 kernel. Specify KERN_INCL=<directory> and run Make again)98 endif99 100 # module install dir, only for current kernel101 ifneq ($(filter install install_rpm,$(MAKECMDGOALS)),)102 ifndef MODULE_DIR103 MODULE_DIR_TST := /lib/modules/$(shell uname -r)104 ifeq ($(shell if test -d $(MODULE_DIR_TST); then echo yes; fi),yes)105 MODULE_DIR := $(MODULE_DIR_TST)/misc106 else107 $(error Unable to find the folder to install the driver ($(MOD_NAME)) to)108 endif109 endif # MODULE_DIR unspecified110 endif111 112 # guess kernel version (24 or 26)113 ifeq ($(shell if grep '"2\.4\.' $(KERN_INCL)/linux/version.h > /dev/null; then echo yes; fi),yes)114 KERN_VERSION := 24115 else116 KERN_VERSION := 26117 endif118 119 else # neq($(KERNELRELEASE),)120 121 #122 # building from kbuild (make -C <kernel_directory> M=`pwd`)123 #124 125 # guess kernel version (24 or 26)126 # MOD_OBJS = <list of object files which should be included>127 ifeq ($(shell if echo "$(VERSION).$(PATCHLEVEL)." | grep '2\.4\.' > /dev/null; then echo yes; fi),yes)128 KERN_VERSION := 24129 else130 KERN_VERSION := 26131 endif132 133 endif # neq($(KERNELRELEASE),)134 135 # debug - show guesses.136 ifdef DEBUG137 $(warning dbg: KERN_DIR = $(KERN_DIR))138 $(warning dbg: KERN_INCL = $(KERN_INCL))139 $(warning dbg: MODULE_DIR = $(MODULE_DIR))140 $(warning dbg: KERN_VERSION = $(KERN_VERSION))141 endif142 65 143 66 KBUILD_VERBOSE ?= 1 -
trunk/src/VBox/Installer/linux/Makefile.include.header
r36463 r36467 28 28 # MOD_DEFS = <any additional defines which this module needs> 29 29 # MOD_INCL = <any additional include paths which this module needs> 30 # MOD_ FLAGS = <any additional CFLAGS which this module needs>30 # MOD_CFLAGS = <any additional CFLAGS which this module needs> 31 31 # MOD_CLEAN = <list of directories that the clean target should look at> 32 32 # include $(obj)/Makefile.include.footer … … 36 36 # @todo the shared folders module Makefile also includes the following bits. 37 37 # Integrate them if necessary. 38 # MOD_ FLAGS += -DEXPORT_SYMTAB -DVBGL_VBOXGUEST -DRT_WITH_VBOX38 # MOD_CFLAGS += -DEXPORT_SYMTAB -DVBGL_VBOXGUEST -DRT_WITH_VBOX 39 39 # 40 40 # # special hack for Fedora Core 6 2.6.18 (fc6), rhel5 2.6.18 (el5), … … 101 101 endif 102 102 endif 103 104 ifneq ($(MAKECMDGOALS),clean) 105 106 ifeq ($(KERNELRELEASE),) 107 108 # 109 # building from this directory 110 # 111 112 # kernel base directory 113 ifndef KERN_DIR 114 KERN_DIR := /lib/modules/$(shell uname -r)/build 115 ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes) 116 KERN_DIR := /usr/src/linux 117 ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes) 118 $(error Error: unable to find the sources of your current Linux kernel. \ 119 Specify KERN_DIR=<directory> and run Make again) 120 endif 121 $(warning Warning: using /usr/src/linux as the source directory of your \ 122 Linux kernel. If this is not correct, specify \ 123 KERN_DIR=<directory> and run Make again.) 124 endif 125 else 126 ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes) 127 $(error Error: KERN_DIR does not point to a directory) 128 endif 129 endif 130 131 # includes 132 ifndef KERN_INCL 133 KERN_INCL = $(KERN_DIR)/include 134 endif 135 ifneq ($(shell if test -d $(KERN_INCL); then echo yes; fi),yes) 136 $(error Error: unable to find the include directory for your current Linux \ 137 kernel. Specify KERN_INCL=<directory> and run Make again) 138 endif 139 140 # module install dir, only for current kernel 141 ifneq ($(filter install install_rpm,$(MAKECMDGOALS)),) 142 ifndef MODULE_DIR 143 MODULE_DIR_TST := /lib/modules/$(shell uname -r) 144 ifeq ($(shell if test -d $(MODULE_DIR_TST); then echo yes; fi),yes) 145 MODULE_DIR := $(MODULE_DIR_TST)/misc 146 else 147 $(error Unable to find the folder to install the module to) 148 endif 149 endif # MODULE_DIR unspecified 150 endif 151 152 # guess kernel version (24 or 26) 153 ifeq ($(shell if grep '"2\.4\.' $(KERN_INCL)/linux/version.h > /dev/null; then echo yes; fi),yes) 154 KERN_VERSION := 24 155 else 156 KERN_VERSION := 26 157 endif 158 159 else # neq($(KERNELRELEASE),) 160 161 # 162 # building from kbuild (make -C <kernel_directory> M=`pwd`) 163 # 164 165 # guess kernel version (24 or 26) 166 ifeq ($(shell if echo "$(VERSION).$(PATCHLEVEL)." | grep '2\.4\.' > /dev/null; then echo yes; fi),yes) 167 KERN_VERSION := 24 168 else 169 KERN_VERSION := 26 170 endif 171 172 endif # neq($(KERNELRELEASE),) 173 174 # debug - show guesses. 175 ifdef DEBUG 176 $(warning dbg: KERN_DIR = $(KERN_DIR)) 177 $(warning dbg: KERN_INCL = $(KERN_INCL)) 178 $(warning dbg: MODULE_DIR = $(MODULE_DIR)) 179 $(warning dbg: KERN_VERSION = $(KERN_VERSION)) 180 endif 181 182 endif # eq($(MAKECMDGOALS),clean)
Note:
See TracChangeset
for help on using the changeset viewer.