You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
126 lines
4.0 KiB
126 lines
4.0 KiB
diff --git a/Makefile.std b/Makefile.std
|
|
index 95b0940..30206be 100644
|
|
--- a/Makefile.std
|
|
+++ b/Makefile.std
|
|
@@ -1,62 +1,22 @@
|
|
# General-purpose Makefile for PLINK 1.90
|
|
#
|
|
-# Compilation options:
|
|
-# Do not link to LAPACK NO_LAPACK
|
|
|
|
-# Leave blank after "=" to disable; put "= 1" to enable
|
|
-# (when enabled, "#define NOLAPACK" must be uncommented in plink_common.h)
|
|
-NO_LAPACK =
|
|
-
|
|
-
|
|
-# should autodetect system
|
|
-SYS = UNIX
|
|
-ifdef SystemRoot
|
|
- SYS = WIN
|
|
-else
|
|
- UNAME := $(shell uname)
|
|
- ifeq ($(UNAME), Darwin)
|
|
- SYS = MAC
|
|
- endif
|
|
-endif
|
|
-
|
|
-CFLAGS=-Wall -O2
|
|
-BLASFLAGS=-L/usr/lib64/atlas -llapack -lcblas -latlas
|
|
-LINKFLAGS=-lm -lpthread
|
|
-ZLIB=zlib-1.2.8/libz.so.1.2.8
|
|
-
|
|
-ifeq ($(SYS), MAC)
|
|
- GCC_GTEQ_43 := $(shell expr `g++ -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40300)
|
|
- ifeq "$(GCC_GTEQ_43)" "1"
|
|
- CFLAGS=-Wall -O2 -flax-vector-conversions
|
|
- endif
|
|
- BLASFLAGS=-framework Accelerate
|
|
- LINKFLAGS=
|
|
- ZLIB=zlib-1.2.8/libz.1.2.8.dylib
|
|
-endif
|
|
-
|
|
-ifeq ($(SYS), WIN)
|
|
-# Note that, unlike the Linux and Mac build processes, this STATICALLY links
|
|
-# LAPACK, since we have not gotten around to trying dynamically-linked LAPACK
|
|
-# on Windows.
|
|
-# If you don't already have LAPACK built, you'll probably want to turn on
|
|
-# NO_LAPACK.
|
|
- BLASFLAGS=-L. lapack/liblapack.a -L. lapack/librefblas.a
|
|
- LINKFLAGS=-lm -static-libgcc
|
|
- ZLIB=zlib-1.2.8/libz.a
|
|
-endif
|
|
-
|
|
-ifdef NO_LAPACK
|
|
- BLASFLAGS=
|
|
-endif
|
|
+# CFLAGS=-Wall -O2
|
|
+# BLASFLAGS=-lblas -llapack -latlas
|
|
+LINKFLAGS=-lm -lpthread -lopenblas -llapack -latlas -lstdc++
|
|
+ZLIB=-lz
|
|
|
|
SRC = plink.c plink_assoc.c plink_calc.c plink_cluster.c plink_cnv.c plink_common.c plink_data.c plink_dosage.c plink_family.c plink_filter.c plink_glm.c plink_help.c plink_homozyg.c plink_lasso.c plink_ld.c plink_matrix.c plink_misc.c plink_set.c plink_stats.c SFMT.c dcdflib.c pigz.c yarn.c
|
|
|
|
+OBJ = plink.o plink_assoc.o plink_calc.o plink_cluster.o plink_cnv.o plink_common.o plink_data.o plink_dosage.o plink_family.o plink_filter.o plink_glm.o plink_help.o plink_homozyg.o plink_lasso.o plink_ld.o plink_matrix.o plink_misc.o plink_set.o plink_stats.o SFMT.o dcdflib.o pigz.o yarn.o
|
|
+
|
|
# In the likely event that you are concurrently using PLINK 1.07, we suggest
|
|
# either renaming that binary to "plink1" or this one to "plink2".
|
|
|
|
-plink: $(SRC)
|
|
- g++ $(CFLAGS) $(SRC) -o plink $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB)
|
|
+# plink: $(SRC)
|
|
+# g++ $(CFLAGS) $(SRC) -o plink $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB)
|
|
|
|
-plinkw: $(SRC)
|
|
+plink: $(SRC)
|
|
g++ $(CFLAGS) $(SRC) -c
|
|
- gfortran -O2 $(OBJ) -o plink -Wl,-Bstatic $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB)
|
|
+ gfortran $(OBJ) -o plink2 $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB)
|
|
+ # gfortran $^ -o plink2 -Wl,-Bstatic $(BLASFLAGS) $(LINKFLAGS) -L. $(ZLIB)
|
|
diff --git a/dose2plink.c b/dose2plink.c
|
|
index dc1f33a..ca2d31c 100644
|
|
--- a/dose2plink.c
|
|
+++ b/dose2plink.c
|
|
@@ -96,7 +96,7 @@
|
|
#endif
|
|
#endif
|
|
|
|
-#include "zlib-1.2.8/zlib.h"
|
|
+#include "zlib.h"
|
|
|
|
#ifdef __APPLE__
|
|
#include <sys/sysctl.h>
|
|
diff --git a/pigz.c b/pigz.c
|
|
index 6605925..3f4ca54 100644
|
|
--- a/pigz.c
|
|
+++ b/pigz.c
|
|
@@ -303,7 +303,7 @@
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <windows.h>
|
|
-#include "zlib-1.2.8/zlib.h"
|
|
+#include "zlib.h"
|
|
|
|
void pigz_init(uint32_t setprocs) {
|
|
return;
|
|
@@ -383,7 +383,7 @@ void parallel_compress(char* out_fname, uint32_t do_append, uint32_t(* emitn)(ui
|
|
# include <sys/pstat.h>
|
|
#endif
|
|
|
|
-#include "zlib-1.2.8/zlib.h" /* deflateInit2(), deflateReset(), deflate(), */
|
|
+#include "zlib.h" /* deflateInit2(), deflateReset(), deflate(), */
|
|
/* deflateEnd(), deflateSetDictionary(), crc32(),
|
|
inflateBackInit(), inflateBack(), inflateBackEnd(),
|
|
Z_DEFAULT_COMPRESSION, Z_DEFAULT_STRATEGY,
|
|
diff --git a/plink_common.h b/plink_common.h
|
|
index 5dd77e8..4da9371 100644
|
|
--- a/plink_common.h
|
|
+++ b/plink_common.h
|
|
@@ -139,7 +139,7 @@
|
|
|
|
#endif // __LP64__
|
|
|
|
-#include "zlib-1.2.8/zlib.h"
|
|
+#include "zlib.h"
|
|
#include "SFMT.h"
|
|
|
|
// 64MB of non-workspace memory guaranteed for now
|