1 |
|
2 |
srcdir=@srcdir@ |
3 |
VPATH=@srcdir@ |
4 |
top_srcdir=@apr_srcdir@ |
5 |
top_blddir=@apr_builddir@ |
6 |
|
7 |
# |
8 |
# APR (Apache Portable Runtime) library Makefile. |
9 |
# |
10 |
CPP = @CPP@ |
11 |
|
12 |
# get substituted into some targets |
13 |
APR_MAJOR_VERSION=@APR_MAJOR_VERSION@ |
14 |
|
15 |
# |
16 |
# Macros for supporting directories |
17 |
# |
18 |
INCDIR=./include |
19 |
OSDIR=$(top_srcdir)/include/arch/@OSDIR@ |
20 |
DEFOSDIR=$(INCDIR)/arch/@DEFAULT_OSDIR@ |
21 |
INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR) -I$(top_srcdir)/include/arch/@DEFAULT_OSDIR@ -I$(top_srcdir)/include -I$(top_srcdir)/include/private -I$(top_blddir)/include/private |
22 |
|
23 |
# |
24 |
# Macros for target determination |
25 |
# |
26 |
CLEAN_SUBDIRS= test |
27 |
INSTALL_SUBDIRS=@INSTALL_SUBDIRS@ |
28 |
|
29 |
TARGET_LIB = lib@APR_LIBNAME@.la |
30 |
APR_PCFILE = apr-$(APR_MAJOR_VERSION).pc |
31 |
APR_CONFIG = apr-$(APR_MAJOR_VERSION)-config |
32 |
INSTALL = @INSTALL@ |
33 |
INSTALL_DATA = @INSTALL_DATA@ |
34 |
|
35 |
# |
36 |
# Rules for building specific targets, starting with 'all' for |
37 |
# building the entire package. |
38 |
# |
39 |
TARGETS = $(TARGET_LIB) include/private/apr_escape_test_char.h apr.exp apr-config.out build/apr_rules.out |
40 |
|
41 |
LT_VERSION = @LT_VERSION@ |
42 |
|
43 |
# bring in rules.mk for standard functionality |
44 |
@INCLUDE_RULES@ |
45 |
@INCLUDE_OUTPUTS@ |
46 |
|
47 |
CLEAN_TARGETS = apr-config.out apr.exp exports.c export_vars.c .make.dirs \ |
48 |
build/apr_rules.out tools/gen_test_char@EXEEXT@ \ |
49 |
tools/gen_test_char.o tools/gen_test_char.lo \ |
50 |
include/private/apr_escape_test_char.h |
51 |
DISTCLEAN_TARGETS = config.cache config.log config.status \ |
52 |
include/apr.h include/arch/unix/apr_private.h \ |
53 |
libtool $(APR_CONFIG) build/apr_rules.mk apr.pc \ |
54 |
build/pkg/pkginfo |
55 |
EXTRACLEAN_TARGETS = configure aclocal.m4 include/arch/unix/apr_private.h.in \ |
56 |
build-outputs.mk build/ltcf-c.sh build/aclocal.m4 \ |
57 |
build/ltconfig build/ltmain.sh \ |
58 |
build/argz.m4 build/libtool.m4 build/ltoptions.m4 \ |
59 |
build/ltsugar.m4 build/ltversion.m4 build/lt~obsolete.m4 |
60 |
|
61 |
prefix=@prefix@ |
62 |
exec_prefix=@exec_prefix@ |
63 |
bindir=@bindir@ |
64 |
libdir=@libdir@ |
65 |
includedir=@includedir@ |
66 |
installbuilddir=@installbuilddir@ |
67 |
|
68 |
# Create apr-config script suitable for the install tree |
69 |
apr-config.out: $(APR_CONFIG) |
70 |
sed 's,^\(location=\).*$$,\1installed,' < $(APR_CONFIG) > $@ |
71 |
|
72 |
# Create apr_rules.mk suitable for the install tree |
73 |
build/apr_rules.out: build/apr_rules.mk |
74 |
sed -e 's,^\(apr_build.*=\).*$$,\1$(installbuilddir),' -e 's,^\(top_build.*=\).*$$,\1$(installbuilddir),' < build/apr_rules.mk > $@ |
75 |
|
76 |
install: $(TARGETS) |
77 |
$(APR_MKDIR) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(DESTDIR)$(installbuilddir) \ |
78 |
$(DESTDIR)$(libdir)/pkgconfig $(DESTDIR)$(includedir) |
79 |
$(INSTALL_DATA) $(top_blddir)/include/apr.h $(DESTDIR)$(includedir) |
80 |
for f in $(top_srcdir)/include/apr_*.h; do \ |
81 |
$(INSTALL_DATA) $${f} $(DESTDIR)$(includedir); \ |
82 |
done |
83 |
$(LIBTOOL) --mode=install $(INSTALL) -m 755 $(TARGET_LIB) $(DESTDIR)$(libdir) |
84 |
$(INSTALL_DATA) apr.exp $(DESTDIR)$(libdir)/apr.exp |
85 |
$(INSTALL_DATA) apr.pc $(DESTDIR)$(libdir)/pkgconfig/$(APR_PCFILE) |
86 |
for f in libtool shlibtool; do \ |
87 |
if test -f $${f}; then $(INSTALL) -m 755 $${f} $(DESTDIR)$(installbuilddir); fi; \ |
88 |
done |
89 |
$(INSTALL) -m 755 $(top_srcdir)/build/mkdir.sh $(DESTDIR)$(installbuilddir) |
90 |
for f in make_exports.awk make_var_export.awk; do \ |
91 |
$(INSTALL_DATA) $(top_srcdir)/build/$${f} $(DESTDIR)$(installbuilddir); \ |
92 |
done |
93 |
$(INSTALL_DATA) build/apr_rules.out $(DESTDIR)$(installbuilddir)/apr_rules.mk |
94 |
$(INSTALL) -m 755 apr-config.out $(DESTDIR)$(bindir)/$(APR_CONFIG) |
95 |
@if [ $(INSTALL_SUBDIRS) != "none" ]; then \ |
96 |
for i in $(INSTALL_SUBDIRS); do \ |
97 |
( cd $$i ; $(MAKE) DESTDIR=$(DESTDIR) install ); \ |
98 |
done \ |
99 |
fi |
100 |
|
101 |
$(TARGET_LIB): $(OBJECTS) |
102 |
$(LINK) @lib_target@ $(ALL_LIBS) |
103 |
|
104 |
encoding/apr_escape.lo: include/private/apr_escape_test_char.h |
105 |
|
106 |
exports.c: $(HEADERS) |
107 |
$(APR_MKEXPORT) $(HEADERS) > $@ |
108 |
|
109 |
export_vars.c: $(HEADERS) |
110 |
$(APR_MKVAREXPORT) $(HEADERS) > $@ |
111 |
|
112 |
apr.exp: exports.c export_vars.c |
113 |
@echo "#! lib@APR_LIBNAME@.so" > $@ |
114 |
@echo "* This file was AUTOGENERATED at build time." >> $@ |
115 |
@echo "* Please do not edit by hand." >> $@ |
116 |
$(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) exports.c | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/\1/' >> $@ |
117 |
$(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.c | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@ |
118 |
|
119 |
dox: |
120 |
doxygen $(top_srcdir)/docs/doxygen.conf |
121 |
|
122 |
gcov: |
123 |
@build/run-gcov.sh |
124 |
|
125 |
test: check |
126 |
check: $(TARGET_LIB) |
127 |
cd test && $(MAKE) all check |
128 |
|
129 |
etags: |
130 |
etags `find . -name '*.[ch]'` |
131 |
|
132 |
OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS) |
133 |
tools/gen_test_char.lo: tools/gen_test_char.c |
134 |
$(APR_MKDIR) tools |
135 |
$(LT_COMPILE) |
136 |
|
137 |
tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char) |
138 |
$(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) |
139 |
|
140 |
include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@ |
141 |
$(APR_MKDIR) include/private |
142 |
tools/gen_test_char@EXEEXT@ > $@ |
143 |
|
144 |
LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LT_LDFLAGS) \ |
145 |
@LT_NO_INSTALL@ $(ALL_LDFLAGS) -o $@ |
146 |
|
147 |
# DO NOT REMOVE |
148 |
docs: $(INCDIR)/*.h |