OSSP CVS Repository

ossp - ossp-pkg/l2/Makefile.in 1.34
Not logged in
[Honeypot]  [Browse]  [Directory]  [Home]  [Login
[Reports]  [Search]  [Ticket]  [Timeline
  [Raw

ossp-pkg/l2/Makefile.in 1.34
##
##  L2 - OSSP Logging Library
##  Copyright (c) 2001 The OSSP Project (http://www.ossp.org/)
##  Copyright (c) 2001 Cable & Wireless Deutschland (http://www.cw.com/de/)
##
##  This file is part of OSSP L2, a flexible logging library which
##  can be found at http://www.ossp.org/pkg/l2/.
##
##  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.
##
##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
##  SUCH DAMAGE.
##
##  Makefile.in: Autoconf Makefile skeleton
##

@SET_MAKE@

TOP         = .

#   installation paths
DESTDIR     =
prefix      = @prefix@
exec_prefix = @exec_prefix@
bindir      = @bindir@
libdir      = @libdir@
includedir  = @includedir@
mandir      = @mandir@

#   build tools
CC          = @CC@
CXX         = @CXX@
CFLAGS      = @CFLAGS@ -I.
CXXFLAGS    = @CXXFLAGS@ -I.
LDFLAGS     = @LDFLAGS@ -L.
LIBS        = @LIBS@
AR          = @AR@
RANLIB      = @RANLIB@
RM          = rm -f
RMDIR       = rmdir
POD2MAN     = pod2man
TRUE        = true
BISON       = bison
FLEX        = flex
SHTOOL      = ./shtool
LIBTOOL     = ./libtool

TARGET       = $(TARGET_LIBS) $(TARGET_MANS) $(TARGET_TESTS)
TARGET_LIBS  = libl2.la @LIBL2XX_LA@
TARGET_MANS  = l2-config.1 l2.3 @L2XX_3@
TARGET_TESTS = l2_test @L2_TESTXX@

#   list of library object files
OBJS = \
    l2_env.lo \
    l2_channel.lo \
    l2_ch_noop.lo \
    l2_ch_fd.lo \
    l2_ch_file.lo \
    l2_ch_pipe.lo \
    l2_ch_syslog.lo \
    l2_ch_socket.lo \
    l2_ch_irc.lo \
    l2_ch_smtp.lo \
    l2_ch_null.lo \
    l2_ch_filter.lo \
    l2_ch_prefix.lo \
    l2_ch_buffer.lo \
    l2_ut_format.lo \
    l2_ut_param.lo \
    l2_ut_pcre.lo \
    l2_ut_level.lo \
    l2_ut_fmtcb.lo \
    l2_ut_sa.lo \
    l2_spec.lo \
    l2_spec_scan.lo \
    l2_spec_parse.lo \
    l2_version.lo

#   list of source files
SRCS = \
    l2_env.c \
    l2_channel.c \
    l2_ch_noop.c \
    l2_ch_fd.c \
    l2_ch_file.c \
    l2_ch_pipe.c \
    l2_ch_syslog.c \
    l2_ch_socket.c \
    l2_ch_irc.c \
    l2_ch_smtp.c \
    l2_ch_null.c \
    l2_ch_filter.c \
    l2_ch_prefix.c \
    l2_ch_buffer.c \
    l2_ut_format.c \
    l2_ut_param.c \
    l2_ut_pcre.c \
    l2_ut_level.c \
    l2_ut_fmtcb.c \
    l2_ut_sa.c \
    l2_version.c

#   helper macro for generating a Unix manual page
_MANPAGE = \
    V1=`$(SHTOOL) version -lc -dshort l2_version.c`; \
    V2=`$(SHTOOL) version -lc -dlong l2_version.c`; \
    D=`$(SHTOOL) version -lc -dlong l2_version.c |\
       sed -e 's;.*(;;' -e 's;).*;;'`; \
    $(POD2MAN) --section=$${SEC} --center="$${ONELINE}" \
               --release="$$D" --date="$${NAME} $$V1" $(S)$${BASENAME}.pod |\
    sed -e "s;L2_VERSION_STR;$$V2;" >$${BASENAME}.$${SEC}

#   implicit building rules
.SUFFIXES:
.SUFFIXES: .c .cc .o .lo
.c.o:
	$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
.cc.o:
	$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<
.c.lo:
	$(LIBTOOL) --mode=compile --quiet $(CC) -c $(CPPFLAGS) $(CFLAGS) $<
.cc.lo:
	$(LIBTOOL) --mode=compile --quiet $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<

#   default target
all: $(TARGET)

#   build libraries
libl2.la: $(OBJS)
	$(LIBTOOL) --mode=link --quiet $(CC) -o libl2.la $(OBJS) -rpath $(libdir) \
	    -version-info `$(SHTOOL) version -l c -d libtool l2_version.c`
libl2++.la: $(OBJS) l2++.lo
	$(LIBTOOL) --mode=link --quiet $(CC) -o libl2++.la $(OBJS) l2++.lo -rpath $(libdir) \
	    -version-info `$(SHTOOL) version -l c -d libtool l2_version.c`

#   build regex library
l2_ut_pcre.lo: l2_ut_pcre.tab l2_ut_pcre.c
l2_ut_pcre.tab: l2_ut_pcre.c
	$(CC) $(CFLAGS) -DL2_UT_PCRE_TAB $(LDFLAGS) -o l2_ut_pcre.gen l2_ut_pcre.c $(LIBS)
	./l2_ut_pcre.gen >l2_ut_pcre.tab
	-$(RM) l2_ut_pcre.gen

#   build specification parser/scanner
l2_spec.c: l2_spec.h l2_spec_parse.h
l2_spec_scan.lo: l2_spec_scan.c l2_spec_parse.h
l2_spec_parse.c l2_spec_parse.h: l2_spec_parse.y
	$(BISON) -d -k -pl2_spec_ -ol2_spec_parse.c l2_spec_parse.y
l2_spec_scan.c: l2_spec_scan.l
	$(FLEX) -f -Pl2_spec_ -s -8 -B -ol2_spec_scan.c l2_spec_scan.l

#   build test suite programs
l2_test: l2_test.o libl2.la
	$(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o l2_test l2_test.o libl2.la $(LIBS)
l2_test++: l2_test++.o libl2++.la
	$(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o l2_test++ l2_test++.o libl2++.la $(LIBS)
l2_sockmon: l2_sockmon.o
	$(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o l2_sockmon l2_sockmon.o $(LIBS)

#   build Unix manual pages
l2-config.1: l2-config.pod l2_version.c
	BASENAME="l2-config"; SEC=1; \
	NAME="L2"; ONELINE="Logging Library"; \
	$(_MANPAGE)
l2.3: l2.pod l2_version.c
	BASENAME="l2"; SEC=3; \
	NAME="L2"; ONELINE="Logging Library"; \
	$(_MANPAGE)
l2++.3: l2++.pod l2_version.c
	BASENAME="l2++"; SEC=3; \
	NAME="L2"; ONELINE="Logging Library (C++)"; \
	$(_MANPAGE)

#   (minimalistic) test suite
check: test
test: all test-c @TEST_CXX@
test-c:
	$(LIBTOOL) --mode=execute ./l2_test
test-cxx:
	$(LIBTOOL) --mode=execute ./l2_test++

#   perform standard installation procedure
install: all
	$(MAKE) $(MFLAGS) install-std install-c @INSTALL_CXX@
install-std:
	$(SHTOOL) mkdir -p -f -m 755 $(DESTDIR)$(bindir)
	$(SHTOOL) mkdir -p -f -m 755 $(DESTDIR)$(includedir)
	$(SHTOOL) mkdir -p -f -m 755 $(DESTDIR)$(libdir)
	$(SHTOOL) mkdir -p -f -m 755 $(DESTDIR)$(mandir)/man1
	$(SHTOOL) mkdir -p -f -m 755 $(DESTDIR)$(mandir)/man3
	$(SHTOOL) install -c -m 755 l2-config $(DESTDIR)$(bindir)/l2-config
	$(SHTOOL) install -c -m 644 l2-config.1 $(DESTDIR)$(mandir)/man1/l2-config.1
install-c:
	$(SHTOOL) install -c -m 644 l2.3 $(DESTDIR)$(mandir)/man3/l2.3
	$(SHTOOL) install -c -m 644 l2.h $(DESTDIR)$(includedir)/l2.h
	@$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 \
	    libl2.la $(DESTDIR)$(libdir)/libl2.la
install-cxx:
	$(SHTOOL) install -c -m 644 l2++.3 $(DESTDIR)$(mandir)/man3/l2++.3
	$(SHTOOL) install -c -m 644 l2++.h $(DESTDIR)$(includedir)/l2++.h
	@$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 \
	    libl2++.la $(DESTDIR)$(libdir)/libl2++.la

#   perform standard uninstallation procedure
uninstall:
	$(MAKE) $(MFLAGS) @UNINSTALL_CXX@ uninstall-c uninstall-std
uninstall-cxx:
	@$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libl2++.la
	$(RM) $(DESTDIR)$(includedir)/l2++.h
	$(RM) $(DESTDIR)$(mandir)/man3/l2++.3
uninstall-c:
	@$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libl2.la
	$(RM) $(DESTDIR)$(includedir)/l2.h
	$(RM) $(DESTDIR)$(mandir)/man3/l2.3
uninstall-std:
	$(RM) $(DESTDIR)$(mandir)/man1/l2-config.1
	$(RM) $(DESTDIR)$(bindir)/l2-config
	$(RMDIR) $(DESTDIR)$(mandir)/man3
	$(RMDIR) $(DESTDIR)$(mandir)/man1
	$(RMDIR) $(DESTDIR)$(mandir)
	$(RMDIR) $(DESTDIR)$(libdir)
	$(RMDIR) $(DESTDIR)$(includedir)
	$(RMDIR) $(DESTDIR)$(bindir)

#   remove everything which can be regenerated
#   by "make all"
clean:
	$(RM) *.lo *.o
	$(RM) .libs/*
	-$(RMDIR) .libs >/dev/null 2>&1 || $(TRUE)
	$(RM) $(TARGET_LIBS)
	$(RM) $(TARGET_TESTS)
#   remove machine-generated parsers and scanners
	$(RM) l2_spec_parse.h
	$(RM) l2_spec_parse.c
	$(RM) l2_spec_scan.c

#   remove everything which can be regenerated
#   by "./configure && make all"
distclean: clean
	$(RM) l2-config
	$(RM) l2_config.h
	$(RM) config.log config.cache config.status
	$(RM) libtool
	$(RM) Makefile
	$(RM) l2_test.log
	$(RM) l2_ut_pcre.tab
	$(RM) l2.h

#   remove everything which can be regenerated
#   by "./devtool autogen"
realclean: distclean
	$(RM) configure
	$(RM) config.guess config.sub
	$(RM) ltmain.sh libtool.m4
	$(RM) shtool
	$(RM) l2-config.1
	$(RM) l2_config.h.in
	$(RM) l2.3
	$(RM) l2++.3
	$(RM) l2_spec_scan.c
	$(RM) l2_spec_parse.c l2_spec_parse.h

#   create dependencies
depend: all
	cp Makefile.in Makefile.in.bak \
	&& sed -ne '1,/^#   AUTOMATICALLY GENERATED DEPENDENCY LIST/p' Makefile.in > Makefile.new \
	&& $(CC) -MM $(CPPFLAGS) $(CFLAGS) $(SRCS) |\
	   perl -e 'my $$d = ""; $$d .= $$_ while (<STDIN>); $$_ = $$d; \
	            s|\\\n\s*| |sg; s|\b?\S*/\S*\b?||g; s|\s{2,}| |g; \
	            print $$_;' >> Makefile.new \
	&& cp Makefile.new Makefile.in
	&& rm -f Makefile.new

$(OBJS): Makefile

#   AUTOMATICALLY GENERATED DEPENDENCY LIST - DO NOT EDIT
l2_env.o: l2_env.c l2_p.h l2.h l2_config.h l2_ut_format.h l2_ut_pcre.h l2_ut_sa.h
l2_channel.o: l2_channel.c l2_p.h l2.h l2_config.h l2_ut_format.h l2_ut_pcre.h l2_ut_sa.h
l2_ch_noop.o: l2_ch_noop.c l2.h
l2_ch_fd.o: l2_ch_fd.c l2.h
l2_ch_file.o: l2_ch_file.c l2.h
l2_ch_pipe.o: l2_ch_pipe.c l2.h l2_p.h l2_config.h l2_ut_format.h l2_ut_pcre.h l2_ut_sa.h
l2_ch_syslog.o: l2_ch_syslog.c l2.h l2_p.h l2_config.h l2_ut_format.h l2_ut_pcre.h l2_ut_sa.h
l2_ch_socket.o: l2_ch_socket.c l2.h l2_p.h l2_config.h l2_ut_format.h l2_ut_pcre.h l2_ut_sa.h
l2_ch_irc.o: l2_ch_irc.c l2.h l2_p.h l2_config.h l2_ut_format.h l2_ut_pcre.h l2_ut_sa.h
l2_ch_smtp.o: l2_ch_smtp.c l2.h l2_p.h l2_config.h l2_ut_format.h l2_ut_pcre.h l2_ut_sa.h
l2_ch_null.o: l2_ch_null.c l2.h
l2_ch_filter.o: l2_ch_filter.c l2.h l2_ut_pcre.h
l2_ch_prefix.o: l2_ch_prefix.c l2.h
l2_ch_buffer.o: l2_ch_buffer.c l2.h l2_p.h l2_config.h l2_ut_format.h l2_ut_pcre.h l2_ut_sa.h
l2_ut_format.o: l2_ut_format.c l2_ut_format.h
l2_ut_param.o: l2_ut_param.c l2.h l2_p.h l2_config.h l2_ut_format.h l2_ut_pcre.h l2_ut_sa.h
l2_ut_pcre.o: l2_ut_pcre.c l2_ut_pcre.h l2_ut_pcre.tab
l2_ut_level.o: l2_ut_level.c l2.h l2_p.h l2_config.h l2_ut_format.h l2_ut_pcre.h l2_ut_sa.h
l2_ut_fmtcb.o: l2_ut_fmtcb.c l2.h
l2_ut_sa.o: l2_ut_sa.c l2_config.h l2_ut_sa.h
l2_version.o: l2_version.c l2_version.c

CVSTrac 2.0.1