File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / sudo / common / Makefile.in
Revision 1.1.1.6 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Sun Jun 15 16:12:54 2014 UTC (10 years, 4 months ago) by misho
Branches: sudo, MAIN
CVS tags: v1_8_10p3_0, v1_8_10p3, HEAD
sudo v 1.8.10p3

#
# Copyright (c) 2011-2014 Todd C. Miller <Todd.Miller@courtesan.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# @configure_input@
#

#### Start of system configuration section. ####

srcdir = @srcdir@
devdir = @devdir@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
incdir = $(top_srcdir)/include
cross_compiling = @CROSS_COMPILING@

# Where to install things...
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
sysconfdir = @sysconfdir@
libexecdir = @libexecdir@
datarootdir = @datarootdir@
localstatedir = @localstatedir@

# Compiler & tools to use
CC = @CC@
LIBTOOL = @LIBTOOL@

# C preprocessor flags
CPPFLAGS = -I$(incdir) -I$(top_builddir) -I$(top_srcdir) @CPPFLAGS@

# Usually -O and/or -g
CFLAGS = @CFLAGS@

# PIE flags
PIE_CFLAGS = @PIE_CFLAGS@
PIE_LDFLAGS = @PIE_LDFLAGS@

# Stack smashing protection flags
SSP_CFLAGS = @SSP_CFLAGS@
SSP_LDFLAGS = @SSP_LDFLAGS@

# cppcheck options, usually set in the top-level Makefile
CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX

# Regression tests
TEST_PROGS = atofoo_test conf_test hltq_test parseln_test
TEST_LIBS = @LIBS@ @LIBINTL@ ../compat/libreplace.la
TEST_LDFLAGS = @LDFLAGS@

# OS dependent defines
DEFS = @OSDEFS@ -D_PATH_SUDO_CONF=\"$(sysconfdir)/sudo.conf\"

#### End of system configuration section. ####

SHELL = @SHELL@

LTOBJS = alloc.lo atobool.lo atoid.lo atomode.lo event.lo fatal.lo fileops.lo \
	 fmt_string.lo gidlist.lo lbuf.lo progname.lo secure_path.lo \
	 setgroups.lo sudo_conf.lo sudo_debug.lo sudo_dso.lo sudo_printf.lo \
	 term.lo ttysize.lo @COMMON_OBJS@

ATOFOO_TEST_OBJS = atofoo_test.lo locale_stub.lo

PARSELN_TEST_OBJS = parseln_test.lo locale_stub.lo

CONF_TEST_OBJS = conf_test.lo locale_stub.lo

HLTQ_TEST_OBJS = hltq_test.lo locale_stub.lo

all: libsudo_util.la

Makefile: $(srcdir)/Makefile.in
	(cd $(top_builddir) && ./config.status --file common/Makefile)

.SUFFIXES: .c .h .lo

.c.lo:
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $<

libsudo_util.la: $(LTOBJS)
	$(LIBTOOL) --mode=link $(CC) -o $@ $(LTOBJS) -no-install

atofoo_test: $(ATOFOO_TEST_OBJS) libsudo_util.la
	$(LIBTOOL) --mode=link $(CC) -o $@ $(ATOFOO_TEST_OBJS) libsudo_util.la $(PIE_LDFLAGS) $(SSP_LDFLAGS) $(TEST_LDFLAGS) $(TEST_LIBS)

conf_test: $(CONF_TEST_OBJS) libsudo_util.la
	$(LIBTOOL) --mode=link $(CC) -o $@ $(CONF_TEST_OBJS) libsudo_util.la $(PIE_LDFLAGS) $(SSP_LDFLAGS) $(TEST_LDFLAGS) $(TEST_LIBS)

parseln_test: $(PARSELN_TEST_OBJS) libsudo_util.la
	$(LIBTOOL) --mode=link $(CC) -o $@ $(PARSELN_TEST_OBJS) libsudo_util.la $(PIE_LDFLAGS) $(SSP_LDFLAGS) $(TEST_LDFLAGS) $(TEST_LIBS)

hltq_test: $(HLTQ_TEST_OBJS) libsudo_util.la
	$(LIBTOOL) --mode=link $(CC) -o $@ $(HLTQ_TEST_OBJS) libsudo_util.la $(PIE_LDFLAGS) $(SSP_LDFLAGS) $(TEST_LDFLAGS) $(TEST_LIBS)

pre-install:

install:

install-dirs:

install-binaries:

install-includes:

install-doc:

install-plugin:

uninstall:

