mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-01-22 15:10:20 +07:00
[PATCH] add KERNEL_DIR option so that the distros will be happy
Based on a patch from Svetoslav Slavtchev <svetljo@gmx.de>
This commit is contained in:
parent
c7e2a0bc08
commit
977083c253
13
Makefile
13
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
|
||||
|
10
README
10
README
@ -52,15 +52,16 @@ To use:
|
||||
DEBUG
|
||||
if set to 'true', debugging messages will be sent to the syslog
|
||||
as udev is run. Default value is 'false'.
|
||||
KERNEL_DIR
|
||||
If this is not set it will default to /lib/modules/`uname -r`/build
|
||||
This is used if USE_KLIBC=true to find the kernel include
|
||||
directory that klibc needs to build against. This must be set
|
||||
if you are not building udev while running a 2.6 kernel.
|
||||
|
||||
So, if you want to build udev using klibc with debugging messages, you
|
||||
would do:
|
||||
make USE_KLIBC=true DEBUG=true
|
||||
|
||||
Note: If you want to use klibc, you will have to set up the "linux"
|
||||
symlink properly. See the file klibc/klibc/README and pay
|
||||
attention to step "a)" there.
|
||||
|
||||
- Install the project:
|
||||
make install
|
||||
|
||||
@ -95,3 +96,4 @@ greg@kroah.com
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@ CC = gcc
|
||||
GCCINCDIR := ${shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp"}
|
||||
CFLAGS = -pipe -g -O2 -Wall -Wunused -Wstrict-prototypes -nostdinc \
|
||||
-I$(klibcdir)/klibc/include -I$(klibcdir)/klibc/include/bits32 \
|
||||
-I$(GCCINCDIR) -I$(klibcdir)/linux/include -I$(sysfsdir) -I.
|
||||
-I$(GCCINCDIR) -I$(KERNEL_DIR)/include -I$(sysfsdir) -I.
|
||||
|
||||
OBJS = main.o
|
||||
CRT0 = ../../klibc/klibc/crt0.o
|
||||
@ -32,7 +32,7 @@ SUBDIRS = libdevmapper
|
||||
|
||||
recurse:
|
||||
@for dir in $(SUBDIRS); do\
|
||||
$(MAKE) -C $$dir ; \
|
||||
$(MAKE) KERNEL_DIR=$(KERNEL_DIR) -C $$dir ; \
|
||||
done
|
||||
$(MAKE) $(EXEC)
|
||||
|
||||
|
@ -10,7 +10,7 @@ CC = gcc
|
||||
GCCINCDIR := ${shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp"}
|
||||
CFLAGS = -pipe -g -O2 -Wall -Wunused -Wstrict-prototypes -nostdinc \
|
||||
-I$(klibcdir)/klibc/include -I$(klibcdir)/klibc/include/bits32 \
|
||||
-I$(GCCINCDIR) -I$(klibcdir)/linux/include -I. -Iioctl
|
||||
-I$(GCCINCDIR) -I$(KERNEL_DIR)/include -I. -Iioctl
|
||||
|
||||
OBJS = ioctl/libdevmapper.o libdm-common.o
|
||||
|
||||
|
@ -12,7 +12,7 @@ REQFLAGS = $(ARCHREQFLAGS) -nostdinc -iwithprefix include -I$(KLIBSRC) \
|
||||
-I$(KLIBSRC)/arch/$(ARCH)/include \
|
||||
-I$(KLIBSRC)/include/bits$(BITSIZE) \
|
||||
-D__KLIBC__ -DBITSIZE=$(BITSIZE) -I$(KLIBSRC)/include \
|
||||
-I$(SRCROOT)/linux/include
|
||||
-I$(KERNEL_DIR)/include
|
||||
LDFLAGS =
|
||||
AR = $(CROSS)ar
|
||||
RANLIB = $(CROSS)ranlib
|
||||
|
Loading…
Reference in New Issue
Block a user