blob: c78b0759a366785693a4335fafdaed8ba7f30fdc [file] [log] [blame]
#
# Top-level Makefile for APRUTIL
#
CPP = @CPP@
# gets substituted into some targets
APRUTIL_MAJOR_VERSION=@APRUTIL_MAJOR_VERSION@
APRUTIL_DOTTED_VERSION=@APRUTIL_DOTTED_VERSION@
srcdir = @srcdir@
VPATH = @srcdir@
INCLUDES = @APRUTIL_PRIV_INCLUDES@ @APR_INCLUDES@ @APRUTIL_INCLUDES@
APRUTIL_LDFLAGS = @APRUTIL_LDFLAGS@
APRUTIL_LIBS = @APRUTIL_LIBS@
TARGET_LIB = lib@APRUTIL_LIBNAME@.la
INSTALL_SUBDIRS = @APR_XML_DIR@
EXTRA_SOURCE_DIRS = @APR_XML_DIR@
EXTRA_OS_LINK=@EXTRA_OS_LINK@
APRUTIL_PCFILE = apr-util-$(APRUTIL_MAJOR_VERSION).pc
APU_CONFIG = apu-$(APRUTIL_MAJOR_VERSION)-config
TARGETS = $(TARGET_LIB) aprutil.exp
# bring in rules.mk for standard functionality
@INCLUDE_RULES@
@INCLUDE_OUTPUTS@
CLEAN_SUBDIRS = test
CLEAN_TARGETS = exports.c export_vars.c aprutil.exp .make.dirs apu-config.out
DISTCLEAN_TARGETS = config.cache config.log config.status libtool \
include/private/apu_config.h include/private/apu_private.h \
include/private/apu_select_dbm.h include/apr_ldap.h include/apu.h \
export_vars.sh apu-config build/rules.mk include/apu_want.h \
apr-util.pc
EXTRACLEAN_TARGETS = configure aclocal.m4 include/private/apu_config.h.in \
exports.c build-outputs.mk \
build/apr_common.m4 build/find_apr.m4 build/install.sh \
build/config.guess build/config.sub
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
includedir=@includedir@
top_srcdir=@abs_srcdir@
top_blddir=@abs_builddir@
# Create apu-config script suitable for the install tree
apu-config.out: apu-config
sed 's,^\(location=\).*$$,\1installed,' < apu-config > $@
install: $(TARGET_LIB) apu-config.out
if [ ! -d $(DESTDIR)$(includedir) ]; then \
$(APR_MKDIR) $(DESTDIR)$(includedir); \
fi;
cp -p $(top_srcdir)/include/*.h $(DESTDIR)$(includedir)
if [ -n "$(top_blddir)" ]; then \
cp -p $(top_blddir)/include/*.h $(DESTDIR)$(includedir); \
fi;
if [ ! -d $(DESTDIR)$(libdir) ]; then \
$(APR_MKDIR) $(DESTDIR)$(libdir); \
fi;
if [ ! -d $(DESTDIR)$(libdir)/pkgconfig ]; then \
$(APR_MKDIR) $(DESTDIR)$(libdir)/pkgconfig; \
fi;
cp -p apr-util.pc $(DESTDIR)$(libdir)/pkgconfig/$(APRUTIL_PCFILE)
list='$(INSTALL_SUBDIRS)'; for i in $$list; do \
( cd $$i ; $(MAKE) DESTDIR=$(DESTDIR) install ); \
done
$(LIBTOOL) --mode=install cp $(TARGET_LIB) $(DESTDIR)$(libdir)
$(LIBTOOL) --mode=install cp aprutil.exp $(DESTDIR)$(libdir)
if [ ! -d $(DESTDIR)$(bindir) ]; then \
$(APR_MKDIR) $(DESTDIR)$(bindir); \
fi;
$(LIBTOOL) --mode=install cp apu-config.out $(DESTDIR)$(bindir)/apu-config
$(LIBTOOL) --mode=install cp apu-config.out $(DESTDIR)$(bindir)/$(APU_CONFIG)
chmod 755 $(DESTDIR)$(bindir)/apu-config $(DESTDIR)$(bindir)/$(APU_CONFIG)
$(TARGET_LIB): $(OBJECTS)
$(LINK) @lib_target@ $(ALL_LIBS) $(EXTRA_OS_LINK)
exports.c: $(HEADERS)
$(APR_MKEXPORT) $(HEADERS) > $@
export_vars.c: $(HEADERS)
$(APR_MKVAREXPORT) $(HEADERS) > $@
aprutil.exp: exports.c export_vars.c
@echo "#! libaprutil.so" > $@
@echo "* This file was AUTOGENERATED at build time." >> $@
@echo "* Please do not edit by hand." >> $@
$(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@
$(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.c | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@
dox:
doxygen $(top_srcdir)/docs/doxygen.conf
check: $(TARGET_LIB)
(cd test && $(MAKE) check)