Makefile revision a8d141a3c165dafcf21d081e88f3cc0b7f1e65c5
# 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
#
VERSION = 074
# set this to make use of syslog
USE_LOG = true
# compile-in development debug messages
# (export UDEV_LOG="debug" or set udev_log="debug" in udev.conf
# to print the debug messages to syslog)
DEBUG = false
# compile with gcc's code coverage option
USE_GCOV = false
# include Security-Enhanced Linux support
USE_SELINUX = false
# 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 pass:
# make EXTRAS="extras/<extra1> extras/<extra2>"
EXTRAS =
# make the build silent. Set this to something else to make it noisy again.
V = false
PROGRAMS = \
udev \
udevd \
udevsend \
udevinfo \
udevtest \
HEADERS = \
udev.h \
UDEV_OBJS = \
MAN_PAGES = \
udev.8 \
udevmonitor.8 \
udevd.8 \
udevsend.8 \
udevtest.8 \
udevinfo.8 \
SYSFS_OBJS = \
# config files automatically generated
GEN_CONFIGS = \
GEN_HEADERS = \
# override this to make udev look in a different location for it's config files
prefix =
exec_prefix = ${prefix}
DESTDIR =
INSTALL_PROGRAM = ${INSTALL}
CROSS =
# 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;}
# use -Os optimization if available, else use -O2
# include our local copy of libsysfs
# if DEBUG is enabled, then we do not strip
STRIPCMD =
# if our own version of klibc is used, we need to build it
V = true
CFLAGS += -DUSE_SELINUX
CFLAGS += -DUSE_STATIC
else
echo $$target; \
-C $$target $@; \
done;
# clear implicit rules
.SUFFIXES:
# build the objects
%.o: %.c $(GEN_HEADERS)
# "Static Pattern Rule" to build all programs
$(UDEV_OBJS):
@rm -f $@
$(SYSFS_OBJS):
@rm -f $@
# generate config files
$(GEN_CONFIGS):
# generate config header file
@echo "Creating udev_version.h"
# man pages
.PRECIOUS: %.8
- find . \( -not -type d \) -and \( -name '*~' -o -name '*.[oas]' \) -type f -print0 | xargs -0rt rm -f
- rm -f udev_gcov.txt
echo $$target; \
done;
fi
echo; \
echo; \
fi
echo $$target; \
done;
echo $$target; \
done;
echo $$target; \
done;
echo $$target; \
done;
echo $$target; \
done;
@ cd test && ./udev-test.pl
@ cd test && ./udevstart-test.pl
@echo
@echo "binaries built with gcov support."
@echo "run the tests and analyze with 'make udev_gcov.txt'"
# see docs/README-gcov_for_udev
echo "################" >> $@; \
echo "$$name.c" >> $@; \
echo "################" >> $@; \
if [ -e "$$name.gcda" ]; then \
else \
fi; \
echo >> $@; \
done; \
echo "view $@ for the result"