OSSP CVS Repository

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

ossp-pkg/l2/Makefile.in 1.15
##
##  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
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_stream.lo \
    l2_channel.lo \
    l2_ch_fd.lo \
    l2_ch_file.lo \
    l2_ch_pipe.lo \
    l2_ch_syslog.lo \
    l2_ch_socket.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

#   file containing the official version information
_VERSION_FILE = \
    l2_version.c

#   helper macro for updating version information
_VERSION = \
    $(SHTOOL) version -lc -nL2 -pl2_ $$OPT $(_VERSION_FILE);\
    V=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE)`;\
    sed -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README

#   helper macro for generating a Unix manual page
_MANPAGE = \
    V1=`$(SHTOOL) version -lc -dshort $(_VERSION_FILE)`; \
    V2=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE)`; \
    D=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE) |\
       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.c
l2_ut_pcre.c: l2_ut_pcre_tab.c
l2_ut_pcre_tab.c: l2_ut_pcre_gen
	./l2_ut_pcre_gen >l2_ut_pcre_tab.c
l2_ut_pcre_gen:
	$(CC) $(CFLAGS) -DL2_UT_PCRE_GENTAB $(LDFLAGS) -o l2_ut_pcre_gen l2_ut_pcre.c $(LIBS)

#   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)

#   build Unix manual pages
l2-config.1: l2-config.pod $(_VERSION_FILE)
	BASENAME="l2-config"; SEC=1; \
	NAME="L2"; ONELINE="Logging Library"; \
	$(_MANPAGE)
l2.3: l2.pod $(_VERSION_FILE)
	BASENAME="l2"; SEC=3; \
	NAME="L2"; ONELINE="Logging Library"; \
	$(_MANPAGE)
l2++.3: l2++.pod $(_VERSION_FILE)
	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 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_gen l2_ut_pcre_tab.c

#   remove everything which can be regenerated
#   by "autoconf && autoheader && ./configure && make all"
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

#   roll a distribution tarball
dist: distclean
	@$(SHTOOL) fixperm -v .; \
	V=`$(SHTOOL) version -l c -d short l2_version.c`; \
	$(SHTOOL) tarball -o l2-$${V}.tar.gz -d str-$${V} -u ossp -g ossp \
	                  -e 'CVS,\.cvsignore,\.[ao],^\.,autogen.sh' -c 'gzip --best' .

#   increase or update version information
new-version:
	@V="$(VERSION)"; \
	if [ ".$$V" != . ]; then \
		OPT="-s$$V"; \
	else \
		OPT="-e"; \
	fi; \
	$(_VERSION)
update-version:
	@OPT="-s`$(SHTOOL) version -lc -dshort $(_VERSION_FILE)`" && $(_VERSION)

#   create dependencies
depend:
	cp Makefile.in Makefile.in.bak \
	&& sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
	&& $(CC) -MM $(CPPFLAGS) $(CFLAGS) *.c |\
	   sed -e 's/^\(l2_.*\)\.o:/\1.lo:/' >> Makefile.new \
	&& cp Makefile.new Makefile.in
	&& rm -f Makefile.new

##
##  ____ DEPENDENCY AREA ____________________________________________
##  (AUTOMATICALLY UPDATED - DO NOT EDIT)
##

$(OBJS): Makefile

