diff --git a/.gitignore b/.gitignore index 9c2ec17..49f9f4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ *.o -fastahack \ No newline at end of file +fastahack +libfastahack.a +CMakeFiles +CMakeCache.txt +cmake_install.cmake +Makefile diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e556379 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 2.8) + +add_library(fastahack + FastaHack.cpp + Fasta.cpp + split.cpp + disorder.c +) + +add_executable(fastahack-bin + FastaHack.cpp + disorder.c +) + +set_target_properties(fastahack-bin + PROPERTIES OUTPUT_NAME fastahack +) + +target_link_libraries(fastahack-bin + fastahack +) diff --git a/FastaHack.cpp b/FastaHack.cpp index fac0963..b542abc 100644 --- a/FastaHack.cpp +++ b/FastaHack.cpp @@ -1,7 +1,9 @@ #include "Fasta.h" #include #include +extern "C" { #include "disorder.h" +} void printSummary() { cerr << "usage: fastahack [options] " << endl diff --git a/Makefile b/Makefile deleted file mode 100644 index b0d847e..0000000 --- a/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -CXX=g++ -CFLAGS=-O3 -D_FILE_OFFSET_BITS=64 - -fastahack: Fasta.o FastaHack.cpp split.o disorder.o - $(CXX) $(CFLAGS) Fasta.o FastaHack.cpp split.o disorder.o -o fastahack - -Fasta.o: Fasta.h Fasta.cpp - $(CXX) $(CFLAGS) -c Fasta.cpp - -split.o: split.h split.cpp - $(CXX) $(CFLAGS) -c split.cpp - -disorder.o: disorder.c disorder.h - $(CXX) $(CFLAGS) -c disorder.c - -clean: - rm -f fastahack *.o - -.PHONY: clean diff --git a/README b/README index 5ccba37..7d82aa5 100644 --- a/README +++ b/README @@ -25,6 +25,15 @@ extraction without RAM-intensive file loading operations. This makes fastahack a useful tool for bioinformaticists who need to quickly extract many subsequences from a reference FASTA sequence. +Build: + +Cmake is required to build this project. Issue the following commands from the +fastahack director: + + % cmake . + % make + + Notes: