Commit | Line | Data |
---|---|---|
7b272073 BA |
1 | CC = gcc |
2 | CFLAGS = -g -std=gnu99 -Wno-implicit-function-declaration | |
7ea8c1e5 | 3 | LDFLAGS = -lm -lgsl -lcblas -lgomp |
afa07d41 BA |
4 | TEST_LDFLAGS = -L. libvalse_core.so |
5 | LIB = libvalse_core.so | |
7b272073 BA |
6 | LIB_SRC = $(wildcard ../sources/*.c) |
7 | LIB_OBJ = $(LIB_SRC:.c=.o) | |
7ea8c1e5 | 8 | INCLUDES = -I../sources |
ef67d338 BA |
9 | TESTS = test.EMGLLF test.EMGrank test.constructionModelesLassoMLE test.EMGrank\ |
10 | test.constructionModelesLassoRank test.selectionTotale | |
7b272073 | 11 | |
ef67d338 | 12 | all: $(LIB) $(TESTS) |
7b272073 BA |
13 | |
14 | $(LIB): $(LIB_OBJ) | |
7ea8c1e5 | 15 | $(CC) -shared -o $@ $^ $(LDFLAGS) |
7b272073 | 16 | |
ef67d338 | 17 | test.EMGLLF: $(LIB) test.EMGLLF.o test_utils.o |
7ea8c1e5 | 18 | $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS) |
7b272073 | 19 | |
ef67d338 | 20 | test.EMGrank: $(LIB) test.EMGrank.o test_utils.o |
7ea8c1e5 | 21 | $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS) |
7b272073 | 22 | |
ef67d338 | 23 | test.constructionModelesLassoMLE: $(LIB) test.constructionModelesLassoMLE.o test_utils.o |
7ea8c1e5 | 24 | $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS) |
7b272073 | 25 | |
ef67d338 | 26 | test.constructionModelesLassoRank: $(LIB) test.constructionModelesLassoRank.o test_utils.o |
7ea8c1e5 | 27 | $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS) |
7b272073 | 28 | |
ef67d338 | 29 | test.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 | |
35 | clean: | |
46a2e676 | 36 | rm -f *.o ../sources/*.o ../adapters/*.o |
7b272073 BA |
37 | |
38 | cclean: clean | |
ef67d338 | 39 | rm -f $(LIB) $(TESTS) |
7b272073 BA |
40 | |
41 | .PHONY: all clean cclean |