1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements. See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
19 # rules.mk: standard rules for APR
25 # Configuration variables
27 apr_builddir=/bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr
28 apr_builders=/bottlenecks/rubbos/app/httpd-2.0.64/srclib/apr/build
30 # Some layouts require knowing what version we are at.
32 APR_DOTTED_VERSION=0.9.19
38 LIBTOOL=$(SHELL) $(apr_builddir)/libtool
40 # compilation and linking flags that are supposed to be set only by the user.
41 # configure adds to them for tests, but we restore them at the end.
49 # anything added to the standard flags by configure is moved to EXTRA_*
50 # at the end of the process.
52 EXTRA_CFLAGS=-g -O2 -pthread
53 EXTRA_CPPFLAGS=-D_REENTRANT -D_GNU_SOURCE
55 EXTRA_LIBS=-lrt -lm -lcrypt -lnsl -lpthread -ldl
58 # NOTEST_* are flags and libraries that can be added by the user without
59 # causing them to be used in configure tests (necessary for things like
60 # -Werror and other strict warnings that maintainers like to use).
67 # Finally, combine all of the flags together in the proper order so that
68 # the user-defined flags can always override the configure ones, if needed.
69 # Note that includes are listed after the flags because -I options have
70 # left-to-right precedence and CPPFLAGS may include user-defined overrides.
72 ALL_CFLAGS = $(EXTRA_CFLAGS) $(NOTEST_CFLAGS) $(CFLAGS)
73 ALL_CPPFLAGS = $(DEFS) $(EXTRA_CPPFLAGS) $(NOTEST_CPPFLAGS) $(CPPFLAGS)
74 ALL_LDFLAGS = $(EXTRA_LDFLAGS) $(NOTEST_LDFLAGS) $(LDFLAGS)
75 ALL_LIBS = $(LIBS) $(NOTEST_LIBS) $(EXTRA_LIBS)
76 ALL_INCLUDES = $(INCLUDES) $(EXTRA_INCLUDES)
84 COMPILE = $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(ALL_INCLUDES)
85 LT_COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -c $< && touch $@
87 LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) -version-info 9:19:9 $(ALL_LDFLAGS) -o $@
89 APR_MKDIR = $(apr_builders)/mkdir.sh
90 APR_MKEXPORT = $(AWK) -f $(apr_builders)/make_exports.awk
91 APR_MKVAREXPORT = $(AWK) -f $(apr_builders)/make_var_export.awk
95 # Standard build rules
98 depend: depend-recursive
99 clean: clean-recursive
100 distclean: distclean-recursive
101 extraclean: extraclean-recursive
103 install: all-recursive
106 all-recursive depend-recursive:
107 @otarget=`echo $@ | sed s/-recursive//`; \
109 for i in $$list; do \
110 if test -d "$$i"; then \
111 target="$$otarget"; \
112 echo "Making $$target in $$i"; \
113 if test "$$i" = "."; then \
115 target="local-$$target"; \
117 (cd $$i && $(MAKE) $$target) || exit 1; \
120 if test "$$otarget" = "all" && test -z "$(TARGETS)"; then \
123 if test "$$made_local" != "yes"; then \
124 $(MAKE) "local-$$otarget" || exit 1; \
127 clean-recursive distclean-recursive extraclean-recursive:
128 @otarget=`echo $@ | sed s/-recursive//`; \
129 list='$(SUBDIRS) $(CLEAN_SUBDIRS)'; \
130 for i in $$list; do \
131 if test -d "$$i"; then \
132 target="$$otarget"; \
133 echo "Making $$target in $$i"; \
134 if test "$$i" = "."; then \
136 target="local-$$target"; \
138 (cd $$i && $(MAKE) $$target); \
141 if test "$$otarget" = "all" && test -z "$(TARGETS)"; then \
144 if test "$$made_local" != "yes"; then \
145 $(MAKE) "local-$$otarget"; \
148 # autoconf 2.5x is creating a 'autom4te.cache' directory
149 # In case someone ran autoconf by hand, get rid of that directory
151 local-clean: x-local-clean
152 $(RM) -f *.o *.lo *.a *.la *.so *.obj $(CLEAN_TARGETS) $(PROGRAMS)
153 $(RM) -rf .libs autom4te.cache
155 local-distclean: local-clean x-local-distclean
156 $(RM) -f Makefile $(DISTCLEAN_TARGETS)
158 local-extraclean: local-distclean x-local-extraclean
159 @if test -n "$(EXTRACLEAN_TARGETS)"; then \
160 echo $(RM) -f $(EXTRACLEAN_TARGETS) ; \
161 $(RM) -f $(EXTRACLEAN_TARGETS) ; \
164 local-all: $(TARGETS)
166 local-depend: x-local-depend
167 @if test -n "`ls $(srcdir)/*.c 2> /dev/null`"; then \
169 list='$(srcdir)/*.c'; \
170 for i in $$list; do \
171 $(MKDEP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) $$i | sed 's/\.o:/.lo:/' >> .deps; \
175 # to be filled in by the actual Makefile
176 x-local-depend x-local-clean x-local-distclean x-local-extraclean:
179 # Implicit rules for creating outputs from input files
190 .PHONY: all all-recursive local-all install \
191 depend depend-recursive local-depend x-local-depend \
192 clean clean-recursive local-clean x-local-clean \
193 distclean distclean-recursive local-distclean x-local-distclean \
194 extraclean extraclean-recursive local-extraclean x-local-extraclean