progress in debug: fix LLF/llh mismatch, and length + add adapter test in test/
[valse.git] / test / Makefile
CommitLineData
7b272073
BA
1CC = gcc
2CFLAGS = -g -std=gnu99 -Wno-implicit-function-declaration
3f3ed99c 3LDFLAGS = -lm -lgsl -lcblas
afa07d41
BA
4TEST_LDFLAGS = -L. libvalse_core.so
5LIB = libvalse_core.so
3f3ed99c 6LIB_SRC = $(wildcard ../pkg/src/sources/*.c)
7b272073 7LIB_OBJ = $(LIB_SRC:.c=.o)
3f3ed99c 8INCLUDES = -I../pkg/src/sources
d7e82077 9TESTS = test.EMGLLF test.EMGrank
7b272073 10
ef67d338 11all: $(LIB) $(TESTS)
7b272073
BA
12
13$(LIB): $(LIB_OBJ)
7ea8c1e5 14 $(CC) -shared -o $@ $^ $(LDFLAGS)
7b272073 15
ef67d338 16test.EMGLLF: $(LIB) test.EMGLLF.o test_utils.o
7ea8c1e5 17 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
7b272073 18
ef67d338 19test.EMGrank: $(LIB) test.EMGrank.o test_utils.o
7ea8c1e5 20 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
7b272073 21
7b272073 22%.o: %.c
afa07d41 23 $(CC) -fPIC -o $@ -c $< $(CFLAGS) $(INCLUDES)
7b272073
BA
24
25clean:
923a335e 26 rm -f *.o ../pkg/src/sources/*.o
7b272073
BA
27
28cclean: clean
825cf55f 29 rm -f *.so $(TESTS)
7b272073
BA
30
31.PHONY: all clean cclean