1 ####################################
3 # Use "make 127mer=1" to make 127mer version
4 # Use "make 63mer=1" to make 63mer version(default)
6 ###################################
9 GCCVERSIONMAJOR
:= $(shell expr
`$(CC) -dumpversion | cut -f1 -d.` \
>= 4)
10 GCCVERSIONMINOR
:= $(shell expr
`$(CC) -dumpversion | cut -f2 -d.` \
>= 4)
12 CFLAGS
= -O0
-g
-fomit-frame-pointer
#-static #-mcrc32 -march=core2 -msse4.1 -msse4.2
14 CFLAGS
= -O4
-fomit-frame-pointer
#-static #-mcrc32 -march=core2 -msse4.1 -msse4.2
17 OBJS
= arc.o attachPEinfo.o bubble.o
check.o compactEdge.o \
18 concatenateEdge.o connect.o contig.o cutTipPreGraph.o cutTip_graph.o \
19 darray.o dfib.o dfibHeap.o fib.o fibHeap.o \
20 hashFunction.o kmer.o lib.o loadGraph.o loadPath.o \
21 loadPreGraph.o localAsm.o main.o map.o mem_manager.o \
22 newhash.o node2edge.o orderContig.o output_contig.o output_pregraph.o \
23 output_scaffold.o pregraph.o prlHashCtg.o prlHashReads.o prlRead2Ctg.o \
24 prlRead2path.o prlReadFillGap.o read2scaf.o readInterval.o stack.o\
25 readseq1by1.o scaffold.o searchPath.o seq.o splitReps.o \
26 cutTip_graph2.o linearEdge.o kmerhash.o read2edge.o iterate.o
27 PROG
= SOAPdenovo-63mer
30 LIBPATH
= -L
/lib64
-L
/usr
/lib64
-L.
/inc
31 LIBS
= -pthread
-lz
-lm
35 ifeq (,$(findstring $(shell uname
-m
), x86_64 ppc64 ia64
))
41 PROG
= SOAPdenovo-127mer
44 PROG
= SOAPdenovo-63mer
47 ifneq (,$(findstring Linux
,$(shell uname
)))
48 EXTRA_FLAGS
+= -Wl
,--hash-style
=both
52 ifneq (,$(findstring Unix
,$(shell uname
)))
53 EXTRA_FLAGS
+= -Wl
,--hash-style
=both
57 ifneq (,$(findstring Darwin
,$(shell uname
)))
61 ifneq (,$(findstring $(shell uname
-m
), x86_64
))
65 ifneq (,$(findstring $(shell uname
-m
), ia64
))
69 ifneq (,$(findstring $(shell uname
-m
), ppc64
))
76 @printf
"Compiling $<... \r"; \
77 $(CC
) -c
$(CFLAGS
) $(DFLAGS
) $(INCLUDES
) $< || echo
"Error in command: $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $<"
83 .PHONY
:all clean install
86 @
test $(BIT_ERR
) != 1 || sh
-c
'echo "Fatal: 64bit CPU and Operating System required!";false;'
87 @
test $(GCCVERSIONMAJOR
) == 1 || sh
-c
'echo "GCC version lower than 4.4.0";false;'
88 @
test $(GCCVERSIONMINOR
) == 1 || sh
-c
'echo "GCC version lower than 4.4.0";false;'
90 SOAPdenovo
: envTest
$(OBJS
)
91 @printf
"Linking... \r"
92 @
$(CC
) $(CFLAGS
) -o
$(PROG
) $(OBJS
) $(LIBPATH
) $(LIBS
) $(ENTRAFLAGS
)
93 @printf
"$(PROG) compilation done.\n";
96 @
rm -fr gmon.out
*.o a.out
*.exe
*.dSYM
$(PROG
) *~
*.a
*.so.
* *.so
*.dylib
97 @printf
"$(PROG) cleaning done.\n";
101 @printf
"$(PROG) installed at ../bin/$(PROG)\n"