Makefile revision 594dd610252923591ed0f310695e82d3fb87e581
# Makefile for udev
#
# Copyright (C) 2003,2004 Greg Kroah-Hartman <greg@kroah.com>
# Copyright (C) 2004-2005 Kay Sievers <kay.sievers@vrfy.org>
#
# 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 this to make use of syslog.
USE_LOG = true
# Set this to compile-in development debug messages. Pass UDEV_LOG="debug"
# to the executed binary or set the value in the udev configuration file to
# let udev print the debug messages to syslog.
DEBUG = false
# Set this to include Security-Enhanced Linux support.
USE_SELINUX = false
# Set this to comile with klibc instead of glibc.
USE_KLIBC = false
# Set this to create statically linked binaries.
USE_STATIC = false
# To build any of the extras programs, run with:
# make EXTRAS="extras/a extras/b"
# make the build silent. Set this to something else to make it noisy again.
V=false
VERSION = 063
DESTDIR =
# override this to make udev look in a different location for it's config files
prefix =
exec_prefix = ${prefix}
srcdir = .
INSTALL_PROGRAM = ${INSTALL}
# place to put our device nodes
# 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
# check if compiler option is supported
cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi;}
CFLAGS += -D_GNU_SOURCE
# use '-Os' optimization if available, else use -O2
HEADERS = \
udev.h \
SYSFS_OBJS = \
UDEV_OBJS = \
OBJS = \
udev.a \
# 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.
else
CFLAGS += -DUSE_SELINUX
CFLAGS += -DUSE_STATIC
else
# config files automatically generated
echo $$target ; \
-C $$target $@ ; \
done ; \
$(KLCC):
INSTALLDIR=$(KLIBC_INSTALL) \
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)
.c.o:
echo $$target ; \
-C $$target $@ ; \
done ; \
fi
fi
echo $$target ; \
-C $$target $@ ; \
done ; \
echo $$target ; \
-C $$target $@ ; \
done ; \
test: all
@ cd test && ./udev-test.pl
@ cd test && ./udevstart-test.pl
tests: test