include ../../Makefile.site

INC = ../../include
LIB = ../../lib

MODULE = $(shell basename `pwd`)

default: test_$(MODULE)

test_$(MODULE).o: test_$(MODULE).c librip$(MODULE).a $(OTHERDEPS)
	$(CC) -c $(CFLAGS) -DMODULE_TEST  test_$(MODULE).c $(INCDIRS)

test_$(MODULE):   test_$(MODULE).o
	$(CC) $(LFLAGS) -o test_$(MODULE) test_$(MODULE).o $(LIBS)

librip$(MODULE).a:
	cd ../../modules/$(MODULE); gmake; cd ../../tests/$(MODULE)

clean:
	${RM} *.o test_$(MODULE) core
