Commit | Line | Data |
---|---|---|
3453829e BA |
1 | CC = gcc |
2 | CFLAGS = -g -std=gnu99 -Wno-implicit-function-declaration | |
3 | LDFLAGS = -lm -lgsl -lcblas | |
4 | TEST_LDFLAGS = -L. libvalse_core.so | |
5 | LIB = libvalse_core.so | |
bb64f5cb | 6 | LIB_SRC = ../pkg/src/EMGLLF.c ../pkg/src/EMGrank.c |
3453829e | 7 | LIB_OBJ = $(LIB_SRC:.c=.o) |
bb64f5cb | 8 | INCLUDES = -I../pkg/src |
3453829e BA |
9 | TESTS = test.EMGLLF test.EMGrank |
10 | ||
11 | all: $(LIB) $(TESTS) | |
12 | ||
13 | $(LIB): $(LIB_OBJ) | |
14 | $(CC) -shared -o $@ $^ $(LDFLAGS) | |
15 | ||
16 | test.EMGLLF: $(LIB) test.EMGLLF.o test_utils.o | |
17 | $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS) | |
18 | ||
19 | test.EMGrank: $(LIB) test.EMGrank.o test_utils.o | |
20 | $(CC) -o $@ $^ $(LDFLAGS) $(TEST_LDFLAGS) | |
21 | ||
22 | %.o: %.c | |
23 | $(CC) -fPIC -o $@ -c $< $(CFLAGS) $(INCLUDES) | |
24 | ||
25 | clean: | |
bb64f5cb | 26 | rm -f *.o ../pkg/src/*.o |
3453829e BA |
27 | |
28 | cclean: clean | |
29 | rm -f *.so ../pkg/src/*.so $(TESTS) | |
30 | ||
31 | .PHONY: all clean cclean |