Makefile revision 05b9640022d25a75923cc7809409914491a5f9da
#
# Copyright (C) 2003-2004 Greg Kroah-Hartman <greg@kroah.com>
# Copyright (C) 2004-2006 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
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
VERSION = 125
# 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
# 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
V =
PROGRAMS = \
udevd \
udevadm \
test-udev
HEADERS = \
udev.h \
udevd.h \
UDEV_OBJS = \
MAN_PAGES = \
udev.7 \
udevd.8 \
udevadm.8
GEN_HEADERS = \
prefix ?=
DESTDIR =
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
# if DEBUG is enabled, then we do not strip
CFLAGS += -DUSE_SELINUX
CFLAGS += -DUSE_STATIC
E = @echo
Q = @
else
E = @\#
Q =
export E Q
-C $$target $@ || exit 1; \
done;
# clear implicit rules
.SUFFIXES:
# build the objects
%.o: %.c $(HEADERS) $(GEN_HEADERS)
$(E) " CC " $@
# "Static Pattern Rule" to build all programs
$(E) " LD " $@
$(Q) rm -f $@
$(E) " AR " $@
$(E) " RANLIB " $@
$(Q) $(RANLIB) $@
$(E) " GENHDR " $@
$(Q) echo "/* Generated by make. */" > $@
# man pages
$(E) " XMLTO " $@
.PRECIOUS: %.8
$(E) " CLEAN "
done;
fi
done;
done;
done;
done;
done;
@ cd test && ./udev-test.pl
@ echo "============================================" >> $@
@ echo >> $@
@ echo >> $@
@ cat $@
@ echo
dist:
@ 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"