SRCS := \
	appmaster.c \
	appslave.c \
	arraytest.c \
	clockmaster.c \
	clockslave.c \
	coercetest.c \
	dispatchtest.c \
	infotest1.c \
	infotest2.c \
	longtest.c \
	o2client.c \
	o2server.c \
	oscanytest.c \
	oscbndlrecv.c \
	oscbndlsend.c \
	oscrecvtest.c \
	oscsendtest.c \
	statusclient.c \
	statusserver.c \
	taptest.c \
	tcpclient.c \
	tcpserver.c \
	typestest.c \
	$(empty)

#SRCS += bundletest.c

# these tests are standalone
# (and don't require any
TESTS := \
	arraytest \
	coercetest \
	dispatchtest \
	infotest1 \
	longtest \
	taptest \
	typestest \
	$(empty)


TEST_TARGETS = $(TESTS:%=%.test)


BINS := $(SRCS:.c=)

VPATH = ../../test/

.PHONY: all clean test

all: $(BINS)

clean:
	rm -f $(BINS)
	rm -f *.o

$(BINS): % : %.c
	$(CC) -o $@ $^ -lo2


test: $(TEST_TARGETS)

%.test: %
	./$^

debug:
	@echo SRC $(SRCS)
	@echo BIN $(BINS)
	@echo TST $(TEST_TARGETS)
