-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile.am
111 lines (86 loc) · 2.63 KB
/
Makefile.am
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
ACLOCAL_AMFLAGS = -I m4 --install
# -----------------------------------------------------------------
# Makefile for GCTA
#
# Supported platforms
# Unix / Linux UNIX
# Windows WIN
# MacOS MAC
# ---------------------------------------------------------------------
# Set this variable to either UNIX, MAC or WIN
SYS = UNIX
OUTPUT = gcta64
# Use sinlge precision to store matrix
SINGLE_PRECISION =
# Put C++ compiler here; Windows has its own specific version
CXX_UNIX = @CXX@
CXX_WIN = C:\CodeBlocks\MinGW\bin\mingw32-g++.exe
CXX_MAC = @CXX@
# Put the path of library EIGEN here
# Library EIGEN (version 3.0.3) is freely available at http://eigen.tuxfamily.org/
EigenLib = ./eigen
# Any other compiler flags here (-Wall, -g, etc.)
CPPFLAGS = @CPPFLAGS@
CXXFLAGS = @CXXFLAGS@
# For some reason removing -O3 from here allowed compilation to succeed?
CXXFLAGS += -Wno-unused -I$(EigenLib) -DEIGEN_NO_DEBUG -msse2 -I.
LDFLAGS = @LDFLAGS@
@ifGNUmake@ifdef SINGLE_PRECISION
@ifGNUmake@ CXXFLAGS += -DSINGLE_PRECISION=1
@ifGNUmake@endif
LIB = @LIB@
# Some system specific flags
@ifGNUmake@ifeq ($(SYS),WIN)
@ifGNUmake@ CXXFLAGS += -DWIN -static -I ../../Lib/zlib
@ifGNUmake@ LIB += ../../Lib/zlib/zlib.lib
@ifGNUmake@ CXX = $(CXX_WIN)
@ifGNUmake@endif
@ifGNUmake@ifeq ($(SYS),UNIX)
@ifGNUmake@ CXXFLAGS += -DUNIX -static
@ifGNUmake@ LIB += -lz
@ifGNUmake@ CXX = $(CXX_UNIX)
@ifGNUmake@endif
@ifGNUmake@ifeq ($(SYS),MAC)
@ifGNUmake@ CXXFLAGS += -DUNIX -Dfopen64=fopen @MAINT@ -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5
@ifGNUmake@ LIB += -lz
@ifGNUmake@ CXX = $(CXX_MAC)
@ifGNUmake@endif
@ifGNUmake@ifeq ($(SYS),SOLARIS)
@ifGNUmake@ CXX = $(CXX_UNIX)
@ifGNUmake@endif
HDR = @HDR@
HDR += CommFunc.h \
cdflib.h \
dcdflib.h \
gcta.h \
ipmpar.h \
StatFunc.h \
StrFunc.h \
zfstream.h
SRC = CommFunc.cpp \
data.cpp \
dcdflib.cpp \
est_hsq.cpp \
grm.cpp \
gwas_simu.cpp \
ld.cpp \
option.cpp \
raw_geno.cpp \
StatFunc.cpp \
StrFunc.cpp \
zfstream.cpp
OBJ = $(SRC:.cpp=.o)
all : $(OUTPUT)
$(OUTPUT) :
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $(OUTPUT) $(OBJ) $(LDFLAGS) $(LIB) \
$(LIBS)
$(OBJ) : $(HDR)
.cpp.o :
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $*.cpp
SUFFIXES : .cpp .c .o $(SUFFIXES)
$(OUTPUT) : $(OBJ)
FORCE:
clean-local:
@RM_PROG@ -f *.o *~
check-local: $(OUTPUT)
stat $(OUTPUT) || test -x $(OUTPUT)