forked from aquaskyline/SOAPdenovo2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
76 lines (64 loc) · 2.1 KB
/
Makefile
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
65
66
67
68
69
70
71
72
73
74
75
76
CC = g++
ifdef debug
CFLAGS= -O0 -g -fomit-frame-pointer
else
CFLAGS= -O4 -fomit-frame-pointer
endif
SUBDIRS = sparsePregraph standardPregraph
PROG= SOAPdenovo-63mer SOAPdenovo-127mer
INCLUDES= -I./sparsePregraph/inc -I./standardPregraph/inc
LIBPATH= -L/lib64 -L/usr/lib64 -L./sparsePregraph/inc -L./standardPregraph/inc
LIBS= -pthread -lz -lm
EXTRA_FLAGS=
BIT_ERR = 0
ifeq (,$(findstring $(shell uname -m), x86_64 ppc64 ia64))
BIT_ERR = 1
endif
ifneq (,$(findstring Linux,$(shell uname)))
EXTRA_FLAGS += -Wl,--hash-style=both
LIBS += -lbam -lrt
endif
ifneq (,$(findstring Unix,$(shell uname)))
EXTRA_FLAGS += -Wl,--hash-style=both
LIBS += -lbam -lrt
endif
ifneq (,$(findstring Darwin,$(shell uname)))
LIBS += -lbammac
endif
ifneq (,$(findstring $(shell uname -m), x86_64))
CFLAGS += -m64
endif
ifneq (,$(findstring $(shell uname -m), ia64))
CFLAGS +=
endif
ifneq (,$(findstring $(shell uname -m), ppc64))
CFLAGS += -mpowerpc64
endif
all: SOAPdenovo-63mer SOAPdenovo-127mer
ifdef debug
SOAPdenovo-63mer:
@cd sparsePregraph;make 63mer=1 debug=1;cd ..;
@cd standardPregraph;make 63mer=1 debug=1;cd ..;
@$(CC) sparsePregraph/*.o standardPregraph/*.o $(LIBPATH) $(LIBS) $(EXTRA_FLAGS) -o SOAPdenovo-63mer
SOAPdenovo-127mer:
@cd sparsePregraph;make 127mer=1 debug=1;cd ..;
@cd standardPregraph;make 127mer=1 debug=1;cd ..;
@$(CC) sparsePregraph/*.o standardPregraph/*.o $(LIBPATH) $(LIBS) $(EXTRA_FLAGS) -o SOAPdenovo-127mer
clean:
@cd sparsePregraph;make clean;cd ..;
@cd standardPregraph;make clean;cd ..;
@rm SOAPdenovo-63mer SOAPdenovo-127mer -f
else
SOAPdenovo-63mer:
@cd sparsePregraph;make 63mer=1;cd ..;
@cd standardPregraph;make 63mer=1;cd ..;
@$(CC) sparsePregraph/*.o standardPregraph/*.o $(LIBPATH) $(LIBS) $(EXTRA_FLAGS) -o SOAPdenovo-63mer
SOAPdenovo-127mer:
@cd sparsePregraph;make 127mer=1;cd ..;
@cd standardPregraph;make 127mer=1;cd ..;
@$(CC) sparsePregraph/*.o standardPregraph/*.o $(LIBPATH) $(LIBS) $(EXTRA_FLAGS) -o SOAPdenovo-127mer
clean:
@cd sparsePregraph;make clean;cd ..;
@cd standardPregraph;make clean;cd ..;
@rm SOAPdenovo-63mer SOAPdenovo-127mer -f
endif