-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (31 loc) · 1.16 KB
/
Copy pathMakefile
File metadata and controls
45 lines (31 loc) · 1.16 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
# Makefile for MEI detector
# Compiler
CC=g++
C=gcc
# Compiler flags
BAMTOOLS_ROOT=/share/home/wardag/programs/bamChecker/bamtools
BAMTOOLS_LIB_DIR=$(BAMTOOLS_ROOT)/lib
CFLAGS=-O3 -Wl,-rpath,$(BAMTOOLS_LIB_DIR)
LIBS = -lz -lm -L./ -L$(BAMTOOLS_ROOT)/lib -lbamtools-utils
INCLUDE = -I$(BAMTOOLS_ROOT)/src -I$(BAMTOOLS_ROOT)/include
all: ../bin/dupdist
.PHONY: clean all
# builds bamtools static lib, and copies into root
$(BAMTOOLS_ROOT)/lib/libbamtools.a:
cd $(BAMTOOLS_ROOT) && mkdir -p build && cd build && cmake .. && $(MAKE)
OBJECTS=check.o \
zaTag.o \
$(BAMTOOLS_ROOT)/lib/libbamtools.a
# Objects
main.o: main.cpp $(BAMTOOLS_ROOT)/lib/libbamtools.a
$(CC) $(CFLAGS) $(INCLUDE) -c -lbamtools_utils main.cpp
check.o: check.cpp $(BAMTOOLS_ROOT)/lib/libbamtools.a
$(CC) $(CFLAGS) $(INCLUDE) -c -lbamtools_utils check.cpp
zaTag.o: zaTag.cpp $(BAMTOOLS_ROOT)/lib/libbamtools.a
$(CC) $(CFLAGS) $(INCLUDE) -c -lbamtools_utils zaTag.cpp
# Executables
bamChecker ../bin/dupdist: main.o $(OBJECTS) $(HEADERS)
$(CC) $(CFLAGS) $(INCLUDE) main.o $(OBJECTS) -o ../bin/bamChecker $(LIBS)
clean:
rm -rf *.o bamChecker ../bin/main
cd $(BAMTOOLS_ROOT)/build && make clean