Based on a patch from Svetoslav Slavtchev <svetljo@gmx.de>
HOTPLUG_EXEC = $(ROOT)
DESTDIR =
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}
# override this to make udev look in a different location for it's config files
prefix =
exec_prefix = ${prefix}
KLIBC_BASE = $(PWD)/klibc
KLIBC_DIR = $(KLIBC_BASE)/klibc
INCLUDE_DIR := $(KLIBC_DIR)/include
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 = \
include $(KLIBC_DIR)/arch/$(ARCH)/MCONFIG
# arch specific objects
ARCH_LIB_OBJS = \
all: $(ROOT) $(SENDER) $(UDEVD) $(HELPER)
@extras="$(EXTRAS)" ; for target in $$extras ; do \
echo $$target ; \
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 ; \
-C $$target $@ ; \
done ; \
$(ARCH_LIB_OBJS) : $(CRT0)
$(CRT0):
$(ARCH_LIB_OBJS) : $(CRT0)
$(CRT0):
+ $(MAKE) -C klibc KERNEL_DIR=$(KERNEL_DIR)
TDB = tdb/tdb.o \
tdb/spinlock.o
TDB = tdb/tdb.o \
tdb/spinlock.o
DEBUG
if set to 'true', debugging messages will be sent to the syslog
as udev is run. Default value is 'false'.
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
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
- Install the project:
make install
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 \
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
OBJS = main.o
CRT0 = ../../klibc/klibc/crt0.o
recurse:
@for dir in $(SUBDIRS); do\
recurse:
@for dir in $(SUBDIRS); do\
+ $(MAKE) KERNEL_DIR=$(KERNEL_DIR) -C $$dir ; \
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 \
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
OBJS = ioctl/libdevmapper.o libdm-common.o
-I$(KLIBSRC)/arch/$(ARCH)/include \
-I$(KLIBSRC)/include/bits$(BITSIZE) \
-D__KLIBC__ -DBITSIZE=$(BITSIZE) -I$(KLIBSRC)/include \
-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
LDFLAGS =
AR = $(CROSS)ar
RANLIB = $(CROSS)ranlib