improve os x makefiles
authorDiane Trout <diane@caltech.edu>
Tue, 28 Mar 2006 02:37:26 +0000 (02:37 +0000)
committerDiane Trout <diane@caltech.edu>
Tue, 28 Mar 2006 02:37:26 +0000 (02:37 +0000)
OS X puts things in weird places, this tries to capture that

.boring
Makefile.noqt
alg/glseqbrowser.cpp
alg/glsequence.cpp
alg/glsequence.hpp
alg/nway_paths.cpp
alg/test/module.mk
mussagl.pro
qui/MussaWindow.cpp
qui/seqbrowser/SequenceBrowser.cpp
qui/seqbrowser/SequenceBrowser.hpp

diff --git a/.boring b/.boring
index 74a300b2ec9101d719da61462e763358c40080b5..918a95a541b384ecce29e7d12aeff6263872dd8c 100644 (file)
--- a/.boring
+++ b/.boring
@@ -1,6 +1,7 @@
 # Boring file regexps:
 # doxygen output
-#(^|/)doc($|/)
+(^|/)doc/html($|/)
+(^|/)doc/latex($|/)
 # depends files
 \.d$
 # qt
index 5431ab1efb825a38e667a9363075fb23b07bbf95..8599b3fbc3f88879c7b7526a4b2a2c1f33ea4d82 100644 (file)
@@ -1,14 +1,18 @@
 BASEDIR := ./
+CURDIR := $(shell pwd)
 
 BINEXT := 
 OBJEXT := .o
 LIBEXT := .a
 
 CXX := g++ 
-CXXFLAGS := -g -fPIC -I/usr/include/python2.3
-LDFLAGS := 
-
-CURDIR := $(shell pwd)
+CXXFLAGS := -g -fPIC -I/usr/include/python2.3 -I$(CURDIR)
+# needed for linux (as darwin doesn't put gl.h in a directory starting with
+# GL
+CXXFLAGS += -I/usr/include/GL
+# needed for darwin
+CXXFLAGS += -I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/local/include
+LDFLAGS := -L/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/ -L/usr/local/lib
 
 # each module will add to this, .os are derived from it
 TARGETLIBS := 
index 6991152c342c801cc0f3138f4243f5ced9d281a8..a523ebbae6121bacd48c818b4e9dda23c520b66f 100644 (file)
@@ -2,6 +2,7 @@
 #include "mussa_exceptions.hpp"
 
 #include <iostream>
+#include <sstream>
 #include <stdexcept>
 
 using namespace std;
@@ -327,6 +328,12 @@ GlSeqBrowser::link(const vector<int>& path, const vector<bool>& rc, int )
     // should i throw an error instead?
     return;
   }
+  if (path.size() != track_container.size()-1 ) {
+    stringstream msg;
+    msg << "Path size [" << path.size() << "] and track size [" 
+        << track_container.size() << "] don't match" << endl;
+    throw mussa_error(msg.str());
+ }
   if (path.size() != rc.size()) {
     throw runtime_error("path and reverse compliment must be the same length");
   }
index 9b730d106d5519fba767948df8f74831c670a86c..fecb29f75c89d7978ba36445cafbe938a6b9ea95 100644 (file)
@@ -151,7 +151,7 @@ Color GlSequence::color()
 
 int GlSequence::get_viewport_pixel_width()
 {
-  int viewport[4];
+  GLint viewport[4];
   glGetIntegerv(GL_VIEWPORT, viewport);
   return viewport[3]; // grab the viewport width
 }
index b6ca6eb9f526d45d0079740e3f684c6810cb4e28..0133230b9c5038470498d2d3306e2ef69ccdabf9 100644 (file)
@@ -4,7 +4,7 @@
 #include "alg/annotation_colors.hpp"
 #include "alg/sequence.hpp"
 #include "alg/color.hpp"
-#include <GL/gl.h>
+#include <gl.h>
 //! Manage rendering a mussa sequence track
 /*! The idea is this will keep track of the location of where the sequence
  *  is being rendered, and handle displaying annotations on that track
index b82cff6db11807f991f0a4a70a3d406e22e638dd..3cd47232e1da60c2a007e589bad5dfaeff7c3c9a 100644 (file)
@@ -208,7 +208,7 @@ NwayPaths::load(string load_file_path)
     data = file_data_line.substr(equal_split_i+1); 
     win_size = atoi (data.c_str());
     file_data_line = file_data_line.substr(space_split_i+1);
-    // get window size
+    // get threshold size
     space_split_i = file_data_line.find(" ");
     header_data = file_data_line.substr(0,space_split_i); 
     equal_split_i = header_data.find("=");
index dae6b681aeadae49f10771edfa8bbc91b52a25a7..8a265b6c08bc3ad7a75cdd4f5bc75ee3100fc48c 100644 (file)
@@ -20,5 +20,5 @@ TEST := $(BASEDIR)/unittests$(BINEXT)
 TARGETBINS += $(TEST)
 
 $(TEST): $(TESTOBJ)  $(MUSSA_ALG_OBJ) $(MUSSA_ALG_GL_OBJ)
-       g++ $(CXXFLAGS) -lGL -lboost_unit_test_framework -lboost_filesystem -o $@ $^
+       g++ $(CXXFLAGS) $(LDFLAGS) -lGL -lboost_unit_test_framework -lboost_filesystem -o $@ $^
 
index e569115b490cb8bbd3cb8797c19beebe21a46ffe..3ad99c399388c5fa5bb7077614c07d503a60017a 100644 (file)
@@ -76,15 +76,20 @@ RESOURCES = icons.qrc
 
 LIBS += -lm 
 QT += opengl
+LIBS += -lboost_program_options
 
 win32 {
   BOOST_HOME = c:/Boost
   INCLUDEPATH += $$BOOST_HOME/include/boost-1_33_1
+  LIBS -= -lboost_program_options
   LIBS += $$BOOST_HOME/lib/libboost_program_options-mgw-s.lib
+} macx {
+  INCLUDEPATH += /usr/local/include 
+  INCLUDEPATH += /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Headers
+  LIBS += -L/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/OpenGL.framework/Libraries/
+  LIBS += -L/usr/local/lib
 } else {
-  LIBS += -lboost_program_options
+  INCLUDEPATH += /usr/include/GL
 }
 
-macx {
-  INCLUDEPATH += /usr/X11R6/include
-}
+
index 7abf8f3d34451e1fb6b64da2777bf2cd5f910b24..808d1888875599291061120e862bc772fa2da46a 100644 (file)
@@ -11,7 +11,6 @@
 #include <QWhatsThis>
 
 #include "qui/MussaWindow.hpp"
-#include "qui/mussa_setup_dialog/MussaSetupDialog.hpp"
 #include "mussa_exceptions.hpp"
 
 #include <iostream>
index 00885dd256e20fd2997c92ce26339888f4d74c74..b95e7bcd51faedc2e68a46de0ff52c21825bb6b5 100644 (file)
@@ -8,7 +8,6 @@
 #include <iostream>
 #include <set>
 
-#include <GL/gl.h>
 #include <math.h>
 
 #include "qui/seqbrowser/SequenceBrowser.hpp"
index d77b5d44df6d637f27eb9e2ebb1318724a8c348e..ac12e26b8f14ca0e783700d150d43bf2c7e77dd7 100644 (file)
@@ -5,7 +5,7 @@
 #include <QRectF>
 #include <QPoint>
 #include <vector>
-#include <GL/gl.h>
+#include <gl.h>
 
 #include <set>