Skip to content

Commit

Permalink
Fixed docker build and unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
agraubert committed May 29, 2019
1 parent 937dba6 commit 0a3c78e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN apt-get update && apt-get install -y software-properties-common && \
COPY Makefile /opt/rnaseqc/Makefile
RUN cd /opt/rnaseqc && git clone --recursive https://github.com/walaj/SeqLib.git && \
cd SeqLib && git checkout 7e1f98267b5057f9505dbff119308137a0e006db && cd .. && \
make SeqLib/bin/libseqlib.a
make SeqLib/lib/libseqlib.a

# python
RUN cd /opt && git clone https://github.com/francois-a/rnaseq-utils rnaseq && cd rnaseq && \
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SRCDIR=src
OBJECTS=$(SOURCES:.cpp=.o)
SEQFLAGS=$(STDLIB) -D_GLIBCXX_USE_CXX11_ABI=$(ABI)

rnaseqc: $(foreach file,$(OBJECTS),$(SRCDIR)/$(file)) SeqLib/bin/libseqlib.a SeqLib/bin/libhts.a
rnaseqc: $(foreach file,$(OBJECTS),$(SRCDIR)/$(file)) SeqLib/lib/libseqlib.a SeqLib/lib/libhts.a
$(CC) -O3 $(LIBRARY_PATHS) -o $@ $^ $(STATIC_LIBS) $(LIBS)

.PHONY: lib
Expand All @@ -28,7 +28,7 @@ lib: $(foreach file,$(OBJECTS),$(SRCDIR)/$(file))
%.o: %.cpp
$(CC) $(CFLAGS) -I. $(INCLUDE_DIRS) -c -o $@ $<

SeqLib/bin/libseqlib.a SeqLib/bin/libhts.a:
SeqLib/lib/libseqlib.a SeqLib/lib/libhts.a:
cd SeqLib && ./configure && make CXXFLAGS="$(SEQFLAGS)" && make install

.PHONY: clean
Expand Down
6 changes: 3 additions & 3 deletions test_data/Makefile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LIBRARY_PATHS=
#Set to 0 if you encounter linker errors regarding strings from the bamtools library
ABI=1
#Provide full paths here to .a archives for libraries which should be statically linked
STATIC_LIBS=SeqLib/bin/libhts.a /usr/lib/x86_64-linux-gnu/libboost_filesystem.a /usr/lib/x86_64-linux-gnu/libboost_regex.a /usr/lib/x86_64-linux-gnu/libboost_system.a /usr/lib/x86_64-linux-gnu/libz.a /usr/lib/x86_64-linux-gnu/liblzma.a /usr/lib/x86_64-linux-gnu/libbz2.a /usr/lib/gcc/x86_64-linux-gnu/5.5.0/libstdc++.a
STATIC_LIBS=SeqLib/lib/libhts.a /usr/lib/x86_64-linux-gnu/libboost_filesystem.a /usr/lib/x86_64-linux-gnu/libboost_regex.a /usr/lib/x86_64-linux-gnu/libboost_system.a /usr/lib/x86_64-linux-gnu/libz.a /usr/lib/x86_64-linux-gnu/liblzma.a /usr/lib/x86_64-linux-gnu/libbz2.a /usr/lib/gcc/x86_64-linux-gnu/5.5.0/libstdc++.a
#List of remaining libraries that will be dynamically linked
LIBS=-lpthread

Expand All @@ -16,13 +16,13 @@ SOURCES=BED.cpp Expression.cpp GTF.cpp RNASeQC.cpp Metrics.cpp Fasta.cpp BamRead
SRCDIR=src
OBJECTS=$(SOURCES:.cpp=.o)

rnaseqc: $(foreach file,$(OBJECTS),$(SRCDIR)/$(file)) SeqLib/bin/libseqlib.a SeqLib/bin/libhts.a
rnaseqc: $(foreach file,$(OBJECTS),$(SRCDIR)/$(file)) SeqLib/lib/libseqlib.a SeqLib/lib/libhts.a
$(CC) -static -static-libstdc++ -static-libgcc -O3 $(LIBRARY_PATHS) -o $@ $^ $(STATIC_LIBS) $(LIBS)

%.o: %.cpp
$(CC) -static -static-libstdc++ -static-libgcc $(CFLAGS) -I. $(INCLUDE_DIRS) -c -o $@ $<

SeqLib/bin/libseqlib.a SeqLib/bin/libhts.a:
SeqLib/lib/libseqlib.a SeqLib/lib/libhts.a:
cd SeqLib && ./configure && make CXXFLAGS=$(STDLIB) && make install

.PHONY: clean
Expand Down
6 changes: 3 additions & 3 deletions test_data/Makefile.osx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LIBRARY_PATHS=
#Set to 0 if you encounter linker errors regarding strings from the bamtools library
ABI=1
#Provide full paths here to .a archives for libraries which should be statically linked
STATIC_LIBS=/usr/local/lib/libboost_filesystem.a /usr/local/lib/libboost_regex.a /usr/local/lib/libboost_system.a $(ZLIB_PATH) SeqLib/bin/libhts.a $(LZMA_PATH) /usr/local/opt/bzip2/lib/libbz2.a
STATIC_LIBS=/usr/local/lib/libboost_filesystem.a /usr/local/lib/libboost_regex.a /usr/local/lib/libboost_system.a $(ZLIB_PATH) SeqLib/lib/libhts.a $(LZMA_PATH) /usr/local/opt/bzip2/lib/libbz2.a
#List of remaining libraries that will be dynamically linked
LIBS=

Expand All @@ -16,13 +16,13 @@ SOURCES=BED.cpp Expression.cpp GTF.cpp RNASeQC.cpp Metrics.cpp Fasta.cpp BamRead
SRCDIR=src
OBJECTS=$(SOURCES:.cpp=.o)

rnaseqc: $(foreach file,$(OBJECTS),$(SRCDIR)/$(file)) SeqLib/bin/libseqlib.a SeqLib/bin/libhts.a
rnaseqc: $(foreach file,$(OBJECTS),$(SRCDIR)/$(file)) SeqLib/lib/libseqlib.a SeqLib/lib/libhts.a
$(CC) -O3 $(LIBRARY_PATHS) -o $@ $^ $(STATIC_LIBS) $(LIBS)

%.o: %.cpp
$(CC) $(CFLAGS) -I. $(INCLUDE_DIRS) -c -o $@ $<

SeqLib/bin/libseqlib.a SeqLib/bin/libhts.a:
SeqLib/lib/libseqlib.a SeqLib/lib/libhts.a:
cd SeqLib && ./configure && make CXXFLAGS=$(STDLIB) && make install

.PHONY: clean
Expand Down

0 comments on commit 0a3c78e

Please sign in to comment.