test almost working
[valse.git] / src / test / Makefile
1 CC = gcc
2 CFLAGS = -g -std=gnu99 -Wno-implicit-function-declaration
3 LDFLAGS = -lm -lgsl -lcblas -lgomp
4 LDFLAGS_TEST = -Lobj/ -lvalse_core
5 LIB = valse_core.so
6 LIB_SRC = $(wildcard ../sources/*.c)
7 LIB_OBJ = $(LIB_SRC:.c=.o)
8 INCLUDES = -I../sources
9
10 all: $(LIB) test.EMGLLF test.EMGrank test.constructionModelesLassoMLE test.EMGrank test.constructionModelesLassoRank test.selectionTotale
11
12 $(LIB): $(LIB_OBJ)
13 $(CC) -shared -o $@ $^ $(LDFLAGS)
14
15 test.EMGLLF: test.EMGLLF.o
16 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
17
18 test.constructionModelesLassoMLE: test.constructionModelesLassoMLE.o
19 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
20
21 test.EMGrank: test.EMGrank.o
22 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
23
24 test.constructionModelesLassoRank: test.constructionModelesLassoRank.o
25 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
26
27 test.selectionTotale: test.selectionTotale.o
28 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
29
30 %.o: %.c
31 $(CC) -o $@ -c $< $(CFLAGS) $(INCLUDES)
32
33 clean:
34 rm -f *.o ../sources/*.o
35
36 cclean: clean
37 rm -f $(LIB) $(TEST)
38
39 .PHONY: all clean cclean