modified: src1/worker.c
[GalaxyCodeBases.git] / BGI / SOAPdenovo2 / sparsePregraph / Makefile
blob9c88a753ebfbef0c6d66825a2d32e0dd64284293
1 CC= g++ # /opt/blc/gcc-4.5.0/bin/gcc #gcc
2 ifdef debug
3 CFLAGS= -O0 -g -fomit-frame-pointer #-static #-mcrc32 -march=core2 -msse4.1 -msse4.2
4 else
5 CFLAGS= -O4 -fomit-frame-pointer #-static #-mcrc32 -march=core2 -msse4.1 -msse4.2
6 endif
8 DFLAGS=
9 OBJS= build_graph.o build_edge.o multi_threads.o \
10 build_preArc.o pregraph_sparse.o io_func.o\
11 global.o convert_soapdenovo.o
12 PROG=
13 INCLUDES= -I./inc
14 SUBDIRS= .
15 LIBPATH= -L/usr/lib64
16 LIBS= -pthread -lz -L./inc
17 EXTRA_FLAGS=
18 VERSION = 1.0.3
20 ifdef 127mer
21 CFLAGS += -D_127MER_
22 PROG = pregraph_sparse_127mer.v$(VERSION)
24 else
25 CFLAGS += -D_63MER_
26 PROG = pregraph_sparse_63mer.v$(VERSION)
27 endif
30 BIT_ERR = 0
31 ifeq (,$(findstring $(shell uname -m), x86_64 ppc64 ia64))
32 BIT_ERR = 1
33 endif
35 ifneq (,$(findstring Linux,$(shell uname)))
36 EXTRA_FLAGS += -Wl,--hash-style=both
37 LIBS += -lbam
38 endif
40 ifneq (,$(findstring Unix,$(shell uname)))
41 EXTRA_FLAGS += -Wl,--hash-style=both
42 LIBS += -lbam -lrt
43 endif
45 ifneq (,$(findstring Darwin,$(shell uname)))
46 LIBS += -lbammac
47 endif
49 ifneq (,$(findstring $(shell uname -m), x86_64))
50 CFLAGS += -m64
51 endif
53 ifneq (,$(findstring $(shell uname -m), ia64))
54 CFLAGS +=
55 endif
57 ifneq (,$(findstring $(shell uname -m), ppc64))
58 CFLAGS += -mpowerpc64
59 endif
61 .SUFFIXES:.cpp .o
63 .cpp.o:
64 @printf "Compiling $<... \r"; \
65 $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $< || echo "Error in command: $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $<"
67 all: clean $(OBJS)
68 #pregraph_sparse
70 .PHONY:all clean install
72 envTest:
73 @test $(BIT_ERR) != 1 || sh -c 'echo "Fatal: 64bit CPU and Operating System required!";false;'
75 pregraph_sparse: clean envTest $(OBJS)
76 @printf "Linking... \r"
77 #@$(CC) $(CFLAGS)$(INCLUDES) -o $(PROG) $(OBJS) $(LIBPATH) $(LIBS) $(ENTRAFLAGS)
78 @printf "$(PROG) compilation done.\n";
80 clean:
81 @rm -fr gmon.out *.o a.out *.exe *.dSYM $(PROG) *~ *.a *.so.* *.so *.dylib
82 @printf "$(PROG) cleaning done.\n";
84 install:
85 @cp $(PROG) ../bin/
86 @printf "$(PROG) installed at ../bin/$(PROG)\n"