rendered paste body#
# Invoking this makefile with JOB set will pass that as the item to make onto
# all sublevel makefiles. eg "gmake JOB=clean".
#
include system.mk
DIRS = Misc\
tk_utils\
text_utils\
seq_utils\
mutlib\
abi\
alf\
g\
trev\
primer3\
primer3/src\
gap4\
prefinish\
haplo\
eba\
init_exp\
get_scf_field\
spin\
vector_clip\
tracediff\
screen_seq\
qclip\
polyA_clip\
stops\
pregap4\
make_weights\
find_renz\
spin_emboss\
copy_reads\
hetins\
mutscan\
convert\
tgap\
gap5\
scripts\
data
JOB = all
all: $(DIRS)
clean:
$(MAKE) $(FLAGS) JOB=clean
%.clean:
$(MAKE) $* $(FLAGS) JOB=clean
spotless:
$(MAKE) $(FLAGS) JOB=spotless
relink:
$(MAKE) $(FLAGS) JOB=relink
%.relink:
$(MAKE) $* $(FLAGS) JOB=relink
depend:
$(MAKE) $(FLAGS) JOB=depend
%.depend:
$(MAKE) $* $(FLAGS) JOB=depend
# Installs newly built executables into $STADENROOT/$(MACHINE)-bin
# FIXME:
install:
-mkdir -p $(INSTALLLIB)
-mkdir -p $(INSTALLBIN)
-mkdir -p $(INSTALLETC)
-mkdir -p $(INSTALLSHARE)
-mkdir -p $(INSTALLSCRIPTS)
-mkdir -p $(INSTALLTCL)
-mkdir -p $(INSTALLDOC)
-mkdir -p $(INSTALLMAN)
cp shlib.conf $(INSTALLETC)
cp ./staden.profile $(INSTALLSHARE)
$(MAKE) $(FLAGS) JOB=install
.PHONY: distcommon distwindows distunix
# Full source is available now, so we no longer need to copy any of this
# when building a binary distribution.
# Make install does most of the work, but this doesn't install the third
# party libraries. So we'll do that here. NOTE: this only installs the
# binary components. The tcl/itcl files are already in the ../lib directory
# and will be copied over separately. This is because in some cases they will
# have been manually hacked/bug fixed.
distunix:
-mkdir $(DIST)/lib/$(MACHINE)-binaries
-cp -R lib/$(MACHINE)-binaries/libpng* $(DIST)/lib/$(MACHINE)-binaries
-cp -R lib/$(MACHINE)-binaries/libtcl* $(DIST)/lib/$(MACHINE)-binaries
-cp -R lib/$(MACHINE)-binaries/libtk* $(DIST)/lib/$(MACHINE)-binaries
-cp -R lib/$(MACHINE)-binaries/libitcl* $(DIST)/lib/$(MACHINE)-binaries
-cp -R lib/$(MACHINE)-binaries/libitk* $(DIST)/lib/$(MACHINE)-binaries
distwindows:
-mkdir $(DIST)/lib/windows-binaries
-cp lib/windows-binaries/* $(DIST)/lib/windows-binaries
-cp windows/run/sprun.exe $(DIST)/windows-bin/
-cp windows/run/sprun.exe $(DIST)/windows-bin/gap.exe
-cp windows/run/sprun.exe $(DIST)/windows-bin/pregap4.exe
-cp windows/run/sprun.exe $(DIST)/windows-bin/spin.exe
-cp windows/run/sprun.exe $(DIST)/windows-bin/trev.exe
-cp tk8.4.6/win/wish84.exe $(DIST)/windows-bin/wish.exe
#-cp trev/trev.bat $(DIST)/windows-bin
#-cp gap4/gap4.bat $(DIST)/windows-bin
#-cp spin/spin.bat $(DIST)/windows-bin
#-cp pregap4/pregap4.bat $(DIST)/windows-bin
-cp ../windows-bin/*.exe $(DIST)/windows-bin
$(MAKE) STADENROOT=$(DIST) MACHINE=windows install
-rm $(DIST)/windows-bin/gap4
-rm $(DIST)/windows-bin/spin
-rm $(DIST)/windows-bin/trev
-rm $(DIST)/windows-bin/pregap4
-rm $(DIST)/windows-bin/assemble4
-rm $(DIST)/windows-bin/finish_sanger
DS=staden-2.0.0b6-src
S=$(SRCROOT)
distsrc:
#
# General souce. Works best from a clean svn checkout.
-mkdir $(DS)
cp $(S)/configure $(S)/*.in $(S)/bootstrap $(S)/README.build \
$(S)/NEWS $(S)/ChangeLog $(S)/global.mk $(S)/staden.profile $(DS)
-mkdir $(DS)/ac_stubs
cp $(S)/ac_stubs/*.m4 $(DS)/ac_stubs
#
# Recurse through sub-directories too
$(MAKE) $(FLAGS) DISTSRC=$(PWD)/$(DS) JOB=distsrc
chmod -R go-w $(DS)
#
# Windows compilation bits
# -mkdir $(S)/windows
# cp -R windows/include $(S)
# -mkdir $(S)/mkdef
# cp -R windows/mkdef/mkdef.* $(S)/mkdef
# -mkdir $(S)/run
# cp -R windows/run/run.* \
# windows/run/main.cpp\
# windows/run/notes.txt\
# windows/run/sprun.rc\
# windows/run/staden.ico\
# $(S)/run
# mkdir $(S)/windows/dumpenv
# cp -R windows/dumpenv/dumpenv.*\
# windows/dumpenv/main.cpp\
# $(S)/windows/dumpenv
# mkdir $(S)/windows/stashmsg
# cp -R windows/stashmsg/stashmsg.*\
# windows/stashmsg/icon1.ico\
# windows/stashmsg/messages.*\
# windows/stashmsg/msg00001.bin\
# windows/stashmsg/resource.h\
# windows/stashmsg/stadenmsg.rc\
# $(S)/windows/stashmsg
# cp -R windows/install-2003 $(S)/windows
$(DIRS): FORCE
@if ! test -f $@/.dir; \
then \
mkdir -p $@; \
cd $@; \
touch .dir; \
fi
cd $@ && $(MAKE) -f $(SRCROOT)/$@/Makefile $(FLAGS) $(MFLAGS) BUILD=$(PWD) SRC=$(SRCROOT)/$@ SUBDIR=$@ $(JOB)
%/: %
#
# dependencies so e.g. make -j4 works.
tk_utils: Misc
text_utils: Misc
seq_utils: Misc text_utils tk_utils
mutlib: Misc seq_utils
abi: Misc
alf: Misc
eba: Misc
get_scf_field: Misc
hetins: Misc
init_exp: Misc
find_renz: seq_utils
make_weights: seq_utils
polyA_clip: seq_utils
qclip: seq_utils
screen_seq: seq_utils
stops: seq_utils
vector_clip: seq_utils
mutscan: mutlib
tracediff: mutlib
spin: seq_utils
g: Misc
gap4: g seq_utils mutlib primer3/src
convert: gap4
copy_reads: gap4
haplo: gap4
prefinish: gap4
tgap: seq_utils
gap5: tgap
FORCE:
# DO NOT DELETE THIS LINE -- make depend depends on it.