--- Makefile.orig 2015-12-15 21:26:20 UTC +++ Makefile @@ -39,18 +39,18 @@ AOBJS= bam_index.o bam_plcmd.o sam_ bam_tview.o bam_tview_curses.o bam_tview_html.o bam_lpileup.o \ bam_quickcheck.o bam_addrprg.o -prefix = /usr/local +prefix = ${STAGEDIR}${PREFIX} exec_prefix = $(prefix) bindir = $(exec_prefix)/bin datarootdir = $(prefix)/share -mandir = $(datarootdir)/man +mandir = $(prefix)/man man1dir = $(mandir)/man1 -MKDIR_P = mkdir -p -INSTALL = install -p -INSTALL_PROGRAM = $(INSTALL) -INSTALL_DATA = $(INSTALL) -m 644 -INSTALL_DIR = $(MKDIR_P) -m 755 +#MKDIR_P = mkdir -p +#INSTALL = install -p +#INSTALL_PROGRAM = $(INSTALL) +#INSTALL_DATA = $(INSTALL) -m 644 +#INSTALL_DIR = $(MKDIR_P) -m 755 PROGRAMS = samtools @@ -60,7 +60,6 @@ BUILT_MISC_PROGRAMS = \ misc/md5fa misc/md5sum-lite misc/wgsim MISC_PROGRAMS = \ - $(BUILT_MISC_PROGRAMS) \ misc/blast2sam.pl misc/bowtie2sam.pl misc/export2sam.pl \ misc/interpolate_sam.pl misc/novo2sam.pl \ misc/plot-bamstats misc/psl2sam.pl \ @@ -81,9 +80,9 @@ BUILT_TEST_PROGRAMS = \ all: $(PROGRAMS) $(BUILT_MISC_PROGRAMS) $(BUILT_TEST_PROGRAMS) # TODO Use configure or htslib.pc to add -rdynamic/-ldl conditionally -ALL_CPPFLAGS = $(DFLAGS) -I. $(HTSLIB_CPPFLAGS) $(CPPFLAGS) +ALL_CPPFLAGS = -I. $(HTSLIB_CPPFLAGS) $(CPPFLAGS) ALL_LDFLAGS = -rdynamic $(HTSLIB_LDFLAGS) $(LDFLAGS) -ALL_LIBS = -lz -ldl $(LIBS) +ALL_LIBS = -lz $(LIBS) # Usually config.mk and config.h are generated by running configure # or config.status, but if those aren't used create defaults here. @@ -280,8 +279,10 @@ misc/maq2sam-long.o: misc/maq2sam.c install: $(PROGRAMS) $(BUILT_MISC_PROGRAMS) - $(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) - $(INSTALL_PROGRAM) $(PROGRAMS) $(MISC_PROGRAMS) $(DESTDIR)$(bindir) + $(INSTALL_DIR) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir)/samtools_misc $(DESTDIR)$(man1dir) + $(INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) $(BUILT_MISC_PROGRAMS) $(DESTDIR)$(bindir)/samtools_misc + $(INSTALL_SCRIPT) $(MISC_PROGRAMS) $(DESTDIR)$(bindir)/samtools_misc $(INSTALL_DATA) samtools.1 misc/wgsim.1 $(DESTDIR)$(man1dir)