Skip to content

Commit

Permalink
Merge pull request #788 from kdmurray91/libmakefile
Browse files Browse the repository at this point in the history
./lib Makefile rewrite, create libkhmer.{a,so} and install target
  • Loading branch information
mr-c committed Mar 28, 2015
2 parents 9f82238 + 5a3c0e2 commit 2f6e71a
Show file tree
Hide file tree
Showing 17 changed files with 297 additions and 583 deletions.
14 changes: 14 additions & 0 deletions ChangeLog
@@ -1,3 +1,17 @@
2015-03-27 Michael R. Crusoe <mcrusoe@msu.edu>

* lib/read_parsers.{cc,hh}: Obfuscate SeqAn SequenceStream objects with a
wrapper struct, to avoid #include-ing the SeqAn headers.
* lib/Makefile: Don't install the SeqAn headers.

2015-03-27 Kevin Murray <spam@kdmurray.id.au>

* lib/Makefile: Add libkhmer targets, clean up
* lib/get_version.py: Rewrite to use versioneer.py
* lib/.gitignore,third-party/.gitignore: Add more compiled outputs
* lib/.check_openmp.cc: add source that checks compiler for openmp support.
* lib/khmer.pc.in: add pkg-config file for khmer

2015-03-23 Kevin Murray <spam@kdmurray.id.au>

* lib/counting.hh: Add CountingHash::n_tables() accessor
Expand Down
18 changes: 18 additions & 0 deletions Makefile
Expand Up @@ -184,6 +184,24 @@ lib:
cd lib && \
$(MAKE)

# Runs a test of ./lib
libtest: FORCE
rm -rf install_target
mkdir -p install_target
cd lib && \
$(MAKE) clean && \
$(MAKE) all && \
$(MAKE) install PREFIX=../install_target
test -d install_target/include
test -f install_target/include/khmer.hh
test -d install_target/lib
test -f install_target/lib/libkhmer.a
$(CXX) -o install_target/test-prog-static -I install_target/include \
lib/test-compile.cc install_target/lib/libkhmer.a
$(CXX) -o install_target/test-prog-dynamic -I install_target/include \
-L install_target/lib lib/test-compile.cc -lkhmer
rm -rf install_target

## test : run the khmer test suite
test: FORCE
./setup.py develop
Expand Down
4 changes: 3 additions & 1 deletion jenkins-build.sh
Expand Up @@ -68,4 +68,6 @@ fi

# takes too long to run on every build
#bash -ex -c 'cd examples/stamps/; ./do.sh' || { echo examples/stamps/do.sh no longer runs; /bin/false; }


make lib
make libtest
17 changes: 17 additions & 0 deletions lib/.check_openmp.cc
@@ -0,0 +1,17 @@
//
// This file is part of khmer, http://github.com/ged-lab/khmer/, and is
// Copyright (C) Michigan State University, 2015. It is licensed under
// the three-clause BSD license; see doc/LICENSE.txt.
// Contact: khmer-project@idyll.org
//

// File to be used to check for openmp
#include <omp.h>
#include <stdio.h>

int main()
{
#pragma omp parallel
printf("Hello from thread %d, nthreads %d\n",
omp_get_thread_num(), omp_get_num_threads());
}
11 changes: 6 additions & 5 deletions lib/.gitignore
@@ -1,9 +1,10 @@
test-StreamReader
test-CacheManager
test-Parser
test-HashTables
smpFiltering
bittest
ktable_test
test-read-aligner
ht-diff
chkomp
*.pc
*.swp
*.so
*.so.*
*.a

0 comments on commit 2f6e71a

Please sign in to comment.