forked from gentoo/sci
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sci-biology/yaha: Fix build with gcc-5 and respect build tools
Package-Manager: Portage-2.3.3, Repoman-2.3.1 Signed-off-by: Justin Lecher <[email protected]>
- Loading branch information
Showing
3 changed files
with
90 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
diff --git a/Makefile b/Makefile | ||
index 44fa872..b844ba6 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -10,24 +10,27 @@ SDIR := src | ||
ODIR := obj | ||
BDIR := bin | ||
|
||
+CC ?= gcc | ||
+CXX ?= g++ | ||
+CFLAGS ?= -Wall -O3 | ||
+CXXFLAGS ?= -Wall -O3 | ||
+LDFLAGS ?= | ||
+ | ||
+CFLAGS += -MMD -MP -std=gnu99 | ||
+CXXFLAGS += -MMD -MP | ||
+LDFLAGS += -pthread | ||
+ | ||
# Set up flags depending on mode | ||
ifdef USERMODE | ||
PROG := yaha | ||
-CCFLAGS := -Wall -O3 -D COMPILE_USER_MODE -D BUILDNUM=$(BUILDNUM) | ||
+CFLAGS += -D COMPILE_USER_MODE -D BUILDNUM=$(BUILDNUM) | ||
+CXXFLAGS += -D COMPILE_USER_MODE -D BUILDNUM=$(BUILDNUM) | ||
else | ||
PROG := yaha$(BUILDNUM) | ||
-CCFLAGS := -Wall -Winline -O3 -g -D BUILDNUM=$(BUILDNUM) | ||
+CFLAGS += -g -D BUILDNUM=$(BUILDNUM) | ||
+CXXFLAGS += -g -D BUILDNUM=$(BUILDNUM) | ||
endif | ||
|
||
-# Auto build dependency files. | ||
-CCFLAGS += -MMD -MP | ||
- | ||
-CC := gcc | ||
-CPP := g++ | ||
-CFLAGS := $(CCFLAGS) -std=gnu99 | ||
-CPPFLAGS := $(CCFLAGS) | ||
-LDFLAGS := -pthread | ||
- | ||
# The list of object files. | ||
OBJfiles := Main.o AlignArgs.o AlignHelpers.o AlignExtFrag.o AlignOutput.o BaseSeq.o Compress.o \ | ||
FileHelpers.o GraphPath.o Index.o Query.o QueryMatch.o QueryState.o SW.o Math.o | ||
@@ -45,7 +48,7 @@ $(BDIR): | ||
|
||
# Link the program | ||
$(BDIR)/$(PROG): $(OBJS) | ||
- $(CPP) $(LDFLAGS) -o $@ $(OBJS) | ||
+ $(CXX) $(LDFLAGS) -o $@ $(OBJS) | ||
|
||
# Include the dependencies. | ||
# The actual objects will be built by the below generic rules based on these dependencies. | ||
@@ -58,7 +61,7 @@ $(ODIR)/%.o: $(SDIR)/%.c | ||
$(CC) $(CFLAGS) -c $< -o $@ | ||
|
||
$(ODIR)/%.o: $(SDIR)/%.cpp | ||
- $(CPP) $(CPPFLAGS) -c $< -o $@ | ||
+ $(CXX) $(CXXFLAGS) -c $< -o $@ | ||
|
||
.PHONY: clean | ||
clean: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
src/SW.cpp | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/SW.cpp b/src/SW.cpp | ||
index 57d2773..3a9c225 100644 | ||
--- a/src/SW.cpp | ||
+++ b/src/SW.cpp | ||
@@ -796,7 +796,7 @@ int findAGSBackwardExtensionCarefully(QueryState_t * QS, ROFF rOff, char * qStr | ||
//////////////////////// | ||
|
||
template <BOOL banded, BOOL extension, BOOL reverse, BOOL XCutoff> | ||
-int findAffineGapScore(QueryState_t * QS, char * qStr, SUINT qLen, char * rStr, SUINT rLen, EditOpList_t * list, SUINT * addedQLen = NULL, SUINT * addedRLen = NULL) | ||
+int findAffineGapScore(QueryState_t * QS, char * qStr, SUINT qLen, char * rStr, SUINT rLen, EditOpList_t * list, SUINT * addedQLen, SUINT * addedRLen) | ||
{ | ||
// As we will go row by row, then column by column, we do not need to store all of the V, E, and F arrays. | ||
// Instead we will store only the previous row and column for each. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters