From 73fb6a9e8785bcdc5b308e744ad9202e3f5ad7bd Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Tue, 28 Mar 2006 02:37:26 +0000 Subject: [PATCH] improve os x makefiles OS X puts things in weird places, this tries to capture that --- .boring | 3 ++- Makefile.noqt | 12 ++++++++---- alg/glseqbrowser.cpp | 7 +++++++ alg/glsequence.cpp | 2 +- alg/glsequence.hpp | 2 +- alg/nway_paths.cpp | 2 +- alg/test/module.mk | 2 +- mussagl.pro | 13 +++++++++---- qui/MussaWindow.cpp | 1 - qui/seqbrowser/SequenceBrowser.cpp | 1 - qui/seqbrowser/SequenceBrowser.hpp | 2 +- 11 files changed, 31 insertions(+), 16 deletions(-) diff --git a/.boring b/.boring index 74a300b..918a95a 100644 --- a/.boring +++ b/.boring @@ -1,6 +1,7 @@ # Boring file regexps: # doxygen output -#(^|/)doc($|/) +(^|/)doc/html($|/) +(^|/)doc/latex($|/) # depends files \.d$ # qt diff --git a/Makefile.noqt b/Makefile.noqt index 5431ab1..8599b3f 100644 --- a/Makefile.noqt +++ b/Makefile.noqt @@ -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 := diff --git a/alg/glseqbrowser.cpp b/alg/glseqbrowser.cpp index 6991152..a523ebb 100644 --- a/alg/glseqbrowser.cpp +++ b/alg/glseqbrowser.cpp @@ -2,6 +2,7 @@ #include "mussa_exceptions.hpp" #include +#include #include using namespace std; @@ -327,6 +328,12 @@ GlSeqBrowser::link(const vector& path, const vector& 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"); } diff --git a/alg/glsequence.cpp b/alg/glsequence.cpp index 9b730d1..fecb29f 100644 --- a/alg/glsequence.cpp +++ b/alg/glsequence.cpp @@ -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 } diff --git a/alg/glsequence.hpp b/alg/glsequence.hpp index b6ca6eb..0133230 100644 --- a/alg/glsequence.hpp +++ b/alg/glsequence.hpp @@ -4,7 +4,7 @@ #include "alg/annotation_colors.hpp" #include "alg/sequence.hpp" #include "alg/color.hpp" -#include +#include //! 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 diff --git a/alg/nway_paths.cpp b/alg/nway_paths.cpp index b82cff6..3cd4723 100644 --- a/alg/nway_paths.cpp +++ b/alg/nway_paths.cpp @@ -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("="); diff --git a/alg/test/module.mk b/alg/test/module.mk index dae6b68..8a265b6 100644 --- a/alg/test/module.mk +++ b/alg/test/module.mk @@ -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 $@ $^ diff --git a/mussagl.pro b/mussagl.pro index e569115..3ad99c3 100644 --- a/mussagl.pro +++ b/mussagl.pro @@ -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 -} + diff --git a/qui/MussaWindow.cpp b/qui/MussaWindow.cpp index 7abf8f3..808d188 100644 --- a/qui/MussaWindow.cpp +++ b/qui/MussaWindow.cpp @@ -11,7 +11,6 @@ #include #include "qui/MussaWindow.hpp" -#include "qui/mussa_setup_dialog/MussaSetupDialog.hpp" #include "mussa_exceptions.hpp" #include diff --git a/qui/seqbrowser/SequenceBrowser.cpp b/qui/seqbrowser/SequenceBrowser.cpp index 00885dd..b95e7bc 100644 --- a/qui/seqbrowser/SequenceBrowser.cpp +++ b/qui/seqbrowser/SequenceBrowser.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include "qui/seqbrowser/SequenceBrowser.hpp" diff --git a/qui/seqbrowser/SequenceBrowser.hpp b/qui/seqbrowser/SequenceBrowser.hpp index d77b5d4..ac12e26 100644 --- a/qui/seqbrowser/SequenceBrowser.hpp +++ b/qui/seqbrowser/SequenceBrowser.hpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include -- 2.30.2