summarylogtreecommitdiffstats
path: root/Makefile.patch
blob: 5e7522bd5feb0447c2e8af9bd0efcafea6b3a64b (plain)
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
--- kraken2-2.1.3.orig/src/Makefile	2023-06-07 05:55:37.000000000 +0530
+++ kraken2-2.1.3.new/src/Makefile	2023-06-07 15:11:05.404521211 +0530
@@ -1,6 +1,6 @@
 CXX = g++
 KRAKEN2_SKIP_FOPENMP ?= -fopenmp
-CXXFLAGS = $(KRAKEN2_SKIP_FOPENMP) -Wall -std=c++11 -O3
+CXXFLAGS = $(KRAKEN2_SKIP_FOPENMP) -Wall -std=c++11 -O2
 CXXFLAGS += -DLINEAR_PROBING
 
 .PHONY: all clean install
@@ -10,7 +10,7 @@
 all: $(PROGS)
 
 install: $(PROGS)
-	cp $(PROGS) "$(KRAKEN2_DIR)/"
+	cp $(PROGS) $(DESTDIR)$(KRAKEN2_DIR)/
 
 clean:
 	rm -f *.o $(PROGS)
@@ -34,19 +34,19 @@
 k2mask.o: k2mask.cc gzstream.h threadpool.h
 
 build_db: build_db.o mmap_file.o compact_hash.o taxonomy.o seqreader.o mmscanner.o omp_hack.o utilities.o
-	$(CXX) $(CXXFLAGS) -o $@ $^
+	$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
 
 classify: classify.o reports.o hyperloglogplus.o mmap_file.o compact_hash.o taxonomy.o seqreader.o mmscanner.o omp_hack.o aa_translate.o utilities.o
-	$(CXX) $(CXXFLAGS) -o $@ $^
+	$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
 
 estimate_capacity: estimate_capacity.o seqreader.o mmscanner.o omp_hack.o utilities.o
-	$(CXX) $(CXXFLAGS) -o $@ $^
+	$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
 
 dump_table: dump_table.o mmap_file.o compact_hash.o omp_hack.o taxonomy.o reports.o hyperloglogplus.o
-	$(CXX) $(CXXFLAGS) -o $@ $^
+	$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
 
 lookup_accession_numbers: lookup_accession_numbers.o mmap_file.o omp_hack.o utilities.o
-	$(CXX) $(CXXFLAGS) -o $@ $^
+	$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
 
 k2mask: k2mask.o seqreader.o
-	$(CXX) $(CXXFLAGS) -o $@ $^ -lz -pthread
+	$(CXX) $(CXXFLAGS) -o $@ $^ -lz -pthread $(LDFLAGS)