forked from mcieslik-mctp/hpseq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (40 loc) · 1.4 KB
/
Makefile
File metadata and controls
54 lines (40 loc) · 1.4 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
CC=gcc
CFLAGS=-g -Wall -Wextra -O3 -Wno-unused-function -std=c99 -pedantic -pthread
KLIB_PATH=klib
KLIB_INCL=-I$(KLIB_PATH)
GREP_PATH=grep
GREP_INCL=-I$(GREP_PATH) -I$(GREP_PATH)/lib -I$(GREP_PATH)/src
GREP_LINK=-L$(GREP_PATH)/lib
HTSLIB_PATH=htslib
HTSLIB_LINK=-L$(HTSLIB_PATH)
HTSLIB_INCL=-I$(HTSLIB_PATH)/htslib
all:hpcut hpmerge hpscan_ss hpscan_sw hpscan_cw
clean:
rm -fr gmon.out *.o ext/*.o a.out *~ *.a *.dSYM session*
rm hpcut hpmerge hpscan_ss hpscan_sw
hpcut:hpcut.c $(HTSLIB_PATH)
$(CC) $(CFLAGS) $(HTSLIB_INCL) hpcut.c -o $@ -lz -lm
hpmerge:hpmerge.c $(HTSLIB_PATH)
$(CC) $(CFLAGS) $(HTSLIB_INCL) hpmerge.c -o $@ -lz -lm
hpscan_ss:hpscan_ss.c
$(CC) $(CFLAGS) hpscan_ss.c -o $@ -lz -lm
hpscan_cw:hpscan_cw.c $(HTSLIB_PATH)
$(CC) $(CFLAGS) $(HTSLIB_INCL) $(GREP_INCL) $(GREP_LINK) -o $@ hpscan_cw.c grep/src/kwset.c -lgreputils -lz
hpscan_sw:hpscan_sw.c $(HTSLIB_PATH) $(KLIB_PATH)
$(CC) $(CFLAGS) $(HTSLIB_INCL) $(KLIB_INCL) $(KLIB_PATH)/ksw.c hpscan_sw.c -o $@ -lz -lm
deps: htslib klib grep
htslib:
git clone "https://github.com/samtools/htslib.git"
cd htslib && git submodule update --init --recursive && $(MAKE)
klib:
git clone "https://github.com/attractivechaos/klib.git"
grep:
wget "http://ftp.gnu.org/gnu/grep/grep-2.21.tar.xz"
tar xf grep-2.21.tar.xz
rm grep-2.21.tar.xz
mv grep-2.21 grep
cd grep && ./configure && $(MAKE)
clean-deps:
rm -rf htslib
rm -rf grep
rm -rf klib