Changeset 36467 in vbox for trunk/src/VBox/Installer/linux/Makefile.include.footer
- Timestamp:
- Mar 29, 2011 8:34:18 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 70851
- File:
-
- 1 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
Note:
See TracChangeset
for help on using the changeset viewer.