srcdir = /home/minfrin/src/apache/sandbox/proxy/releases/tmp/httpd-2.0.43/srclib/apr/test
VPATH = /home/minfrin/src/apache/sandbox/proxy/releases/tmp/httpd-2.0.43/srclib/apr/test

NONPORTABLE = \
	testshm \
	testprocmutex \
	testglobalmutex \
	testregex

PROGRAMS = \
	client \
	sendfile \
	server \
	testfile \
	testdir \
	testnames \
	testflock \
	testfmt \
	testproc \
	testsock \
	testthread \
	testlock \
	testlockperf \
	testtime \
	testargs \
	testud \
	testmmap \
	testshmproducer \
	testshmconsumer \
	testpipe \
	testoc \
	testsockopt \
	testipsub \
	testpoll \
	testhash \
	occhild \
	teststr \
	testuser \
	testsockets \
	testvsn \
	testsleep \
	testrand \
	testdup \
	testatomic \
	testpools \
	testmutexscope \
	testtable \
	testall


TARGETS = $(PROGRAMS) $(NONPORTABLE)

# bring in rules.mk for standard functionality
include /home/minfrin/src/apache/sandbox/proxy/releases/tmp/httpd-2.0.43/srclib/apr/build/rules.mk

LOCAL_LIBS=../libapr.la

CLEAN_TARGETS = testfile.tmp testdso mod_test.slo

INCDIR=../include
INCLUDES=-I$(INCDIR)

CFLAGS=$(MY_CFLAGS)

all: $(PROGRAMS) $(NONPORTABLE)

check: $(PROGRAMS) $(NONPORTABLE)
	for prog in $(PROGRAMS) $(NONPORTABLE); do \
		./$$prog; \
		if test $$i = 255; then \
			echo "$$prog failed"; \
			break; \
		fi \
	done

testfile: testfile.lo $(LOCAL_LIBS)
	$(LINK) testfile.lo $(LOCAL_LIBS) $(ALL_LIBS)

testdir: testdir.lo $(LOCAL_LIBS)
	$(LINK) testdir.lo $(LOCAL_LIBS) $(ALL_LIBS)

testnames: testnames.lo $(LOCAL_LIBS)
	$(LINK) testnames.lo $(LOCAL_LIBS) $(ALL_LIBS)

testflock: testflock.lo $(LOCAL_LIBS)
	$(LINK) testflock.lo $(LOCAL_LIBS) $(ALL_LIBS)

testfmt: testfmt.lo $(LOCAL_LIBS)
	$(LINK) testfmt.lo $(LOCAL_LIBS) $(ALL_LIBS)

testdso: testdso.lo mod_test.la libmod_test.la $(LOCAL_LIBS)
	$(LINK) testdso.lo $(LOCAL_LIBS) $(ALL_LIBS)

testoc: testoc.lo occhild $(LOCAL_LIBS)
	$(LINK) testoc.lo $(LOCAL_LIBS) $(ALL_LIBS)

occhild: occhild.lo $(LOCAL_LIBS)
	$(LINK) occhild.lo $(LOCAL_LIBS) $(ALL_LIBS)

# FIXME: -prefer-pic is only supported with libtool-1.4+
mod_test.slo: mod_test.c
	$(LIBTOOL) --mode=compile $(COMPILE) -prefer-pic -c $< && touch $@

mod_test.la: mod_test.slo $(LOCAL_LIBS)
	$(LINK) --mode=link $(COMPILE) -rpath $(shell pwd) -avoid-version -module mod_test.lo $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@

libmod_test.la: mod_test.slo $(LOCAL_LIBS)
	$(LINK) --mode=link $(COMPILE) -rpath $(shell pwd) -avoid-version mod_test.lo $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@

testargs: testargs.lo $(LOCAL_LIBS)
	$(LINK) testargs.lo $(LOCAL_LIBS) $(ALL_LIBS)

testud: testud.lo $(LOCAL_LIBS)
	$(LINK) testud.lo $(LOCAL_LIBS) $(ALL_LIBS)

testproc: testproc.lo $(LOCAL_LIBS)
	$(LINK) testproc.lo $(LOCAL_LIBS) $(ALL_LIBS)

testthread: testthread.lo $(LOCAL_LIBS)
	$(LINK) testthread.lo $(LOCAL_LIBS) $(ALL_LIBS)

testlock: testlock.lo $(LOCAL_LIBS)
	$(LINK) testlock.lo $(LOCAL_LIBS) $(ALL_LIBS)

testlockperf: testlockperf.lo $(LOCAL_LIBS)
	$(LINK) testlockperf.lo $(LOCAL_LIBS) $(ALL_LIBS)

testsock: testsock.lo client server sendfile $(LOCAL_LIBS)
	$(LINK) testsock.lo $(LOCAL_LIBS) $(ALL_LIBS)

