Merge branch 'master' of auder.net:valse
[valse.git] / test / Makefile
... / ...
CommitLineData
1CC = gcc
2CFLAGS = -g -std=gnu99 -Wno-implicit-function-declaration
3LDFLAGS = -lm -lgsl -lcblas -lgomp
4TEST_LDFLAGS = -L. libvalse_core.so
5LIB = libvalse_core.so
6LIB_SRC = $(wildcard ../sources/*.c)
7LIB_OBJ = $(LIB_SRC:.c=.o)
8INCLUDES = -I../sources
9TESTS = test.EMGLLF test.EMGrank test.constructionModelesLassoMLE test.EMGrank\
10 test.constructionModelesLassoRank test.selectionTotale
11
12all: $(LIB) $(TESTS)
13
14$(LIB): $(LIB_OBJ)
15 $(CC) -shared -o $@ $^ $(LDFLAGS)
16
17test.EMGLLF: $(LIB) test.EMGLLF.o test_utils.o
18 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
19
20test.EMGrank: $(LIB) test.EMGrank.o test_utils.o
21 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
22
23test.constructionModelesLassoMLE: $(LIB) test.constructionModelesLassoMLE.o test_utils.o
24 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
25
26test.constructionModelesLassoRank: $(LIB) test.constructionModelesLassoRank.o test_utils.o
27 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
28
29test.selectionTotale: $(LIB) test.selectionTotale.o test_utils.o
30 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
31
32%.o: %.c
33 $(CC) -fPIC -o $@ -c $< $(CFLAGS) $(INCLUDES)
34
35clean:
36 rm -f *.o ../sources/*.o ../adapters/*.o
37
38cclean: clean
39 rm -f *.so $(TESTS)
40
41.PHONY: all clean cclean