cppcheck:
	cppcheck $(CPPCHECK_OPTS) -I$(incdir) -I$(top_builddir) -I$(top_srcdir) $(srcdir)/*.c

# Note: some regress checks are run from srcdir for consistent error messages
check: $(TEST_PROGS)
	@if test X"$(cross_compiling)" != X"yes"; then \
	    rval=0; \
	    ./atofoo_test || rval=`expr $$rval + $$?`; \
	    ./hltq_test || rval=`expr $$rval + $$?`; \
	    build_dir=`pwd`; \
	    cd $(srcdir); \
	    for dir in sudo_conf sudo_parseln; do \
		passed=0; failed=0; total=0; \
		mkdir -p $$build_dir/regress/$$dir; \
		for t in regress/$$dir/*.in; do \
		    base=`basename $$t .in`; \
		    out="$$build_dir/regress/$$dir/$${base}.out"; \
		    out_ok="regress/$$dir/$${base}.out.ok"; \
		    err="$$build_dir/regress/$$dir/$${base}.err"; \
		    err_ok="regress/$$dir/$${base}.err.ok"; \
		    if test "$$dir" = "sudo_conf"; then \
			$$build_dir/conf_test $$t >$$out 2>$$err; \
		    else \
			$$build_dir/parseln_test <$$t >$$out 2>$$err; \
		    fi; \
		    if cmp $$out $$out_ok >/dev/null; then \
			passed=`expr $$passed + 1`; \
			echo "$$dir/$$base: OK"; \
		    else \
			failed=`expr $$failed + 1`; \
			echo "$$dir/$$base: FAIL"; \
			diff $$out $$out_ok || true; \
		    fi; \
		    total=`expr $$total + 1`; \
		    if test -s $$err_ok; then \
			if cmp $$err $$err_ok >/dev/null; then \
			    passed=`expr $$passed + 1`; \
			    echo "$$dir/$$base (stderr): OK"; \
			else \
			    failed=`expr $$failed + 1`; \
			    echo "$$dir/$$base (stderr): FAIL"; \
			    diff $$err $$err_ok || true; \
			fi; \
			total=`expr $$total + 1`; \
		    elif test -s $$err; then \
			failed=`expr $$failed + 1`; \
			echo "$$dir/$$base (stderr): FAIL"; \
			cat $$err 1>&2; \
		    fi; \
		done; \
		if test $$failed -ne 0; then \
		    rval=`expr $$rval + $$failed`; \
		fi; \
		echo "$$dir: $$passed/$$total tests passed; $$failed/$$total tests failed"; \
	    done; \
	    exit $$rval; \
	fi

clean:
	-$(LIBTOOL) --mode=clean rm -f $(TEST_PROGS) *.lo *.o *.la *.a stamp-* core *.core core.* regress/*/*.out

mostlyclean: clean

distclean: clean
	-rm -rf Makefile .libs

clobber: distclean

realclean: distclean
	rm -f TAGS tags

cleandir: realclean

# Autogenerated dependencies, do not modify
aix.lo: $(srcdir)/aix.c $(incdir)/alloc.h $(incdir)/fatal.h \
        $(incdir)/gettext.h $(incdir)/missing.h $(incdir)/sudo_debug.h \
        $(incdir)/sudo_util.h $(top_builddir)/config.h \
        $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/aix.c
alloc.lo: $(srcdir)/alloc.c $(incdir)/alloc.h $(incdir)/fatal.h \
          $(incdir)/gettext.h $(incdir)/missing.h $(top_builddir)/config.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/alloc.c
atobool.lo: $(srcdir)/atobool.c $(incdir)/missing.h $(incdir)/sudo_debug.h \
            $(incdir)/sudo_util.h $(top_builddir)/config.h \
            $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/atobool.c
atofoo_test.lo: $(srcdir)/regress/atofoo/atofoo_test.c $(incdir)/fatal.h \
                $(incdir)/missing.h $(incdir)/sudo_util.h \
                $(top_builddir)/config.h $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/regress/atofoo/atofoo_test.c
atoid.lo: $(srcdir)/atoid.c $(incdir)/gettext.h $(incdir)/missing.h \
          $(incdir)/sudo_debug.h $(incdir)/sudo_util.h \
          $(top_builddir)/config.h $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/atoid.c
atomode.lo: $(srcdir)/atomode.c $(incdir)/gettext.h $(incdir)/missing.h \
            $(incdir)/sudo_debug.h $(incdir)/sudo_util.h \
            $(top_builddir)/config.h $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/atomode.c
conf_test.lo: $(srcdir)/regress/sudo_conf/conf_test.c $(incdir)/missing.h \
              $(incdir)/queue.h $(incdir)/sudo_conf.h $(top_builddir)/config.h \
              $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/regress/sudo_conf/conf_test.c
event.lo: $(srcdir)/event.c $(incdir)/alloc.h $(incdir)/fatal.h \
          $(incdir)/missing.h $(incdir)/queue.h $(incdir)/sudo_debug.h \
          $(incdir)/sudo_event.h $(incdir)/sudo_util.h \
          $(top_builddir)/config.h $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/event.c
event_poll.lo: $(srcdir)/event_poll.c $(incdir)/alloc.h $(incdir)/fatal.h \
               $(incdir)/missing.h $(incdir)/queue.h $(incdir)/sudo_debug.h \
               $(incdir)/sudo_event.h $(top_builddir)/config.h \
               $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/event_poll.c
