export APXS=apxs
export APR_CONFIG=apr-config
export CC=gcc
export CFLAGS=-g -Werror -Wall -Wimplicit-function-declaration
export CPPFLAGS=`$(APR_CONFIG) --cppflags --includes`
export LDSHARED=gcc -shared
export LDFLAGS=-g `$(APR_CONFIG) --ldflags`
export LIBS=-ldb-4.2 `$(APR_CONFIG) --link-ld --libs`
export RM=rm
export MKDIR=mkdir
export BUILD_APACHE2=1

TARGETS=libbtt/libbtt.so

#if BUILD_APACHE2
TARGETS+=apache2/mod_bt.so
#endif

all: $(TARGETS)
	make -C tests
	make -C tools

libbtt/libbtt.so::
	make -C libbtt

apache2/mod_bt.so::
	make -C apache2
	
clean:
	make -C libbtt clean
	make -C tests clean
	make -C tools clean
#if BUILD_APACHE2
	make -C apache2 clean
#endif

install:
#if BUILD_APACHE2
	make -C apache2 install
#endif
	true

