Description: Assorted patches
  * Set paths to hhsuite components for Perl scripts.
  * Add a Makefile to generate data/do_not_delete.phr,do_not_delete.pin,do_not_delete.psq .
Author: Laszlo Kajan <lkajan@rostlab.org>
--- a/src/Makefile
+++ b/src/Makefile
@@ -14,13 +14,13 @@
 
 ifdef ICC
   CXX = env LANG=C icc
-  CXXFLAGS = -fast -Wall -fno-strict-aliasing -finline-functions -funroll-loops -fp-model fast=2 -fast-transcendentals -wd981 -wd383 -wd2259 -wd1572 -D HH_SSE3 -I$(CS_DIR) -I$(FFINDEX_DIR)
+  CXXFLAGS = -fast -Wall -fno-strict-aliasing -finline-functions -funroll-loops -fp-model fast=2 -fast-transcendentals -wd981 -wd383 -wd2259 -wd1572 -D HH_SSE3 -I$(CS_DIR)
   HHSEARCH_LIBS = -lpthread -lrt
   HHBLITS_LIBS = -lpthread -lrt -openmp
   OBJECT_LIBS = -openmp
 else # ifndef ICC
   CXX = g++
-  CXXFLAGS = -O3 -Wall -Wno-deprecated -Wno-char-subscripts -fno-strict-aliasing -I$(CS_DIR) $(BITS_FLAG) -I$(FFINDEX_DIR)
+  CXXFLAGS = -O3 -Wall -Wno-deprecated -Wno-char-subscripts -fno-strict-aliasing -I$(CS_DIR) $(BITS_FLAG)
   HHSEARCH_LIBS = -lpthread
   HHBLITS_LIBS = -lpthread -fopenmp
   HHALIGN_LIBS = 
@@ -92,7 +92,7 @@
 	  $(CPP_VALGRIND) hhsearch.C -o hhsearch_valgrind $(CS_OBJECTS) $(HHSEARCH_LIBS)
 
 hhblits: hhblits.C $(SOURCES) $(HEADERS) $(CS_OBJECTS)
-	 $(CPP) hhblits.C -o hhblits $(CS_OBJECTS) $(HHBLITS_LIBS) $(FFINDEX_DIR)/libffindex.a
+	 $(CPP) hhblits.C -o hhblits $(CS_OBJECTS) $(HHBLITS_LIBS) -lffindex
 
 hhblits_static: hhblits.C $(SOURCES) $(HEADERS)$(CS_OBJECTS)
 	 $(CPP) -static hhblits.C -o hhblits $(CS_OBJECTS) $(HHBLITS_LIBS) $(FFINDEX_DIR)/libffindex.a
--- a/scripts/addss.pl
+++ b/scripts/addss.pl
@@ -28,7 +28,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@genzentrum.lmu.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use Align;     # Needleman-Wunsch and Smith-Waterman alignment functions
 use File::Temp qw/ tempfile tempdir /;
--- a/scripts/hhblitsdb.pl
+++ b/scripts/hhblitsdb.pl
@@ -28,7 +28,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@genzentrum.lmu.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use strict;
 
--- a/scripts/hhmakemodel.pl
+++ b/scripts/hhmakemodel.pl
@@ -28,7 +28,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@genzentrum.lmu.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use strict;
 use Align;
--- /dev/null
+++ b/data/Makefile
@@ -0,0 +1,11 @@
+#!/usr/bin/make -f
+
+DUMMYDB:=do_not_delete.phr do_not_delete.pin do_not_delete.psq
+
+all: $(DUMMYDB)
+
+%.phr %.pin %.psq : %
+	formatdb -i '$<' && rm -f formatdb.log
+
+clean:
+	rm -f $(DUMMYDB) formatdb.log
--- a/scripts/create_profile_from_hhm.pl
+++ b/scripts/create_profile_from_hhm.pl
@@ -27,7 +27,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@genzentrum.lmu.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use strict;
 
--- a/scripts/create_profile_from_hmmer.pl
+++ b/scripts/create_profile_from_hmmer.pl
@@ -27,7 +27,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@genzentrum.lmu.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use strict;
 
--- a/scripts/multithread.pl
+++ b/scripts/multithread.pl
@@ -29,7 +29,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@genzentrum.lmu.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use strict;
 use POSIX;
--- a/scripts/reformat.pl
+++ b/scripts/reformat.pl
@@ -27,7 +27,7 @@
 
 #     We are very grateful for bug reports! Please contact us at soeding@genzentrum.lmu.de
 
-use lib $ENV{"HHLIB"}."/scripts";
+use lib ( $ENV{"HHLIB"} || '/usr/share/hhsuite' )."/scripts";
 use HHPaths;   # config file with path variables for nr, blast, psipred, pdb, dssp etc.
 use strict;
 use warnings;
