diff options
Diffstat (limited to 'egraph/tests/Makefile')
-rw-r--r-- | egraph/tests/Makefile | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/egraph/tests/Makefile b/egraph/tests/Makefile new file mode 100644 index 0000000..8b70170 --- /dev/null +++ b/egraph/tests/Makefile @@ -0,0 +1,32 @@ +CFLAGS += -Wall -g +CFLAGS += $(shell pkg-config --libs --cflags igraph) +CFLAGS += $(shell pkg-config --libs --cflags efx) +CFLAGS += -L../ -legraph -lecore_evas + +SOURCES = $(shell echo *.c) +OBJECTS = $(SOURCES:.c=.o) +TARGETS = $(SOURCES:.c=) + +all: $(TARGETS) + +run: $(TARGETS) + @count=0 ;\ + errors=0 ;\ + for test in $(TARGETS); do \ + echo =============================================================================== ;\ + echo $$test ;\ + LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:../ ./$$test ;\ + if [ $$? -eq 0 ]; then \ + echo OK ;\ + else \ + echo FAILED ;\ + errors=$$(($$errors + 1)) ;\ + fi ;\ + count=$$(($$count + 1)) ;\ + done ;\ + echo =============================================================================== ;\ + echo "$$count tests executed, $$errors errors" ;\ + exit $$errors + +clean: + rm -f $(TARGETS) $(OBJECTS) |