# # APR (Apache Portable Runtime) library Makefile. # SHELL=@SH@ # # Macros for compilation commands # @SET_MAKE@ MFLAGS_STATIC= RM=@RM@ CC=@CC@ 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 # # 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) $(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 depend: subdirs_depend distclean: subdirs_distclean -$(RM) -f include/apr.h include/apr_private.h include/apr_private.h.in -$(RM) -f *.o *.a *.so -$(RM) -f config.cache config.status config.log configure apr.exports -$(RM) -f Makefile -$(RM) -f APRVARS -$(RM) -rf objs cd test; $(MAKE) distclean; cd .. 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 exports: perl ./helpers/make_export.pl -o ./apr.exports include/*.h docs: ./helpers/scandoc -i./helpers/default.pl -p./docs/ ./include/*.h 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