Browse code

Handle platform-dependent shared library extensions

Devon Ryan authored on 14/11/2020 19:35:15 • GitHub committed on 14/11/2020 19:35:15
Showing 1 changed files
... ...
@@ -29,7 +29,7 @@ DFLAGS = -D_USE_KNETFILE -D_FILE_OFFSET_BITS=64 \
29 29
 PKG_CPPFLAGS += -I$(INCLUDE_DIR)
30 30
 PKG_LIBS += $(GSTRUCT_LIB) $(SAMTOOLS_LIB) -lz
31 31
 
32
-SHLIB = gmapR.so
32
+SHLIB = gmapR$(SHLIB_EXT)
33 33
 
34 34
 all: $(SHLIB) gmap
35 35
 
Browse code

fix Makefile for new embedded samtools source

Michael Lawrence authored on 01/03/2019 19:37:40
Showing 1 changed files
... ...
@@ -27,7 +27,6 @@ DFLAGS = -D_USE_KNETFILE -D_FILE_OFFSET_BITS=64 \
27 27
   -Dabort=_samtools_abort
28 28
 
29 29
 PKG_CPPFLAGS += -I$(INCLUDE_DIR)
30
-PKG_CFLAGS += -g -O3 $(DFLAGS)
31 30
 PKG_LIBS += $(GSTRUCT_LIB) $(SAMTOOLS_LIB) -lz
32 31
 
33 32
 SHLIB = gmapR.so
... ...
@@ -39,6 +38,9 @@ $(SHLIB): $(OBJECTS) $(GSTRUCT_LIB)
39 38
 
40 39
 $(OBJECTS): $(GSTRUCT_INCLUDE_DIR) $(OBJECTS:%.o=%.c)
41 40
 
