From 8f3cd519798b09c10edde092a5aec2e6cb5bc028 Mon Sep 17 00:00:00 2001 From: Marcel Bargull Date: Sat, 16 Dec 2017 15:49:20 +0100 Subject: [PATCH 1/5] makefile: fix all target --- makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 3c10593..d09c6a8 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ -all: kmc +all: kmc kmc_dump kmc_tools KMC_BIN_DIR = bin KMC_MAIN_DIR = kmer_counter @@ -111,4 +111,4 @@ clean: -rm $(KMC_TOOLS_DIR)/*.o -rm -rf bin -all: kmc kmc_dump kmc_tools \ No newline at end of file +all: kmc kmc_dump kmc_tools From ad19d5cffe5d74bcada7d9ad6beaf8171d336381 Mon Sep 17 00:00:00 2001 From: Marcel Bargull Date: Sat, 16 Dec 2017 15:53:25 +0100 Subject: [PATCH 2/5] makefile: honor user-supplied flags --- makefile | 30 +++++++++++++++--------------- makefile_mac | 20 ++++++++++---------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/makefile b/makefile index d09c6a8..3851464 100644 --- a/makefile +++ b/makefile @@ -6,12 +6,12 @@ KMC_API_DIR = kmc_api KMC_DUMP_DIR = kmc_dump KMC_TOOLS_DIR = kmc_tools -CC = g++ -CFLAGS = -Wall -O3 -m64 -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11 -CLINK = -lm -static -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11 +CXX ?= g++ +CFLAGS = $(CPPFLAGS) $(CXXFLAGS) -Wall -O3 -m64 -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11 +CLINK = $(LDFLAGS) -lm -static -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11 -KMC_TOOLS_CFLAGS = -Wall -O3 -m64 -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++14 -KMC_TOOLS_CLINK = -lm -static -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++14 +KMC_TOOLS_CFLAGS = $(CPPFLAGS) $(CXXFLAGS) -Wall -O3 -m64 -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++14 +KMC_TOOLS_CLINK = $(LDFLAGS) -lm -static -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++14 DISABLE_ASMLIB = false @@ -77,32 +77,32 @@ else endif $(KMC_OBJS) $(KMC_DUMP_OBJS) $(KMC_API_OBJS): %.o: %.cpp - $(CC) $(CFLAGS) -c $< -o $@ + $(CXX) $(CFLAGS) -c $< -o $@ $(KMC_TOOLS_OBJS): %.o: %.cpp - $(CC) $(KMC_TOOLS_CFLAGS) -c $< -o $@ + $(CXX) $(KMC_TOOLS_CFLAGS) -c $< -o $@ $(KMC_MAIN_DIR)/raduls_sse2.o: $(KMC_MAIN_DIR)/raduls_sse2.cpp - $(CC) $(CFLAGS) -msse2 -c $< -o $@ + $(CXX) $(CFLAGS) -msse2 -c $< -o $@ $(KMC_MAIN_DIR)/raduls_sse41.o: $(KMC_MAIN_DIR)/raduls_sse41.cpp - $(CC) $(CFLAGS) -msse4.1 -c $< -o $@ + $(CXX) $(CFLAGS) -msse4.1 -c $< -o $@ $(KMC_MAIN_DIR)/raduls_avx.o: $(KMC_MAIN_DIR)/raduls_avx.cpp - $(CC) $(CFLAGS) -mavx -fabi-version=0 -c $< -o $@ + $(CXX) $(CFLAGS) -mavx -fabi-version=0 -c $< -o $@ $(KMC_MAIN_DIR)/raduls_avx2.o: $(KMC_MAIN_DIR)/raduls_avx2.cpp - $(CC) $(CFLAGS) -mavx2 -mfma -fabi-version=0 -c $< -o $@ + $(CXX) $(CFLAGS) -mavx2 -mfma -fabi-version=0 -c $< -o $@ $(KMC_MAIN_DIR)/instrset_detect.o: $(KMC_MAIN_DIR)/libs/vectorclass/instrset_detect.cpp - $(CC) $(CFLAGS) -c $< -o $@ + $(CXX) $(CFLAGS) -c $< -o $@ kmc: $(KMC_OBJS) $(RADULS_OBJS) $(KMC_MAIN_DIR)/instrset_detect.o -mkdir -p $(KMC_BIN_DIR) - $(CC) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_LIBS) + $(CXX) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_LIBS) kmc_dump: $(KMC_DUMP_OBJS) $(KMC_API_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CC) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^ + $(CXX) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^ kmc_tools: $(KMC_TOOLS_OBJS) $(KMC_API_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CC) $(KMC_TOOLS_CLINK) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_TOOLS_LIBS) + $(CXX) $(KMC_TOOLS_CLINK) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_TOOLS_LIBS) clean: -rm $(KMC_MAIN_DIR)/*.o diff --git a/makefile_mac b/makefile_mac index 0d1ea9b..fbf5d48 100644 --- a/makefile_mac +++ b/makefile_mac @@ -6,11 +6,11 @@ KMC_API_DIR = kmc_api KMC_DUMP_DIR = kmc_dump KMC_TOOLS_DIR = kmc_tools -CC = /usr/local/gcc-6.3.0/bin/g++ -CFLAGS = -Wall -O3 -m64 -static-libgcc -static-libstdc++ -fopenmp -pthread -std=c++11 -CLINK = -lm -fopenmp -static-libgcc -static-libstdc++ -O3 -pthread -std=c++11 -KMC_TOOLS_CFLAGS = -Wall -O3 -m64 -static-libgcc -static-libstdc++ -pthread -std=c++14 -KMC_TOOLS_CLINK = -lm -static-libgcc -static-libstdc++ -O3 -pthread -std=c++14 +CXX ?= /usr/local/gcc-6.3.0/bin/g++ +CFLAGS = $(CPPFLAGS) $(CXXFLAGS) -Wall -O3 -m64 -static-libgcc -static-libstdc++ -fopenmp -pthread -std=c++11 +CLINK = $(LDFLAGS) -lm -fopenmp -static-libgcc -static-libstdc++ -O3 -pthread -std=c++11 +KMC_TOOLS_CFLAGS = $(CPPFLAGS) $(CXXFLAGS) -Wall -O3 -m64 -static-libgcc -static-libstdc++ -pthread -std=c++14 +KMC_TOOLS_CLINK = $(LDFLAGS) -lm -static-libgcc -static-libstdc++ -O3 -pthread -std=c++14 DISABLE_ASMLIB = false @@ -72,21 +72,21 @@ else endif $(KMC_OBJS) $(KMC_DUMP_OBJS) $(KMC_API_OBJS): %.o: %.cpp - $(CC) $(CFLAGS) -c $< -o $@ + $(CXX) $(CFLAGS) -c $< -o $@ $(KMC_TOOLS_OBJS): %.o: %.cpp - $(CC) $(KMC_TOOLS_CFLAGS) -c $< -o $@ + $(CXX) $(KMC_TOOLS_CFLAGS) -c $< -o $@ kmc: $(KMC_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CC) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_LIBS) + $(CXX) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_LIBS) kmc_dump: $(KMC_DUMP_OBJS) $(KMC_API_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CC) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^ + $(CXX) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^ kmc_tools: $(KMC_TOOLS_OBJS) $(KMC_API_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CC) $(KMC_TOOLS_CLINK) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_TOOLS_LIBS) + $(CXX) $(KMC_TOOLS_CLINK) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_TOOLS_LIBS) clean: -rm $(KMC_MAIN_DIR)/*.o From cb41b66855ebf5d289c2c0d972fec44d350f6fab Mon Sep 17 00:00:00 2001 From: Marcel Bargull Date: Sat, 16 Dec 2017 16:05:27 +0100 Subject: [PATCH 3/5] makefile: append link flags --- makefile | 10 +++++----- makefile_mac | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/makefile b/makefile index 3851464..39977f2 100644 --- a/makefile +++ b/makefile @@ -95,15 +95,15 @@ $(KMC_MAIN_DIR)/instrset_detect.o: $(KMC_MAIN_DIR)/libs/vectorclass/instrset_det kmc: $(KMC_OBJS) $(RADULS_OBJS) $(KMC_MAIN_DIR)/instrset_detect.o -mkdir -p $(KMC_BIN_DIR) - $(CXX) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_LIBS) + $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_LIBS) $(CLINK) kmc_dump: $(KMC_DUMP_OBJS) $(KMC_API_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CXX) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^ - + $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(CLINK) + kmc_tools: $(KMC_TOOLS_OBJS) $(KMC_API_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CXX) $(KMC_TOOLS_CLINK) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_TOOLS_LIBS) - + $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_TOOLS_LIBS) $(KMC_TOOLS_CLINK) + clean: -rm $(KMC_MAIN_DIR)/*.o -rm $(KMC_API_DIR)/*.o diff --git a/makefile_mac b/makefile_mac index fbf5d48..908c5a1 100644 --- a/makefile_mac +++ b/makefile_mac @@ -80,14 +80,14 @@ $(KMC_TOOLS_OBJS): %.o: %.cpp kmc: $(KMC_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CXX) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_LIBS) + $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_LIBS) $(CLINK) kmc_dump: $(KMC_DUMP_OBJS) $(KMC_API_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CXX) $(CLINK) -o $(KMC_BIN_DIR)/$@ $^ + $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(CLINK) kmc_tools: $(KMC_TOOLS_OBJS) $(KMC_API_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CXX) $(KMC_TOOLS_CLINK) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_TOOLS_LIBS) - + $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_TOOLS_LIBS) $(KMC_TOOLS_CLINK) + clean: -rm $(KMC_MAIN_DIR)/*.o -rm $(KMC_API_DIR)/*.o From a31f110f684f5b72bce4defe82259066350cd99b Mon Sep 17 00:00:00 2001 From: Marcel Bargull Date: Sat, 16 Dec 2017 16:06:54 +0100 Subject: [PATCH 4/5] makefile: cleanup, use user-supplied flags explicitly in CXX calls --- makefile | 46 +++++++++++++++++++++++----------------------- makefile_mac | 28 ++++++++++++++-------------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/makefile b/makefile index 39977f2..9fa0c94 100644 --- a/makefile +++ b/makefile @@ -1,5 +1,5 @@ all: kmc kmc_dump kmc_tools - + KMC_BIN_DIR = bin KMC_MAIN_DIR = kmer_counter KMC_API_DIR = kmc_api @@ -7,11 +7,11 @@ KMC_DUMP_DIR = kmc_dump KMC_TOOLS_DIR = kmc_tools CXX ?= g++ -CFLAGS = $(CPPFLAGS) $(CXXFLAGS) -Wall -O3 -m64 -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11 -CLINK = $(LDFLAGS) -lm -static -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11 +CFLAGS = -Wall -O3 -m64 -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11 +CLINK = -lm -static -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++11 -KMC_TOOLS_CFLAGS = $(CPPFLAGS) $(CXXFLAGS) -Wall -O3 -m64 -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++14 -KMC_TOOLS_CLINK = $(LDFLAGS) -lm -static -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++14 +KMC_TOOLS_CFLAGS = -Wall -O3 -m64 -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++14 +KMC_TOOLS_CLINK = -lm -static -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++14 DISABLE_ASMLIB = false @@ -34,7 +34,7 @@ RADULS_OBJS = \ $(KMC_MAIN_DIR)/raduls_sse2.o \ $(KMC_MAIN_DIR)/raduls_sse41.o \ $(KMC_MAIN_DIR)/raduls_avx2.o \ -$(KMC_MAIN_DIR)/raduls_avx.o +$(KMC_MAIN_DIR)/raduls_avx.o KMC_LIBS = \ $(KMC_MAIN_DIR)/libs/libz.a \ @@ -43,7 +43,7 @@ $(KMC_MAIN_DIR)/libs/libbz2.a KMC_DUMP_OBJS = \ $(KMC_DUMP_DIR)/nc_utils.o \ $(KMC_API_DIR)/mmer.o \ -$(KMC_DUMP_DIR)/kmc_dump.o +$(KMC_DUMP_DIR)/kmc_dump.o KMC_API_OBJS = \ $(KMC_API_DIR)/mmer.o \ @@ -64,45 +64,45 @@ $(KMC_TOOLS_DIR)/percent_progress.o KMC_TOOLS_LIBS = \ $(KMC_TOOLS_DIR)/libs/libz.a \ -$(KMC_TOOLS_DIR)/libs/libbz2.a +$(KMC_TOOLS_DIR)/libs/libbz2.a ifeq ($(DISABLE_ASMLIB),true) CFLAGS += -DDISABLE_ASMLIB KMC_TOOLS_CFLAGS += -DDISABLE_ASMLIB else KMC_LIBS += \ - $(KMC_MAIN_DIR)/libs/libaelf64.a + $(KMC_MAIN_DIR)/libs/libaelf64.a KMC_TOOLS_LIBS += \ - $(KMC_TOOLS_DIR)/libs/libaelf64.a -endif + $(KMC_TOOLS_DIR)/libs/libaelf64.a +endif $(KMC_OBJS) $(KMC_DUMP_OBJS) $(KMC_API_OBJS): %.o: %.cpp - $(CXX) $(CFLAGS) -c $< -o $@ + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CFLAGS) -c $< -o $@ $(KMC_TOOLS_OBJS): %.o: %.cpp - $(CXX) $(KMC_TOOLS_CFLAGS) -c $< -o $@ + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(KMC_TOOLS_CFLAGS) -c $< -o $@ $(KMC_MAIN_DIR)/raduls_sse2.o: $(KMC_MAIN_DIR)/raduls_sse2.cpp - $(CXX) $(CFLAGS) -msse2 -c $< -o $@ + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CFLAGS) -msse2 -c $< -o $@ $(KMC_MAIN_DIR)/raduls_sse41.o: $(KMC_MAIN_DIR)/raduls_sse41.cpp - $(CXX) $(CFLAGS) -msse4.1 -c $< -o $@ + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CFLAGS) -msse4.1 -c $< -o $@ $(KMC_MAIN_DIR)/raduls_avx.o: $(KMC_MAIN_DIR)/raduls_avx.cpp - $(CXX) $(CFLAGS) -mavx -fabi-version=0 -c $< -o $@ + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CFLAGS) -mavx -fabi-version=0 -c $< -o $@ $(KMC_MAIN_DIR)/raduls_avx2.o: $(KMC_MAIN_DIR)/raduls_avx2.cpp - $(CXX) $(CFLAGS) -mavx2 -mfma -fabi-version=0 -c $< -o $@ + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CFLAGS) -mavx2 -mfma -fabi-version=0 -c $< -o $@ $(KMC_MAIN_DIR)/instrset_detect.o: $(KMC_MAIN_DIR)/libs/vectorclass/instrset_detect.cpp - $(CXX) $(CFLAGS) -c $< -o $@ - -kmc: $(KMC_OBJS) $(RADULS_OBJS) $(KMC_MAIN_DIR)/instrset_detect.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CFLAGS) -c $< -o $@ + +kmc: $(KMC_OBJS) $(RADULS_OBJS) $(KMC_MAIN_DIR)/instrset_detect.o -mkdir -p $(KMC_BIN_DIR) - $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_LIBS) $(CLINK) + $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_LIBS) $(LDFLAGS) $(CLINK) kmc_dump: $(KMC_DUMP_OBJS) $(KMC_API_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(CLINK) + $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(LDFLAGS) $(CLINK) kmc_tools: $(KMC_TOOLS_OBJS) $(KMC_API_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_TOOLS_LIBS) $(KMC_TOOLS_CLINK) + $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_TOOLS_LIBS) $(LDFLAGS) $(KMC_TOOLS_CLINK) clean: -rm $(KMC_MAIN_DIR)/*.o diff --git a/makefile_mac b/makefile_mac index 908c5a1..7b7f73b 100644 --- a/makefile_mac +++ b/makefile_mac @@ -1,5 +1,5 @@ all: kmc kmc_dump kmc_tools - + KMC_BIN_DIR = bin KMC_MAIN_DIR = kmer_counter KMC_API_DIR = kmc_api @@ -7,10 +7,10 @@ KMC_DUMP_DIR = kmc_dump KMC_TOOLS_DIR = kmc_tools CXX ?= /usr/local/gcc-6.3.0/bin/g++ -CFLAGS = $(CPPFLAGS) $(CXXFLAGS) -Wall -O3 -m64 -static-libgcc -static-libstdc++ -fopenmp -pthread -std=c++11 -CLINK = $(LDFLAGS) -lm -fopenmp -static-libgcc -static-libstdc++ -O3 -pthread -std=c++11 -KMC_TOOLS_CFLAGS = $(CPPFLAGS) $(CXXFLAGS) -Wall -O3 -m64 -static-libgcc -static-libstdc++ -pthread -std=c++14 -KMC_TOOLS_CLINK = $(LDFLAGS) -lm -static-libgcc -static-libstdc++ -O3 -pthread -std=c++14 +CFLAGS = -Wall -O3 -m64 -static-libgcc -static-libstdc++ -fopenmp -pthread -std=c++11 +CLINK = -lm -fopenmp -static-libgcc -static-libstdc++ -O3 -pthread -std=c++11 +KMC_TOOLS_CFLAGS = -Wall -O3 -m64 -static-libgcc -static-libstdc++ -pthread -std=c++14 +KMC_TOOLS_CLINK = -lm -static-libgcc -static-libstdc++ -O3 -pthread -std=c++14 DISABLE_ASMLIB = false @@ -38,7 +38,7 @@ $(KMC_MAIN_DIR)/libs/libbz2.1.0.5.dylib KMC_DUMP_OBJS = \ $(KMC_DUMP_DIR)/nc_utils.o \ $(KMC_API_DIR)/mmer.o \ -$(KMC_DUMP_DIR)/kmc_dump.o +$(KMC_DUMP_DIR)/kmc_dump.o KMC_API_OBJS = \ $(KMC_API_DIR)/mmer.o \ @@ -66,27 +66,27 @@ ifeq ($(DISABLE_ASMLIB),true) KMC_TOOLS_CFLAGS += -DDISABLE_ASMLIB else KMC_LIBS += \ - $(KMC_MAIN_DIR)/libs/libamac64.a + $(KMC_MAIN_DIR)/libs/libamac64.a KMC_TOOLS_LIBS += \ $(KMC_TOOLS_DIR)/libs/libamac64.a -endif +endif $(KMC_OBJS) $(KMC_DUMP_OBJS) $(KMC_API_OBJS): %.o: %.cpp - $(CXX) $(CFLAGS) -c $< -o $@ + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(CFLAGS) -c $< -o $@ $(KMC_TOOLS_OBJS): %.o: %.cpp - $(CXX) $(KMC_TOOLS_CFLAGS) -c $< -o $@ + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(KMC_TOOLS_CFLAGS) -c $< -o $@ -kmc: $(KMC_OBJS) +kmc: $(KMC_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_LIBS) $(CLINK) + $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_LIBS) $(LDFLAGS) $(CLINK) kmc_dump: $(KMC_DUMP_OBJS) $(KMC_API_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(CLINK) + $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(LDFLAGS) $(CLINK) kmc_tools: $(KMC_TOOLS_OBJS) $(KMC_API_OBJS) -mkdir -p $(KMC_BIN_DIR) - $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_TOOLS_LIBS) $(KMC_TOOLS_CLINK) + $(CXX) -o $(KMC_BIN_DIR)/$@ $^ $(KMC_TOOLS_LIBS) $(LDFLAGS) $(KMC_TOOLS_CLINK) clean: -rm $(KMC_MAIN_DIR)/*.o From e339a414f39623aa5301c3aad4f319ffcd398e91 Mon Sep 17 00:00:00 2001 From: Marcel Bargull Date: Mon, 18 Dec 2017 19:29:21 +0100 Subject: [PATCH 5/5] makefile: make DISABLE_ASMLIB customizable via env --- makefile | 2 +- makefile_mac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 9fa0c94..1a04794 100644 --- a/makefile +++ b/makefile @@ -13,7 +13,7 @@ CLINK = -lm -static -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -st KMC_TOOLS_CFLAGS = -Wall -O3 -m64 -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++14 KMC_TOOLS_CLINK = -lm -static -O3 -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -std=c++14 -DISABLE_ASMLIB = false +DISABLE_ASMLIB ?= false KMC_OBJS = \ $(KMC_MAIN_DIR)/kmer_counter.o \ diff --git a/makefile_mac b/makefile_mac index 7b7f73b..258243f 100644 --- a/makefile_mac +++ b/makefile_mac @@ -12,7 +12,7 @@ CLINK = -lm -fopenmp -static-libgcc -static-libstdc++ -O3 -pthread -std=c++11 KMC_TOOLS_CFLAGS = -Wall -O3 -m64 -static-libgcc -static-libstdc++ -pthread -std=c++14 KMC_TOOLS_CLINK = -lm -static-libgcc -static-libstdc++ -O3 -pthread -std=c++14 -DISABLE_ASMLIB = false +DISABLE_ASMLIB ?= false KMC_OBJS = \ $(KMC_MAIN_DIR)/kmer_counter.o \