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