update test/ folder for experimentations
[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
ef67d338
BA
9TESTS = test.EMGLLF test.EMGrank test.constructionModelesLassoMLE test.EMGrank\
10 test.constructionModelesLassoRank test.selectionTotale
7b272073 11
ef67d338 12all: $(LIB) $(TESTS)
7b272073
BA
13
14$(LIB): $(LIB_OBJ)
7ea8c1e5 15 $(CC) -shared -o $@ $^ $(LDFLAGS)
7b272073 16
ef67d338 17test.EMGLLF: $(LIB) test.EMGLLF.o test_utils.o
7ea8c1e5 18 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
7b272073 19
ef67d338 20test.EMGrank: $(LIB) test.EMGrank.o test_utils.o
7ea8c1e5 21 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
7b272073 22
ef67d338 23test.constructionModelesLassoMLE: $(LIB) test.constructionModelesLassoMLE.o test_utils.o
7ea8c1e5 24 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
7b272073 25
ef67d338 26test.constructionModelesLassoRank: $(LIB) test.constructionModelesLassoRank.o test_utils.o
7ea8c1e5 27 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
7b272073 28
ef67d338 29test.selectionTotale: $(LIB) test.selectionTotale.o test_utils.o
7ea8c1e5 30 $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS)
7b272073
BA
31
32%.o: %.c
afa07d41 33 $(CC) -fPIC -o $@ -c $< $(CFLAGS) $(INCLUDES)
7b272073
BA
34
35clean:
923a335e 36 rm -f *.o ../pkg/src/sources/*.o
7b272073
BA
37
38cclean: clean
825cf55f 39 rm -f *.so $(TESTS)
7b272073
BA
40
41.PHONY: all clean cclean