Makefile 1.17 KB
Newer Older
Mikaël Salson's avatar
Mikaël Salson committed
1
CC=g++
2
OPTIM=-O2 -DNDEBUG  $(COVERAGE)
3
CXXFLAGS=-W -Wall $(OPTIM) $(DEBUG) $(CONFIG)
Mikaël Salson's avatar
Mikaël Salson committed
4
LDFLAGS=-lm
5
EXEC=vidjil
Mikaël Salson's avatar
Mikaël Salson committed
6
MAINCORE=$(wildcard *.cpp)
7
LIBCORE=core/vidjil.a
Mikaël Salson's avatar
Mikaël Salson committed
8 9

BINDIR=..
10
CGIDIR=../browser/cgi
Mikaël Salson's avatar
Mikaël Salson committed
11

12
CREATE_VERSION_GIT_H := $(shell test -x ./create-git-version-h.sh && ./create-git-version-h.sh)
13

14 15
.PHONY: all core clean forcedep

16
v: vidjil align.cgi
Mikaël Salson's avatar
Mikaël Salson committed
17

18 19 20 21 22 23 24 25 26 27 28 29
###

kmers: cleankmers
	make CONFIG="-DDEBUG_KMERS"

nokmers: cleankmers
	make

cleankmers:
	rm -f vidjil.o core/windowExtractor.o core/segment.o

###
Mathieu Giraud's avatar
Mathieu Giraud committed
30 31 32 33 34

spaced: cleanspaced
	make

nospaced: cleanspaced
Mikaël Salson's avatar
Mikaël Salson committed
35
	make CONFIG="-DNO_SPACED_SEEDS"
Mathieu Giraud's avatar
Mathieu Giraud committed
36 37

cleanspaced:
Mikaël Salson's avatar
Mikaël Salson committed
38
	rm -f vidjil.o core/tools.o
Mathieu Giraud's avatar
Mathieu Giraud committed
39

40
###
Mathieu Giraud's avatar
Mathieu Giraud committed
41

Mathieu Giraud's avatar
Mathieu Giraud committed
42
align.cgi: cgi/align.o
43 44 45 46
	make -C core OPTIM="$(OPTIM)"
	$(CC) -o $(CGIDIR)/align.cgi cgi/align.o $(LIBCORE) $(LDFLAGS) $(CXXFLAGS)
###

Mikaël Salson's avatar
Mikaël Salson committed
47 48 49 50 51 52
all: $(EXEC)

debug:
	make clean
	make DEBUG="-ggdb"

53
$(EXEC): %: %.o 
Mikaël Salson's avatar
Mikaël Salson committed
54
	make -C core OPTIM="$(OPTIM)"
55
	$(CC) -o $(BINDIR)/$@ $^ $(LIBCORE) $(LDFLAGS) $(CXXFLAGS)
Mikaël Salson's avatar
Mikaël Salson committed
56 57

clean:
58
	make -C core $@
Mathieu Giraud's avatar
Mathieu Giraud committed
59
	rm -f *.o *.gcda *.gcno *.gcov cgi/*.o
Mikaël Salson's avatar
Mikaël Salson committed
60 61 62 63
	cd $(BINDIR) ; rm -f $(EXEC)
	make -C tests $@

forcedep:
64
	g++ -M $(MAINCORE) > dep.mk
65
	make -C core forcedep
Mikaël Salson's avatar
Mikaël Salson committed
66 67 68 69

DEP=$(wildcard dep.mk)

ifeq (${DEP},)
70
$(shell	g++ -M $(MAINCORE) > dep.mk)
Mikaël Salson's avatar
Mikaël Salson committed
71 72 73
endif
include dep.mk