blob: d7b1be31051bc130def4ad109ddba19fbbb7ef7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
#
# APR (Apache Portable Runtime) library Makefile.
#
SHELL=@SH@
#
# Macros for compilation commands
#
@SET_MAKE@
MFLAGS_STATIC=
RM=@RM@
CC=@CC@
AWK=@AWK@
CFLAGS=@CFLAGS@ @OPTIM@
LIBS=@LIBS@
LDFLAGS=@LDFLAGS@ $(LIBS)
AR=@AR@
RANLIB=@RANLIB@
#
# Macros for supporting directories
#
INCDIR=./include
INCDIR1=../include
INCLUDES=-I$(INCDIR) -I$(INCDIR1)
#
# Macros for target determination
#
MODULES=@MODULES@
SUBDIRS=@SUBDIRS@
#shmem/@OSDIR@
LIBAPR = @LIBPREFIX@apr.a
TARGET_EXPORTS = apr.exports
#
# Rules for turning inputs into outputs
#
.c.o:
$(CC) $(CFLAGS) -c $(INCLUDES) $<
#
# Rules for building specific targets, starting with 'all' for
# building the entire package.
#
all: Makefile $(LIBAPR) delete-exports $(TARGET_EXPORTS)
$(LIBAPR): $(MODULES) subdirs
@rm -rf objs
@mkdir objs
@rm -f $@
for i in $(SUBDIRS); do cp $$i/*.o objs ; done;
$(AR) cr $@ objs/*.o
$(RANLIB) $@
clean: subdirs_clean
$(RM) -f *.o *.a *.so objs/*.o apr.exports
depend: subdirs_depend
distclean: subdirs_distclean
-$(RM) -f include/apr.h include/arch/unix/apr_private.h
-$(RM) -f *.o *.a *.so
-$(RM) -f config.cache config.status config.log
-$(RM) -f Makefile
-$(RM) -f APRVARS
-$(RM) -rf objs
cd test; $(MAKE) distclean; cd ..
extraclean: distclean
-$(RM) -f configure include/arch/unix/apr_private.h.in
subdirs:
@for i in $(SUBDIRS); do \
echo "===> $(SDP)lib/apr/$$i"; \
( cd $$i && $(MAKE) $(MFLAGS_STATIC) SDP='$(SDP)' \
CC='$(CC)' AUX_CFLAGS='$(AUX_CFLAGS)' RANLIB='$(RANLIB)' ) \
|| exit 1; \
echo "<=== $(SDP)lib/apr/$$i"; \
done;
subdirs_depend:
@for i in $(SUBDIRS); do \
echo "===> $(SDP)lib/apr/$$i"; \
( cd $$i && $(MAKE) $(MFLAGS_STATIC) SDP='$(SDP)' depend ) \
|| exit 1; \
echo "<=== $(SDP)lib/apr/$$i"; \
done;
subdirs_clean:
@for i in $(SUBDIRS); do \
echo "===> $(SDP)lib/apr/$$i"; \
( cd $$i && $(MAKE) $(MFLAGS_STATIC) SDP='$(SDP)' clean ) \
|| exit 1; \
echo "<=== $(SDP)lib/apr/$$i"; \
done;
subdirs_distclean:
@for i in $(SUBDIRS); do \
echo "===> $(SDP)lib/apr/$$i"; \
( cd $$i && $(MAKE) $(MFLAGS_STATIC) SDP='$(SDP)' distclean ) \
|| exit 1; \
echo "<=== $(SDP)lib/apr/$$i"; \
done;
install: all
delete-exports:
@if test -f $(TARGET_EXPORTS); then \
headers="`find include/*.h -newer $(TARGET_EXPORTS)`" ; \
if test -n "$$headers"; then \
echo Found newer headers. Will rebuild $(TARGET_EXPORTS). ; \
echo $(RM) -f $(TARGET_EXPORTS) ; \
$(RM) -f $(TARGET_EXPORTS) ; \
fi \
fi
$(TARGET_EXPORTS):
if test -z "$(srcdir)"; then \
$(AWK) -f helpers/make_export.awk include/*.h > $@ ; \
else \
$(AWK) -f $(srcdir)helpers/make_export.awk $(srcdir)include/*.h > $@ ; \
fi
docs:
if test -z "$(srcdir)"; then \
helpers/scandoc -ihelpers/default.pl -p./docs/ ./include/*.h; \
else \
$(srcdir)helpers/scandoc -i$(srcdir)helpers/default.pl -p./docs/ $(srcdir)include/*.h; \
fi
test: $(LIBAPR)
(cd test; make clean; make; \
cd test; \
for prog in `find . -type f -perm +u+x -name "test*" -print`; do \
./$$prog; \
if [ $$? -eq 255 ]; then \
echo "$$prog failed"; \
break; \
fi \
done )
# DO NOT REMOVE
docs: $(INCDIR)/*.h
|