Makefile revision 8b36cc0f179ee35176016ab67ae53078df4110fa
# Makefile for udev
#
# Copyright (C) 2003,2004 Greg Kroah-Hartman <greg@kroah.com>
#
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Set the following to control the use of syslog
# Set it to `false' to remove all logging
USE_LOG = true
# Set the following to `true' to log the debug
# and make a unstripped, unoptimized binary.
# Leave this set to `false' for production use.
DEBUG = false
# Set this to compile with Security-Enhanced Linux support.
USE_SELINUX = false
VERSION = 050
HOTPLUG_EXEC = $(ROOT)
DESTDIR =
# override this to make udev look in a different location for it's config files
prefix =
exec_prefix = ${prefix}
srcdir = .
INSTALL_PROGRAM = ${INSTALL}
# To build any of the extras programs, run with:
# make EXTRAS="extras/a extras/b"
# place to put our device nodes
# Comment out this line to build with something other
# than the local version of klibc
#USE_KLIBC = true
# make the build silent (well, at least the udev part) Set this
# to something else to make it noisy again.
V=false
# set up PWD so that older versions of make will work with our build.
# If you are running a cross compiler, you may want to set this
# to something more interesting, like "arm-linux-". If you want
# to compile vs uClibc, that can be done here as well.
# code taken from uClibc to determine the current arch
# code taken from uClibc to determine the gcc include dir
# code taken from uClibc to determine the libgcc.a filename
# use '-Os' optimization if available, else use -O2
then echo "-Os"; else echo "-O2" ; fi}
# add -Wredundant-decls when libsysfs gets cleaned up
# if DEBUG is enabled, then we do not strip or optimize
else
# If we are using our version of klibc, then we need to build, link it, and then
# link udev against it statically.
# Otherwise, use glibc and link dynamically.
# arch specific objects
$(OPTFLAGS) \
-I$(KLIBC_FIXUPS_DIR) \
-I$(INCLUDE_DIR) \
-I$(GCCINCDIR) \
-I$(LINUX_INCLUDE_DIR)
LIB_OBJS =
else
CRT0 =
LIBC =
LDFLAGS =
CFLAGS += -DUSE_SELINUX
# config files automatically generated
echo $$target ; \
-C $$target $@ ; \
done ; \
$(ARCH_LIB_OBJS) : $(CRT0)
$(CRT0):
fi
HEADERS = \
udev.h \
SYSFS_OBJS = \
UDEV_OBJS = \
OBJS = \
HEADERS += \
KLIBC_FIXUP_OBJS = \
else
rm -f $@
rm -f $@
rm -f $@
# header files automatically generated
ccdv:
@echo "Building ccdv"
# Rules on how to create the generated header files
@echo "Creating udev_version.h"
# Rules on how to create the generated config files
sed -e "s:@udevdir@:$(udevdir):" -e "s:@configdir@:$(configdir):" < $(LOCAL_CFG_DIR)/udev.conf.in > $@
# Rules on how to create the man pages
$(GEN_MANPAGES): $(GEN_MANPAGESIN)
$(SYSFS_OBJS): $(HOST_PROGS)
$(KLIBC_FIXUP_OBJS): $(HOST_PROGS)
.c.o:
-rm -f core $(ROOT) $(GEN_HEADERS) $(GEN_CONFIGS) $(GEN_MANPAGES) $(INFO) $(DAEMON) $(SENDER) $(TESTER)
echo $$target ; \
-C $$target $@ ; \
done ; \
DISTFILES = $(shell find . \( -not -name '.' \) -print | grep -v -e CVS -e "\.tar\.gz" -e "\/\." -e releases -e BitKeeper -e SCCS -e test/sys | sort )
DISTDIR := $(RELEASE_NAME)
srcdir = .
# @echo $(DISTFILES)
if test -d $$file; then \
else \
fi; \
done
fi
fi
echo $$target ; \
-C $$target $@ ; \
done ; \
- rmdir $(hotplugdir)
echo $$target ; \
-C $$target $@ ; \
done ; \
test: all
@ cd test && ./udev-test.pl