l2_ch_buffer.o: l2_ch_buffer.c l2.h l2_p.h
l2_ch_fd.o: l2_ch_fd.c l2.h l2_p.h
l2_ch_file.o: l2_ch_file.c l2.h l2_p.h
l2_ch_filter.o: l2_ch_filter.c l2.h l2_p.h
l2_ch_null.o: l2_ch_null.c l2.h l2_p.h
l2_ch_pipe.o: l2_ch_pipe.c l2.h l2_p.h
l2_ch_prefix.o: l2_ch_prefix.c l2.h l2_p.h
l2_ch_socket.o: l2_ch_socket.c l2.h l2_p.h
l2_ch_syslog.o: l2_ch_syslog.c l2.h l2_p.h
l2_channel.o: l2_channel.c l2.h l2_p.h
l2_stream.o: l2_stream.c l2.h l2_p.h
l2_test.o: l2_test.c l2.h
l2_version.o: l2_version.c l2_version.c
l2_ch_buffer.o: l2_ch_buffer.c l2.h l2_p.h
l2_ch_fd.o: l2_ch_fd.c l2.h l2_p.h
l2_ch_file.o: l2_ch_file.c l2.h l2_p.h
l2_ch_filter.o: l2_ch_filter.c l2.h l2_p.h
l2_ch_null.o: l2_ch_null.c l2.h l2_p.h
l2_ch_pipe.o: l2_ch_pipe.c l2.h l2_p.h
l2_ch_prefix.o: l2_ch_prefix.c l2.h l2_p.h
l2_ch_socket.o: l2_ch_socket.c l2.h l2_p.h
l2_ch_syslog.o: l2_ch_syslog.c l2.h l2_p.h
l2_channel.o: l2_channel.c l2.h l2_p.h
l2_epreuve.o: l2_epreuve.c l2.h l2_p.h
l2_stream.o: l2_stream.c l2.h l2_p.h
l2_test.o: l2_test.c l2.h
l2_ut_format.o: l2_ut_format.c l2.h l2_p.h
l2_ut_param.o: l2_ut_param.c l2.h l2_p.h
l2_version.o: l2_version.c l2_version.c
l2_ch_buffer.lo: l2_ch_buffer.c l2.h l2_p.h
l2_ch_fd.lo: l2_ch_fd.c l2.h l2_p.h
l2_ch_file.lo: l2_ch_file.c l2.h l2_p.h
l2_ch_filter.lo: l2_ch_filter.c l2.h l2_p.h
l2_ch_null.lo: l2_ch_null.c l2.h l2_p.h
l2_ch_pipe.lo: l2_ch_pipe.c l2.h l2_p.h
l2_ch_prefix.lo: l2_ch_prefix.c l2.h l2_p.h
l2_ch_socket.lo: l2_ch_socket.c l2.h l2_p.h
l2_ch_syslog.lo: l2_ch_syslog.c l2.h l2_p.h
l2_channel.lo: l2_channel.c l2.h l2_p.h
l2_epreuve.lo: l2_epreuve.c l2.h l2_p.h
l2_stream.lo: l2_stream.c l2.h l2_p.h
l2_test.lo: l2_test.c l2.h
l2_ut_format.lo: l2_ut_format.c l2.h l2_p.h
l2_ut_param.lo: l2_ut_param.c l2.h l2_p.h
l2_version.lo: l2_version.c l2_version.c
l2_ch_buffer.lo: l2_ch_buffer.c l2.h l2_p.h
l2_ch_fd.lo: l2_ch_fd.c l2.h l2_p.h
l2_ch_file.lo: l2_ch_file.c l2.h l2_p.h
l2_ch_filter.lo: l2_ch_filter.c l2.h l2_p.h
l2_ch_null.lo: l2_ch_null.c l2.h l2_p.h
l2_ch_pipe.lo: l2_ch_pipe.c l2.h l2_p.h
l2_ch_prefix.lo: l2_ch_prefix.c l2.h l2_p.h
l2_ch_socket.lo: l2_ch_socket.c l2.h l2_p.h
l2_ch_syslog.lo: l2_ch_syslog.c l2.h l2_p.h
l2_channel.lo: l2_channel.c l2.h l2_p.h
l2_epreuve.lo: l2_epreuve.c l2.h l2_p.h
l2_stream.lo: l2_stream.c l2.h l2_p.h
l2_test.lo: l2_test.c l2.h
l2_ut_format.lo: l2_ut_format.c l2.h l2_p.h
l2_ut_param.lo: l2_ut_param.c l2.h l2_p.h
l2_version.lo: l2_version.c l2_version.c
l2_ch_buffer.lo: l2_ch_buffer.c l2.h l2_p.h l2_ut_pcre.h
l2_ch_fd.lo: l2_ch_fd.c l2.h l2_p.h l2_ut_pcre.h
l2_ch_file.lo: l2_ch_file.c l2.h l2_p.h l2_ut_pcre.h
l2_ch_filter.lo: l2_ch_filter.c l2.h l2_p.h l2_ut_pcre.h
l2_ch_null.lo: l2_ch_null.c l2.h l2_p.h l2_ut_pcre.h
l2_ch_pipe.lo: l2_ch_pipe.c l2.h l2_p.h l2_ut_pcre.h
l2_ch_prefix.lo: l2_ch_prefix.c l2.h l2_p.h l2_ut_pcre.h
l2_ch_socket.lo: l2_ch_socket.c l2.h l2_p.h l2_ut_pcre.h
l2_ch_syslog.lo: l2_ch_syslog.c l2.h l2_p.h l2_ut_pcre.h
l2_channel.lo: l2_channel.c l2.h l2_p.h l2_ut_pcre.h
l2_epreuve.lo: l2_epreuve.c l2.h l2_p.h l2_ut_pcre.h
l2_stream.lo: l2_stream.c l2.h l2_p.h l2_ut_pcre.h
l2_test.lo: l2_test.c l2.h
l2_ut_format.lo: l2_ut_format.c l2.h l2_p.h l2_ut_pcre.h
l2_ut_param.lo: l2_ut_param.c l2.h l2_p.h l2_ut_pcre.h
l2_ut_pcre.lo: l2_ut_pcre.c l2_ut_pcre.h l2_ut_pcre_tab.c
l2_ut_pcre_tab.lo: l2_ut_pcre_tab.c
l2_version.lo: l2_version.c l2_version.c

CVSTrac 2.0.1