-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·64 lines (47 loc) · 1.73 KB
/
Makefile
File metadata and controls
executable file
·64 lines (47 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
CXXFLAGS=-g -std=c++11 -Wall -Werror
#CXXFLAGS=-O2 -std=c++11 -Wall -Werror
shared_flags=-fPIC -shared
includes=-I src -I src/seqio
src_seqio=$(shell ls src/seqio/*.cpp src/util.cpp)
inc_seqio=$(shell ls src/seqio/*.h src/seqio/*.hpp)
target_seqio=bld/lib/libseqio.so
src_pna=$(shell ls src/tools/pna/*.cpp src/util.cpp)
target_pna=bld/bin/pna
src_fasta=$(shell ls src/tools/fasta/*.cpp)
inc_fasta=src/tools/fasta/kseq.h
target_fasta=bld/bin/fasta
src_test=$(shell ls test/src/*.cpp)
inc_test=$(shell ls test/src/*.h test/src/*.hpp)
target_test=bld/bin/test
target_doc=bld/doc/api/html/index.html
public_inc=$(shell ls src/seqio/seqio.h)
.PHONY: all clean doc lib test fasta pna
all: lib fasta pna test
lib: $(target_seqio)
fasta: $(target_fasta)
pna: $(target_pna)
doc: $(target_doc)
test: $(target_test)
$(target_seqio): $(src_seqio) $(inc_seqio) Makefile
@mkdir -p $(@D)
$(CXX) $(CXXFLAGS) $(src_seqio) $(includes) $(shared_flags) -o $@ -lz -lrt
$(target_pna): $(src_pna) $(inc_seqio) $(target_seqio) Makefile
@mkdir -p $(@D)
$(CXX) $(CXXFLAGS) $(src_pna) $(includes) -o $@ -lseqio -L bld/lib -lrt -lboost_filesystem -lboost_system
$(target_fasta): $(src_fasta) $(inc_seqio) $(target_seqio) Makefile
@mkdir -p $(@D)
$(CXX) $(CXXFLAGS) $(src_fasta) $(includes) -o $@ -lseqio -L bld/lib -lz -lrt -lboost_filesystem -lboost_system
$(target_test): $(src_test) $(inc_seqio) $(target_seqio) Makefile
@mkdir -p $(@D)
$(CXX) $(CXXFLAGS) $(src_test) $(includes) -o $@ -lseqio -L bld/lib -lrt
install:
cp $(target_seqio) /usr/local/lib
cp $(target_pna) /usr/local/bin
cp $(target_fasta) /usr/local/bin
cp $(public_inc) /usr/local/include
ldconfig
clean:
rm -rf bld
$(target_doc): $(target_seqio)
mkdir -p bld/doc/api
doxygen doc/doxygen/c-api.config