41
+samtools/%.o: samtools/%.c
42
+	$(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(DFLAGS) -c $< -o $@
43
+
42 44
 $(GSTRUCT_LIB) $(GSTRUCT_INCLUDE_DIR): gstruct
43 45
 
44 46
 $(SAMTOOLS_LIB): $(BAMOBJ)
... ...
@@ -69,6 +71,5 @@ clean:
69 71
 	for dir in $(SUBDIRS); do \
70 72
 	  $(MAKE) -C $$dir distclean; \
71 73
 	done
72
-	rm -rf samtools $(PREFIX)
73 74
 	rm -f *.o *.so *.dll
74 75
 
Browse code

embed samtools sources directly, since Rsamtools has moved to htslib

Michael Lawrence authored on 11/02/2019 20:33:07
Showing 1 changed files
... ...
@@ -13,8 +13,21 @@ GSTRUCT_INCLUDE_DIR = $(INCLUDE_DIR)/gstruct
13 13
 
14 14
 SAMTOOLS_LIB = samtools/libbam.a
15 15
 
16
+PATCH_O = samtools_patch.o
17
+KNETFILE_O = knetfile.o
18
+BAMOBJ_0 = \
19
+  bgzf.o kstring.o bam_aux.o bam.o bam_import.o sam.o bam_index.o	\
20
+  bam_pileup.o bam_lpileup.o bam_md.o razf.o faidx.o \
21
+  $(KNETFILE_O) bam_sort.o sam_header.o bam_reheader.o kprobaln.o $(PATCH_O)
22
+BAMOBJ=$(BAMOBJ_0:%=samtools/%)
23
+DFLAGS = -D_USE_KNETFILE -D_FILE_OFFSET_BITS=64 \
24
+  -U_FORTIFY_SOURCE -DBGZF_CACHE \
25
+  -Dfprintf=_samtools_fprintf \
26
+  -Dexit=_samtools_exit \
27
+  -Dabort=_samtools_abort
28
+
16 29
 PKG_CPPFLAGS += -I$(INCLUDE_DIR)
17
-PKG_CFLAGS += -g -O3
30
+PKG_CFLAGS += -g -O3 $(DFLAGS)
18 31
 PKG_LIBS += $(GSTRUCT_LIB) $(SAMTOOLS_LIB) -lz
19 32
 
20 33
 SHLIB = gmapR.so
... ...
@@ -28,22 +41,14 @@ $(OBJECTS): $(GSTRUCT_INCLUDE_DIR) $(OBJECTS:%.o=%.c)
28 41
 
29 42
 $(GSTRUCT_LIB) $(GSTRUCT_INCLUDE_DIR): gstruct
30 43
 
31
-RSAMTOOLS_PATH := $(shell R_LIBS=$(R_LIBRARY_DIR) $(R_HOME)/bin/Rscript \
32
-		    --vanilla -e 'cat(system.file(package="Rsamtools"))')
33
-${R_SRC_DIR}/samtools: $(RSAMTOOLS_PATH)
34
-## gmap/gstruct assume samtools headers and libs are in one directory,
35
-## so we need to create one and populate it with links to Rsamtools.
36
-	rm -rf samtools; mkdir samtools
37
-	ln -sf $(RSAMTOOLS_PATH)/usrlib/$(R_ARCH)/libbam.a samtools/libbam.a
38
-	for header in $(RSAMTOOLS_PATH)/include/samtools/*.h; do \
39
-	  ln -sf $$header samtools/$(notdir $(header)); \
40
-	done
44
+$(SAMTOOLS_LIB): $(BAMOBJ)
45
+	$(AR) -crus $@ $(BAMOBJ)
41 46
 
42
-$(SUBDIRS): %: %/Makefile
47
+$(SUBDIRS): %: %/Makefile $(SAMTOOLS_LIB)
43 48
 	cd $@; \
44 49
 	$(MAKE) install
45 50
 
46
-gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools 
51
+gstruct/Makefile: gstruct/configure
47 52
 	cd $(dir $@); \
48 53
         CFLAGS="-g -O3" \
49 54
 	./configure --enable-static --disable-shared \
Browse code

disable maintainer mode for GSTRUCT

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@123973 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 14/11/2016 21:57:42
Showing 1 changed files
... ...
@@ -50,6 +50,7 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
50 50
 	            --prefix=${PREFIX} --includedir=${GSTRUCT_INCLUDE_DIR} \
51 51
 	            --libdir=${PREFIX}/${LIBnn} \
52 52
 	            --with-samtools-lib=${R_SRC_DIR}/samtools \
53
+		    --disable-maintainer-mode \
53 54
                     --disable-binaries
54 55
 ## does not appear to be a true dependency yet
55 56
 ##	            --with-gmap=${PREFIX}/bin
Browse code

update to latest GSTRUCT

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@123972 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 14/11/2016 21:54:30
Showing 1 changed files
... ...
@@ -50,8 +50,7 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
50 50
 	            --prefix=${PREFIX} --includedir=${GSTRUCT_INCLUDE_DIR} \
51 51
 	            --libdir=${PREFIX}/${LIBnn} \
52 52
 	            --with-samtools-lib=${R_SRC_DIR}/samtools \
53
-                    --disable-binaries  \
54
-                    --disable-maintainer-mode
53
+                    --disable-binaries
55 54
 ## does not appear to be a true dependency yet
56 55
 ##	            --with-gmap=${PREFIX}/bin
57 56
 
Browse code

disable maintainer mode for gsnap

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@111237 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 05/12/2015 14:20:35
Showing 1 changed files
... ...
@@ -58,7 +58,7 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
58 58
 gmap/Makefile: gmap/configure
59 59
 	cd $(dir $@); \
60 60
 	 ./configure --with-gmapdb=${GMAPDB} --prefix=${PREFIX} \
61
-	            --libdir=${PREFIX}/${LIBnn} # \ # \ # \ # \ # --disable-maintainer-mode;;;;
61
+	            --libdir=${PREFIX}/${LIBnn} --disable-maintainer-mode
62 62
 
63 63
 clean:
64 64
 	for dir in $(SUBDIRS); do \
Browse code

Makefile cleanup

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@110045 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 28/10/2015 20:53:26
Showing 1 changed files
... ...
@@ -45,13 +45,13 @@ $(SUBDIRS): %: %/Makefile
45 45
 
46 46
 gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools 
47 47
 	cd $(dir $@); \
48
+        CFLAGS="-g -O3" \
48 49
 	./configure --enable-static --disable-shared \
49 50
 	            --prefix=${PREFIX} --includedir=${GSTRUCT_INCLUDE_DIR} \
50 51
 	            --libdir=${PREFIX}/${LIBnn} \
51 52
 	            --with-samtools-lib=${R_SRC_DIR}/samtools \
52 53
                     --disable-binaries  \
53
-		    CFLAGS="-g -O3"
54
-#                    \ # \ # \ # \ # --disable-maintainer-mode \;;;;
54
+                    --disable-maintainer-mode
55 55
 ## does not appear to be a true dependency yet
56 56
 ##	            --with-gmap=${PREFIX}/bin
57 57
 
Browse code

resurrect improvements that we reverted before the April release, expect breakage for a while

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@110039 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 28/10/2015 18:51:00
Showing 1 changed files
... ...
@@ -50,14 +50,15 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
50 50
 	            --libdir=${PREFIX}/${LIBnn} \
51 51
 	            --with-samtools-lib=${R_SRC_DIR}/samtools \
52 52
                     --disable-binaries  \
53
-                    --disable-maintainer-mode \
53
+		    CFLAGS="-g -O3"
54
+#                    \ # \ # \ # \ # --disable-maintainer-mode \;;;;
54 55
 ## does not appear to be a true dependency yet
55 56
 ##	            --with-gmap=${PREFIX}/bin
56 57
 
57 58
 gmap/Makefile: gmap/configure
58 59
 	cd $(dir $@); \
59 60
 	 ./configure --with-gmapdb=${GMAPDB} --prefix=${PREFIX} \
60
-	            --libdir=${PREFIX}/${LIBnn} --disable-maintainer-mode
61
+	            --libdir=${PREFIX}/${LIBnn} # \ # \ # \ # \ # --disable-maintainer-mode;;;;
61 62
 
62 63
 clean:
63 64
 	for dir in $(SUBDIRS); do \
Browse code

Reverted to r101133, along with NAMESPACE fixes

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@102487 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 14/04/2015 21:40:44
Showing 1 changed files
... ...
@@ -50,15 +50,14 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
50 50
 	            --libdir=${PREFIX}/${LIBnn} \
51 51
 	            --with-samtools-lib=${R_SRC_DIR}/samtools \
52 52
                     --disable-binaries  \
53
-		    CFLAGS="-g -O3"
54
-#                    \ # \ # \ # \ # --disable-maintainer-mode \;;;;
53
+                    --disable-maintainer-mode \
55 54
 ## does not appear to be a true dependency yet
56 55
 ##	            --with-gmap=${PREFIX}/bin
57 56
 
58 57
 gmap/Makefile: gmap/configure
59 58
 	cd $(dir $@); \
60 59
 	 ./configure --with-gmapdb=${GMAPDB} --prefix=${PREFIX} \
61
-	            --libdir=${PREFIX}/${LIBnn} # \ # \ # \ # \ # --disable-maintainer-mode;;;;
60
+	            --libdir=${PREFIX}/${LIBnn} --disable-maintainer-mode
62 61
 
63 62
 clean:
64 63
 	for dir in $(SUBDIRS); do \
Browse code

Recent work towards supporting the new features... will revert back to a stable version immediately...

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@102485 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 14/04/2015 21:32:10
Showing 1 changed files
... ...
@@ -50,14 +50,15 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
50 50
 	            --libdir=${PREFIX}/${LIBnn} \
51 51
 	            --with-samtools-lib=${R_SRC_DIR}/samtools \
52 52
                     --disable-binaries  \
53
-#                    --disable-maintainer-mode \
53
+		    CFLAGS="-g -O3"
54
+#                    \ # \ # \ # \ # --disable-maintainer-mode \;;;;
54 55
 ## does not appear to be a true dependency yet
55 56
 ##	            --with-gmap=${PREFIX}/bin
56 57
 
57 58
 gmap/Makefile: gmap/configure
58 59
 	cd $(dir $@); \
59 60
 	 ./configure --with-gmapdb=${GMAPDB} --prefix=${PREFIX} \
60
-	            --libdir=${PREFIX}/${LIBnn} # --disable-maintainer-mode
61
+	            --libdir=${PREFIX}/${LIBnn} # \ # \ # \ # \ # --disable-maintainer-mode;;;;
61 62
 
62 63
 clean:
63 64
 	for dir in $(SUBDIRS); do \
Browse code

update gstruct/bamtally

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@101176 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 25/03/2015 20:25:05
Showing 1 changed files
... ...
@@ -50,14 +50,14 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
50 50
 	            --libdir=${PREFIX}/${LIBnn} \
51 51
 	            --with-samtools-lib=${R_SRC_DIR}/samtools \
52 52
                     --disable-binaries  \
53
-                    --disable-maintainer-mode \
53
+#                    --disable-maintainer-mode \
54 54
 ## does not appear to be a true dependency yet
55 55
 ##	            --with-gmap=${PREFIX}/bin
56 56
 
57 57
 gmap/Makefile: gmap/configure
58 58
 	cd $(dir $@); \
59 59
 	 ./configure --with-gmapdb=${GMAPDB} --prefix=${PREFIX} \
60
-	            --libdir=${PREFIX}/${LIBnn} --disable-maintainer-mode
60
+	            --libdir=${PREFIX}/${LIBnn} # --disable-maintainer-mode
61 61
 
62 62
 clean:
63 63
 	for dir in $(SUBDIRS); do \
Browse code

Drop some compiler/pp flags

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@99427 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 12/02/2015 21:44:00
Showing 1 changed files
... ...
@@ -13,7 +13,7 @@ GSTRUCT_INCLUDE_DIR = $(INCLUDE_DIR)/gstruct
13 13
 
14 14
 SAMTOOLS_LIB = samtools/libbam.a
15 15
 
16
-PKG_CPPFLAGS += -I$(INCLUDE_DIR) -g -O3
16
+PKG_CPPFLAGS += -I$(INCLUDE_DIR)
17 17
 PKG_CFLAGS += -g -O3
18 18
 PKG_LIBS += $(GSTRUCT_LIB) $(SAMTOOLS_LIB) -lz
19 19
 
... ...
@@ -28,8 +28,8 @@ $(OBJECTS): $(GSTRUCT_INCLUDE_DIR) $(OBJECTS:%.o=%.c)
28 28
 
29 29
 $(GSTRUCT_LIB) $(GSTRUCT_INCLUDE_DIR): gstruct
30 30
 
31
-RSAMTOOLS_PATH := $(shell R_LIBS_USER=$(R_LIBRARY_DIR) $(R_HOME)/bin/Rscript --vanilla -e \
32
-                    'cat(system.file(package="Rsamtools"))')
31
+RSAMTOOLS_PATH := $(shell R_LIBS=$(R_LIBRARY_DIR) $(R_HOME)/bin/Rscript \
32
+		    --vanilla -e 'cat(system.file(package="Rsamtools"))')
33 33
 ${R_SRC_DIR}/samtools: $(RSAMTOOLS_PATH)
34 34
 ## gmap/gstruct assume samtools headers and libs are in one directory,
35 35
 ## so we need to create one and populate it with links to Rsamtools.
... ...
@@ -45,7 +45,7 @@ $(SUBDIRS): %: %/Makefile
45 45
 
46 46
 gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools 
47 47
 	cd $(dir $@); \
48
-	CFLAGS="-g" ./configure --enable-static --disable-shared \
48
+	./configure --enable-static --disable-shared \
49 49
 	            --prefix=${PREFIX} --includedir=${GSTRUCT_INCLUDE_DIR} \
50 50
 	            --libdir=${PREFIX}/${LIBnn} \
51 51
 	            --with-samtools-lib=${R_SRC_DIR}/samtools \
... ...
@@ -57,8 +57,7 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
57 57
 gmap/Makefile: gmap/configure
58 58
 	cd $(dir $@); \
59 59
 	 ./configure --with-gmapdb=${GMAPDB} --prefix=${PREFIX} \
60
-	            --libdir=${PREFIX}/${LIBnn} --disable-maintainer-mode \
61
-		    CFLAGS=-g #added by gabe 5/14/14
60
+	            --libdir=${PREFIX}/${LIBnn} --disable-maintainer-mode
62 61
 
63 62
 clean:
64 63
 	for dir in $(SUBDIRS); do \
Browse code

some fiddling, disable maintainer mode, vbump

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@93390 bc3139a8-67e5-0310-9ffc-ced21a209358

Gabriel Becker authored on 14/08/2014 20:39:03
Showing 1 changed files
... ...
@@ -45,13 +45,12 @@ $(SUBDIRS): %: %/Makefile
45 45
 
46 46
 gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools 
47 47
 	cd $(dir $@); \
48
-	CFLAGS="-g -O0" ./configure --enable-static --disable-shared \
48
+	CFLAGS="-g" ./configure --enable-static --disable-shared \
49 49
 	            --prefix=${PREFIX} --includedir=${GSTRUCT_INCLUDE_DIR} \
50 50
 	            --libdir=${PREFIX}/${LIBnn} \
51 51
 	            --with-samtools-lib=${R_SRC_DIR}/samtools \
52 52
                     --disable-binaries  \
53
-# --disable-maintainer-mode \
54
-		     #\ added by gabe 5/14/14
53
+                    --disable-maintainer-mode \
55 54
 ## does not appear to be a true dependency yet
56 55
 ##	            --with-gmap=${PREFIX}/bin
57 56
 
Browse code

seems to work now. Something weird going on, needs -O0 when building gstruct

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@93386 bc3139a8-67e5-0310-9ffc-ced21a209358

Gabriel Becker authored on 14/08/2014 19:13:43
Showing 1 changed files
... ...
@@ -13,8 +13,8 @@ GSTRUCT_INCLUDE_DIR = $(INCLUDE_DIR)/gstruct
13 13
 
14 14
 SAMTOOLS_LIB = samtools/libbam.a
15 15
 
16
-PKG_CPPFLAGS += -I$(INCLUDE_DIR) -g -O0
17
-PKG_CFLAGS += -g -O0
16
+PKG_CPPFLAGS += -I$(INCLUDE_DIR) -g -O3
17
+PKG_CFLAGS += -g -O3
18 18
 PKG_LIBS += $(GSTRUCT_LIB) $(SAMTOOLS_LIB) -lz
19 19
 
20 20
 SHLIB = gmapR.so
... ...
@@ -28,7 +28,7 @@ $(OBJECTS): $(GSTRUCT_INCLUDE_DIR) $(OBJECTS:%.o=%.c)
28 28
 
29 29
 $(GSTRUCT_LIB) $(GSTRUCT_INCLUDE_DIR): gstruct
30 30
 
31
-RSAMTOOLS_PATH := $(shell $(R_HOME)/bin/Rscript --vanilla -e \
31
+RSAMTOOLS_PATH := $(shell R_LIBS_USER=$(R_LIBRARY_DIR) $(R_HOME)/bin/Rscript --vanilla -e \
32 32
                     'cat(system.file(package="Rsamtools"))')
33 33
 ${R_SRC_DIR}/samtools: $(RSAMTOOLS_PATH)
34 34
 ## gmap/gstruct assume samtools headers and libs are in one directory,
... ...
@@ -45,11 +45,12 @@ $(SUBDIRS): %: %/Makefile
45 45
 
46 46
 gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools 
47 47
 	cd $(dir $@); \
48
-	./configure --enable-static --disable-shared \
48
+	CFLAGS="-g -O0" ./configure --enable-static --disable-shared \
49 49
 	            --prefix=${PREFIX} --includedir=${GSTRUCT_INCLUDE_DIR} \
50 50
 	            --libdir=${PREFIX}/${LIBnn} \
51
-	            --with-samtools=${R_SRC_DIR}/samtools \
52
-                    --disable-binaries  --disable-maintainer-mode \
51
+	            --with-samtools-lib=${R_SRC_DIR}/samtools \
52
+                    --disable-binaries  \
53
+# --disable-maintainer-mode \
53 54
 		     #\ added by gabe 5/14/14
54 55
 ## does not appear to be a true dependency yet
55 56
 ##	            --with-gmap=${PREFIX}/bin
... ...
@@ -58,7 +59,7 @@ gmap/Makefile: gmap/configure
58 59
 	cd $(dir $@); \
59 60
 	 ./configure --with-gmapdb=${GMAPDB} --prefix=${PREFIX} \
60 61
 	            --libdir=${PREFIX}/${LIBnn} --disable-maintainer-mode \
61
-		    CFLAGS=-g0 #added by gabe 5/14/14
62
+		    CFLAGS=-g #added by gabe 5/14/14
62 63
 
63 64
 clean:
64 65
 	for dir in $(SUBDIRS); do \
Browse code

add codon tally support. No vbump yet

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@93316 bc3139a8-67e5-0310-9ffc-ced21a209358

Gabriel Becker authored on 11/08/2014 23:42:48
Showing 1 changed files
... ...
@@ -13,8 +13,8 @@ GSTRUCT_INCLUDE_DIR = $(INCLUDE_DIR)/gstruct
13 13
 
14 14
 SAMTOOLS_LIB = samtools/libbam.a
15 15
 
16
-PKG_CPPFLAGS += -I$(INCLUDE_DIR)
17
-PKG_CFLAGS += -g
16
+PKG_CPPFLAGS += -I$(INCLUDE_DIR) -g -O0
17
+PKG_CFLAGS += -g -O0
18 18
 PKG_LIBS += $(GSTRUCT_LIB) $(SAMTOOLS_LIB) -lz
19 19
 
20 20
 SHLIB = gmapR.so
... ...
@@ -49,14 +49,16 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
49 49
 	            --prefix=${PREFIX} --includedir=${GSTRUCT_INCLUDE_DIR} \
50 50
 	            --libdir=${PREFIX}/${LIBnn} \
51 51
 	            --with-samtools=${R_SRC_DIR}/samtools \
52
-                    --disable-binaries --disable-maintainer-mode #\
52
+                    --disable-binaries  --disable-maintainer-mode \
53
+		     #\ added by gabe 5/14/14
53 54
 ## does not appear to be a true dependency yet
54 55
 ##	            --with-gmap=${PREFIX}/bin
55 56
 
56 57
 gmap/Makefile: gmap/configure
57 58
 	cd $(dir $@); \
58
-	./configure --with-gmapdb=${GMAPDB} --prefix=${PREFIX} \
59
-	            --libdir=${PREFIX}/${LIBnn} --disable-maintainer-mode
59
+	 ./configure --with-gmapdb=${GMAPDB} --prefix=${PREFIX} \
60
+	            --libdir=${PREFIX}/${LIBnn} --disable-maintainer-mode \
61
+		    CFLAGS=-g0 #added by gabe 5/14/14
60 62
 
61 63
 clean:
62 64
 	for dir in $(SUBDIRS); do \
Browse code

disable binaries

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@85525 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 14/01/2014 23:15:13
Showing 1 changed files
... ...
@@ -49,7 +49,7 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
49 49
 	            --prefix=${PREFIX} --includedir=${GSTRUCT_INCLUDE_DIR} \
50 50
 	            --libdir=${PREFIX}/${LIBnn} \
51 51
 	            --with-samtools=${R_SRC_DIR}/samtools \
52
-		    --disable-maintainer-mode #\
52
+                    --disable-binaries --disable-maintainer-mode #\
53 53
 ## does not appear to be a true dependency yet
54 54
 ##	            --with-gmap=${PREFIX}/bin
55 55
 
Browse code

temporarily enable bam_tally binary

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@85521 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 14/01/2014 22:47:21
Showing 1 changed files
... ...
@@ -49,7 +49,7 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
49 49
 	            --prefix=${PREFIX} --includedir=${GSTRUCT_INCLUDE_DIR} \
50 50
 	            --libdir=${PREFIX}/${LIBnn} \
51 51
 	            --with-samtools=${R_SRC_DIR}/samtools \
52
-		    --disable-binaries --disable-maintainer-mode #\
52
+		    --disable-maintainer-mode #\
53 53
 ## does not appear to be a true dependency yet
54 54
 ##	            --with-gmap=${PREFIX}/bin
55 55
 
Browse code

disable maintainer mode for gstruct; oops

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@82202 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 28/10/2013 18:38:39
Showing 1 changed files
... ...
@@ -49,7 +49,7 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
49 49
 	            --prefix=${PREFIX} --includedir=${GSTRUCT_INCLUDE_DIR} \
50 50
 	            --libdir=${PREFIX}/${LIBnn} \
51 51
 	            --with-samtools=${R_SRC_DIR}/samtools \
52
-		    --disable-binaries #--disable-maintainer-mode #\
52
+		    --disable-binaries --disable-maintainer-mode #\
53 53
 ## does not appear to be a true dependency yet
54 54
 ##	            --with-gmap=${PREFIX}/bin
55 55
 
Browse code

update to latest gstruct; brings faster bam_tally (for high coverage regions) and read-group filtering support in bam_tally

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@80611 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 20/09/2013 02:05:42
Showing 1 changed files
... ...
@@ -49,7 +49,7 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
49 49
 	            --prefix=${PREFIX} --includedir=${GSTRUCT_INCLUDE_DIR} \
50 50
 	            --libdir=${PREFIX}/${LIBnn} \
51 51
 	            --with-samtools=${R_SRC_DIR}/samtools \
52
-		    --disable-binaries --disable-maintainer-mode #\
52
+		    --disable-binaries #--disable-maintainer-mode #\
53 53
 ## does not appear to be a true dependency yet
54 54
 ##	            --with-gmap=${PREFIX}/bin
55 55
 
Browse code

punt; pass --disable-maintainer-mode to configure

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@79207 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 02/08/2013 18:38:59
Showing 1 changed files
... ...
@@ -49,14 +49,14 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
49 49
 	            --prefix=${PREFIX} --includedir=${GSTRUCT_INCLUDE_DIR} \
50 50
 	            --libdir=${PREFIX}/${LIBnn} \
51 51
 	            --with-samtools=${R_SRC_DIR}/samtools \
52
-		    --disable-binaries #\
52
+		    --disable-binaries --disable-maintainer-mode #\
53 53
 ## does not appear to be a true dependency yet
54 54
 ##	            --with-gmap=${PREFIX}/bin
55 55
 
56 56
 gmap/Makefile: gmap/configure
57 57
 	cd $(dir $@); \
58 58
 	./configure --with-gmapdb=${GMAPDB} --prefix=${PREFIX} \
59
-	            --libdir=${PREFIX}/${LIBnn}
59
+	            --libdir=${PREFIX}/${LIBnn} --disable-maintainer-mode
60 60
 
61 61
 clean:
62 62
 	for dir in $(SUBDIRS); do \
Browse code

Add R_Genome_getSeq for efficiently retrieving sequence from a GMAP genome index. This is super fast.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@74871 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 26/03/2013 21:38:39
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@ SUBDIRS = gmap gstruct
2 2
 
3 3
 .PHONY: all clean $(SUBDIRS)
4 4
 
5
-OBJECTS = bamreader.o bamtally.o iit.o variantsummary.o R_init_gmapR.o
5
+OBJECTS = bamreader.o bamtally.o iit.o variantsummary.o genome.o R_init_gmapR.o
6 6
 
7 7
 R_SRC_DIR = ${CURDIR}
8 8
 PREFIX = ${R_SRC_DIR}/../inst/usr
Browse code

*turned off parallelized make ("make -j"). It was causing issues with building on Macs

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@71466 bc3139a8-67e5-0310-9ffc-ced21a209358

Cory Barr authored on 26/11/2012 19:45:58
Showing 1 changed files
... ...
@@ -41,7 +41,7 @@ ${R_SRC_DIR}/samtools: $(RSAMTOOLS_PATH)
41 41
 
42 42
 $(SUBDIRS): %: %/Makefile
43 43
 	cd $@; \
44
-	$(MAKE) -j install
44
+	$(MAKE) install
45 45
 
46 46
 gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools 
47 47
 	cd $(dir $@); \
Browse code

Decoupling the bam tallying from summarization. Soon, we will return an IIT, which can be summarized in various ways. Currently, the only way is the variant summary.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@69806 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 25/09/2012 16:00:17
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@ SUBDIRS = gmap gstruct
2 2
 
3 3
 .PHONY: all clean $(SUBDIRS)
4 4
 
5
-OBJECTS = bamreader.o bamtally.o R_init_gmapR.o
5
+OBJECTS = bamreader.o bamtally.o iit.o variantsummary.o R_init_gmapR.o
6 6
 
7 7
 R_SRC_DIR = ${CURDIR}
8 8
 PREFIX = ${R_SRC_DIR}/../inst/usr
Browse code

Pass LIBnn to gstruct and gmap via configure --libdir argument.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@68277 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 07/08/2012 03:40:39
Showing 1 changed files
... ...
@@ -47,6 +47,7 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
47 47
 	cd $(dir $@); \
48 48
 	./configure --enable-static --disable-shared \
49 49
 	            --prefix=${PREFIX} --includedir=${GSTRUCT_INCLUDE_DIR} \
50
+	            --libdir=${PREFIX}/${LIBnn} \
50 51
 	            --with-samtools=${R_SRC_DIR}/samtools \
51 52
 		    --disable-binaries #\
52 53
 ## does not appear to be a true dependency yet
... ...
@@ -54,7 +55,8 @@ gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools
54 55
 
55 56
 gmap/Makefile: gmap/configure
56 57
 	cd $(dir $@); \
57
-	./configure --with-gmapdb=${GMAPDB} --prefix=${PREFIX}
58
+	./configure --with-gmapdb=${GMAPDB} --prefix=${PREFIX} \
59
+	            --libdir=${PREFIX}/${LIBnn}
58 60
 
59 61
 clean:
60 62
 	for dir in $(SUBDIRS); do \
Browse code

Use $(LIBnn) instead of 'lib' so that things work when 'lib' is supposed to be 'lib64'.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@68219 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 05/08/2012 02:31:12
Showing 1 changed files
... ...
@@ -8,7 +8,7 @@ R_SRC_DIR = ${CURDIR}
8 8
 PREFIX = ${R_SRC_DIR}/../inst/usr
9 9
 INCLUDE_DIR = $(PREFIX)/include
10 10
 
11
-GSTRUCT_LIB = $(PREFIX)/lib/libgstruct-1.0.a
11
+GSTRUCT_LIB = $(PREFIX)/$(LIBnn)/libgstruct-1.0.a
12 12
 GSTRUCT_INCLUDE_DIR = $(INCLUDE_DIR)/gstruct
13 13
 
14 14
 SAMTOOLS_LIB = samtools/libbam.a
Browse code

renaming gmapR2 to gmapR: it lives again

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@68172 bc3139a8-67e5-0310-9ffc-ced21a209358

Michael Lawrence authored on 02/08/2012 22:24:24
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,65 @@
1
+SUBDIRS = gmap gstruct
2
+
3
+.PHONY: all clean $(SUBDIRS)
4
+
5
+OBJECTS = bamreader.o bamtally.o R_init_gmapR.o
6
+
7
+R_SRC_DIR = ${CURDIR}
8
+PREFIX = ${R_SRC_DIR}/../inst/usr
9
+INCLUDE_DIR = $(PREFIX)/include
10
+
11
+GSTRUCT_LIB = $(PREFIX)/lib/libgstruct-1.0.a
12
+GSTRUCT_INCLUDE_DIR = $(INCLUDE_DIR)/gstruct
13
+
14
+SAMTOOLS_LIB = samtools/libbam.a
15
+
16
+PKG_CPPFLAGS += -I$(INCLUDE_DIR)
17
+PKG_CFLAGS += -g
18
+PKG_LIBS += $(GSTRUCT_LIB) $(SAMTOOLS_LIB) -lz
19
+
20
+SHLIB = gmapR.so
21
+
22
+all: $(SHLIB) gmap
23
+
24
+$(SHLIB): $(OBJECTS) $(GSTRUCT_LIB)
25
+	$(SHLIB_LINK) -o $@ $(OBJECTS) $(ALL_LIBS)
26
+
27
+$(OBJECTS): $(GSTRUCT_INCLUDE_DIR) $(OBJECTS:%.o=%.c)
28
+
29
+$(GSTRUCT_LIB) $(GSTRUCT_INCLUDE_DIR): gstruct
30
+
31
+RSAMTOOLS_PATH := $(shell $(R_HOME)/bin/Rscript --vanilla -e \
32
+                    'cat(system.file(package="Rsamtools"))')
33
+${R_SRC_DIR}/samtools: $(RSAMTOOLS_PATH)
34
+## gmap/gstruct assume samtools headers and libs are in one directory,
35
+## so we need to create one and populate it with links to Rsamtools.
36
+	rm -rf samtools; mkdir samtools
37
+	ln -sf $(RSAMTOOLS_PATH)/usrlib/$(R_ARCH)/libbam.a samtools/libbam.a
38
+	for header in $(RSAMTOOLS_PATH)/include/samtools/*.h; do \
39
+	  ln -sf $$header samtools/$(notdir $(header)); \
40
+	done
41
+
42
+$(SUBDIRS): %: %/Makefile
43
+	cd $@; \
44
+	$(MAKE) -j install
45
+
46
+gstruct/Makefile: gstruct/configure ${R_SRC_DIR}/samtools 
47
+	cd $(dir $@); \
48
+	./configure --enable-static --disable-shared \
49
+	            --prefix=${PREFIX} --includedir=${GSTRUCT_INCLUDE_DIR} \
50
+	            --with-samtools=${R_SRC_DIR}/samtools \
51
+		    --disable-binaries #\
52
+## does not appear to be a true dependency yet
53
+##	            --with-gmap=${PREFIX}/bin
54
+
55
+gmap/Makefile: gmap/configure
56
+	cd $(dir $@); \
57
+	./configure --with-gmapdb=${GMAPDB} --prefix=${PREFIX}
58
+
59
+clean:
60
+	for dir in $(SUBDIRS); do \
61
+	  $(MAKE) -C $$dir distclean; \
62
+	done
63
+	rm -rf samtools $(PREFIX)
64
+	rm -f *.o *.so *.dll
65
+