client: client.lo $(LOCAL_LIBS)
	$(LINK) client.lo $(LOCAL_LIBS) $(ALL_LIBS)

server: server.lo $(LOCAL_LIBS)
	$(LINK) server.lo $(LOCAL_LIBS) $(ALL_LIBS)

sendfile: sendfile.lo $(LOCAL_LIBS)
	$(LINK) sendfile.lo $(LOCAL_LIBS) $(ALL_LIBS)

testtime: testtime.lo CuTest.lo testapr.lo $(LOCAL_LIBS)
	$(LINK) testtime.lo CuTest.lo testapr.lo $(LOCAL_LIBS) $(ALL_LIBS)

testmmap: testmmap.lo $(LOCAL_LIBS)
	$(LINK) testmmap.lo $(LOCAL_LIBS) $(ALL_LIBS)

testshm: testshm.lo $(LOCAL_LIBS) testshmproducer testshmconsumer
	$(LINK) testshm.lo $(LOCAL_LIBS) $(ALL_LIBS)

testshmproducer: testshmproducer.lo $(LOCAL_LIBS)
	$(LINK) testshmproducer.lo $(LOCAL_LIBS) $(ALL_LIBS)

testshmconsumer: testshmconsumer.lo $(LOCAL_LIBS)
	$(LINK) testshmconsumer.lo $(LOCAL_LIBS) $(ALL_LIBS)

testpipe: testpipe.lo $(LOCAL_LIBS)
	$(LINK) testpipe.lo $(LOCAL_LIBS) $(ALL_LIBS)

testsockopt: testsockopt.lo $(LOCAL_LIBS)
	$(LINK) testsockopt.lo $(LOCAL_LIBS) $(ALL_LIBS)

testipsub: testipsub.lo $(LOCAL_LIBS)
	$(LINK) testipsub.lo $(LOCAL_LIBS) $(ALL_LIBS)

testpoll: testpoll.lo $(LOCAL_LIBS)
	$(LINK) testpoll.lo $(LOCAL_LIBS) $(ALL_LIBS)

testhash: testhash.lo $(LOCAL_LIBS)
	$(LINK) testhash.lo $(LOCAL_LIBS) $(ALL_LIBS)

teststr: teststr.lo CuTest.lo testapr.lo $(LOCAL_LIBS)
	$(LINK) teststr.lo CuTest.lo testapr.lo $(LOCAL_LIBS) $(ALL_LIBS)

testsockets: testsockets.lo $(LOCAL_LIBS)
	$(LINK) testsockets.lo $(LOCAL_LIBS) $(ALL_LIBS)

testuser: testuser.lo $(LOCAL_LIBS)
	$(LINK) testuser.lo $(LOCAL_LIBS) $(ALL_LIBS)

testprocmutex: testprocmutex.lo $(LOCAL_LIBS)
	$(LINK) testprocmutex.lo $(LOCAL_LIBS) $(ALL_LIBS)

testglobalmutex: testglobalmutex.lo $(LOCAL_LIBS)
	$(LINK) testglobalmutex.lo $(LOCAL_LIBS) $(ALL_LIBS)

testvsn: testvsn.lo $(LOCAL_LIBS)
	$(LINK) testvsn.lo $(LOCAL_LIBS) $(ALL_LIBS)

testsleep: testsleep.lo $(LOCAL_LIBS)
	$(LINK) testsleep.lo $(LOCAL_LIBS) $(ALL_LIBS)

testatomic: testatomic.lo $(LOCAL_LIBS)
	$(LINK) testatomic.lo $(LOCAL_LIBS) $(ALL_LIBS)

testregex: testregex.lo $(LOCAL_LIBS)
	$(LINK) testregex.lo $(LOCAL_LIBS) $(ALL_LIBS)

testdup: testdup.lo $(LOCAL_LIBS)
	$(LINK) testdup.lo $(LOCAL_LIBS) $(ALL_LIBS)

testrand: testrand.lo $(LOCAL_LIBS)
	$(LINK) testrand.lo $(LOCAL_LIBS) $(ALL_LIBS)

testpools: testpools.lo $(LOCAL_LIBS)
	$(LINK) testpools.lo $(LOCAL_LIBS) $(ALL_LIBS)

testmutexscope: testmutexscope.lo $(LOCAL_LIBS)
	$(LINK) testmutexscope.lo $(LOCAL_LIBS) $(ALL_LIBS)

testtable: testtable.lo $(LOCAL_LIBS)
	$(LINK) testtable.lo $(LOCAL_LIBS) $(ALL_LIBS)

testall: testall.lo testtime.lo teststr.lo CuTest.lo $(LOCAL_LIBS)
	$(LINK) testall.lo testtime.lo teststr.lo CuTest.lo $(LOCAL_LIBS) $(ALL_LIBS)


# DO NOT REMOVE
