Makefile revision 15ff0ba36e9c1f051fe1e35e69f8569d0dfe2d66
# Makefile for udev
#
# 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
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
VERSION = 088
# 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
V =
PROGRAMS = \
udev \
udevd \
udevsend \
udevinfo \
udevtest \
HEADERS = \
udev.h \
UDEV_OBJS = \
MAN_PAGES = \
udev.7 \
udevmonitor.8 \
udevd.8 \
udevtrigger.8 \
udevsend.8 \
udevtest.8 \
udevinfo.8 \
GEN_HEADERS = \
prefix =
DESTDIR =
INSTALL_PROGRAM = ${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
echo; \
echo; \
fi
done;
done;
done;
done;
done;
@ cd test && ./udev-test.pl
@ cd test && ./udevstart-test.pl
@ echo "Summary of changes from v$(shell printf '%03i' $$(expr $(VERSION) - 1)) to v$(VERSION)" >> $@
@ echo "============================================" >> $@
@ echo >> $@
@ echo >> $@
@ cat $@
@ 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"