summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2004-02-03 00:51:51 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:32:25 -0700
commit977083c253a6c7ec282f1cf36c496ee280dbf069 (patch)
treed96c100588e6e646dc3dfd62af2472466b470466 /Makefile
parentc7e2a0bc082321bceea7ac86fa6e1a42bcc91072 (diff)
[PATCH] add KERNEL_DIR option so that the distros will be happy
Based on a patch from Svetoslav Slavtchev <svetljo@gmx.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index dd2f697591..e1846dd4c0 100644
--- a/Makefile
+++ b/Makefile
@@ -41,6 +41,9 @@ LOCAL_CFG_DIR = etc/udev
HOTPLUG_EXEC = $(ROOT)
DESTDIR =
+
+KERNEL_DIR = /lib/modules/${shell uname -r}/build
+
# override this to make udev look in a different location for it's config files
prefix =
exec_prefix = ${prefix}
@@ -135,7 +138,8 @@ ifeq ($(strip $(USE_KLIBC)),true)
KLIBC_BASE = $(PWD)/klibc
KLIBC_DIR = $(KLIBC_BASE)/klibc
INCLUDE_DIR := $(KLIBC_DIR)/include
- LINUX_INCLUDE_DIR := $(KLIBC_BASE)/linux/include
+ LINUX_INCLUDE_DIR := $(KERNEL_DIR)/include
+# LINUX_INCLUDE_DIR := $(KLIBC_BASE)/linux/include
include $(KLIBC_DIR)/arch/$(ARCH)/MCONFIG
# arch specific objects
ARCH_LIB_OBJS = \
@@ -169,7 +173,10 @@ CFLAGS += -I$(PWD)/libsysfs
all: $(ROOT) $(SENDER) $(UDEVD) $(HELPER)
@extras="$(EXTRAS)" ; for target in $$extras ; do \
echo $$target ; \
- $(MAKE) prefix=$(prefix) LD="$(LD)" SYSFS="$(SYSFS)" \
+ $(MAKE) prefix=$(prefix) \
+ LD="$(LD)" \
+ SYSFS="$(SYSFS)" \
+ KERNEL_DIR="$(KERNEL_DIR)" \
-C $$target $@ ; \
done ; \
@@ -178,7 +185,7 @@ $(ROOT): $(LIBC)
$(ARCH_LIB_OBJS) : $(CRT0)
$(CRT0):
- $(MAKE) -C klibc
+ $(MAKE) -C klibc KERNEL_DIR=$(KERNEL_DIR)
TDB = tdb/tdb.o \
tdb/spinlock.o