Skip to content

Commit

Permalink
Minor fixes in Jamroot file. Added compilation of python modue under …
Browse files Browse the repository at this point in the history
…Mac OSX
  • Loading branch information
lrog committed Mar 30, 2014
1 parent 456913b commit eeb42b5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Makefile.c++11
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export
CXX = g++
CXXFLAGS = -O2 -m64
CXXFLAGS += -DNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
CXXFLAGS += -Wall #-pedantic
CXXFLAGS += -Wall

# there are problems when statically linking with pthreads and libstdc++
# so use only shared linking
Expand Down
16 changes: 5 additions & 11 deletions Makefile.osx
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
.PHONY: all lib bin examples clean

all: lib bin examples
all: lib bin examples pylib

export

CXX = clang++
CXXFLAGS = -O2 -m64
CXXFLAGS += -DNDEBUG -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
CXXFLAGS += -Wall #-pedantic

# there are problems when statically linking on Mac OSX
#CXXFLAGS += -static
CXXFLAGS += -Wall

# compile using c++11
CXXFLAGS += -std=c++11

DEP_LIBS += -lpthread


APP_NAME = dsrc
LIB_NAME = libdsrc.a
LIB_DIR = lib
Expand All @@ -37,14 +33,12 @@ lib:
examples:
cd examples/cpplib; ${MAKE}


# experimental - library not fully tested under Mac OSX, todo
#pylib:
# cd py; ${MAKE}
pylib:
cd py; ${MAKE}

clean:
cd src; ${MAKE} clean
cd examples/cpplib; ${MAKE} clean
# cd py; ${MAKE} clean
cd py; ${MAKE} clean
-rm -r $(LIB_DIR)
-rm -r $(BIN_DIR)
20 changes: 16 additions & 4 deletions py/Jamroot
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#
# DSRC Python module Jamroot file to use with Boost Build tool
#

import python ;

#
Expand All @@ -10,15 +9,28 @@ import python ;
# To compile DSRC Python module please specify your boost installation directory below
#
use-project boost
: /home/lucas/dev/lib/boost_1_49_0/ ;
: /absolute/path/to/boost/directory/ ;


#
# Project-wide requirements
#
project
: requirements <library>/boost/python//boost_python <library>/boost/thread//boost_thread <library>/boost/system//boost_system ;
: requirements <library>/boost/python//boost_python <library>/boost/thread//boost_thread <library>/boost/system//boost_system ;


#
# Extension modules
#
python-extension pydsrc
: Interface.cpp ../src/DsrcModule.cpp ../src/DsrcArchive.cpp ../src/FastqFile.cpp ../src/BlockCompressorExt.cpp ../src/Configurable.cpp ../src/DsrcWorker.cpp ../src/DsrcIo.cpp ../src/DsrcFile.cpp ../src/DsrcOperator.cpp ../src/BlockCompressor.cpp ../src/FastqIo.cpp ../src/RecordsProcessor.cpp ../src/FastqParser.cpp ../src/FastqStream.cpp ../src/FileStream.cpp ../src/StdStream.cpp ../src/TagModeler.cpp ../src/DnaModelerHuffman.cpp ../src/QualityPositionModeler.cpp ../src/QualityRLEModeler.cpp ../src/huffman.cpp
: <toolset>gcc <variant>release <address-model>64 <link>shared <runtime-link>shared <debug-symbols>off <inlining>full <optimization>speed <warnings>on <cxxflags>"-O2 -m64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUSE_BOOST_THREAD" ;

#
# Important!
#
# Specify toolset according to your platform manually in case of compilation problems in form: '<toolset>gcc'
# Available toolsets:
# - Windows: msvc-*
# - Linux: gcc, clang
# - Mac OSX: darwin, gcc
: <variant>release <address-model>64 <link>shared <runtime-link>shared <debug-symbols>off <inlining>full <optimization>speed <warnings>on <cxxflags>"-O2 -m64 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DUSE_BOOST_THREAD" ;
2 changes: 1 addition & 1 deletion py/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ all:

clean:
-rm $(PYLIB_NAME)
-rm -r $(BJAM_BUILD_ROOT)
-rm -r $(BJAM_BUILD_ROOT)

0 comments on commit eeb42b5

Please sign in to comment.