event_select.lo: $(srcdir)/event_select.c $(incdir)/alloc.h $(incdir)/fatal.h \
                 $(incdir)/missing.h $(incdir)/queue.h $(incdir)/sudo_debug.h \
                 $(incdir)/sudo_event.h $(incdir)/sudo_util.h \
                 $(top_builddir)/config.h $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/event_select.c
fatal.lo: $(srcdir)/fatal.c $(incdir)/alloc.h $(incdir)/fatal.h \
          $(incdir)/gettext.h $(incdir)/missing.h $(incdir)/queue.h \
          $(incdir)/sudo_plugin.h $(top_builddir)/config.h \
          $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/fatal.c
fileops.lo: $(srcdir)/fileops.c $(incdir)/fileops.h $(incdir)/missing.h \
            $(incdir)/sudo_debug.h $(top_builddir)/config.h \
            $(top_srcdir)/compat/stdbool.h $(top_srcdir)/compat/timespec.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/fileops.c
fmt_string.lo: $(srcdir)/fmt_string.c $(incdir)/missing.h \
               $(incdir)/sudo_debug.h $(incdir)/sudo_util.h \
               $(top_builddir)/config.h $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/fmt_string.c
gidlist.lo: $(srcdir)/gidlist.c $(incdir)/alloc.h $(incdir)/fatal.h \
            $(incdir)/gettext.h $(incdir)/missing.h $(incdir)/sudo_debug.h \
            $(incdir)/sudo_util.h $(top_builddir)/config.h \
            $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/gidlist.c
hltq_test.lo: $(srcdir)/regress/tailq/hltq_test.c $(incdir)/fatal.h \
              $(incdir)/missing.h $(incdir)/queue.h $(top_builddir)/config.h \
              $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/regress/tailq/hltq_test.c
lbuf.lo: $(srcdir)/lbuf.c $(incdir)/alloc.h $(incdir)/fatal.h $(incdir)/lbuf.h \
         $(incdir)/missing.h $(incdir)/sudo_debug.h $(top_builddir)/config.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/lbuf.c
locale_stub.lo: $(top_srcdir)/src/locale_stub.c $(incdir)/fatal.h \
                $(incdir)/gettext.h $(incdir)/missing.h $(top_builddir)/config.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(top_srcdir)/src/locale_stub.c
parseln_test.lo: $(srcdir)/regress/sudo_parseln/parseln_test.c \
                 $(incdir)/fileops.h $(incdir)/missing.h \
                 $(top_builddir)/config.h $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/regress/sudo_parseln/parseln_test.c
progname.lo: $(srcdir)/progname.c $(incdir)/missing.h $(incdir)/sudo_util.h \
             $(top_builddir)/config.h $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/progname.c
secure_path.lo: $(srcdir)/secure_path.c $(incdir)/missing.h \
                $(incdir)/secure_path.h $(incdir)/sudo_debug.h \
                $(top_builddir)/config.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/secure_path.c
setgroups.lo: $(srcdir)/setgroups.c $(incdir)/missing.h $(incdir)/sudo_debug.h \
              $(incdir)/sudo_util.h $(top_builddir)/config.h \
              $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/setgroups.c
sudo_conf.lo: $(srcdir)/sudo_conf.c $(incdir)/alloc.h $(incdir)/fatal.h \
              $(incdir)/fileops.h $(incdir)/gettext.h $(incdir)/missing.h \
              $(incdir)/queue.h $(incdir)/secure_path.h $(incdir)/sudo_conf.h \
              $(incdir)/sudo_debug.h $(incdir)/sudo_plugin.h \
              $(incdir)/sudo_util.h $(top_builddir)/config.h \
              $(top_builddir)/pathnames.h $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/sudo_conf.c
sudo_debug.lo: $(srcdir)/sudo_debug.c $(incdir)/alloc.h $(incdir)/fatal.h \
               $(incdir)/gettext.h $(incdir)/missing.h $(incdir)/sudo_debug.h \
               $(incdir)/sudo_plugin.h $(incdir)/sudo_util.h \
               $(top_builddir)/config.h $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/sudo_debug.c
sudo_dso.lo: $(srcdir)/sudo_dso.c $(incdir)/missing.h $(incdir)/sudo_dso.h \
             $(top_builddir)/config.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/sudo_dso.c
sudo_printf.lo: $(srcdir)/sudo_printf.c $(incdir)/missing.h \
                $(incdir)/sudo_debug.h $(incdir)/sudo_plugin.h \
                $(top_builddir)/config.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/sudo_printf.c
term.lo: $(srcdir)/term.c $(incdir)/missing.h $(incdir)/sudo_debug.h \
         $(incdir)/sudo_util.h $(top_builddir)/config.h \
         $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/term.c
ttysize.lo: $(srcdir)/ttysize.c $(incdir)/missing.h $(incdir)/sudo_debug.h \
            $(incdir)/sudo_util.h $(top_builddir)/config.h \
            $(top_srcdir)/compat/stdbool.h
	$(LIBTOOL) --mode=compile $(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $(PIE_CFLAGS) $(SSP_CFLAGS) $(DEFS) $(srcdir)/ttysize.c

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>