
default: all

all: ssa-core-cpp magic

install: magic.install

clean:
	if [ -d magic ]; then (cd magic && make -f Makefile.magic clean); fi
	if [ -d ssa-core-cpp ]; then (cd ssa-core-cpp && make clean); fi
	cd $(REMOVE) && make -f Makefile.simple clean

update:
# get the source code (replace this with SVN interactions)
	tar xvzf ~/magic.tgz
	tar xvzf ~/ssa-core-cpp.tgz
	cp Makefile.magic magic/Makefile.magic

ssa-core-cpp: ssa-core-cpp/build/libSSA.a

ssa-core-cpp/build/libSSA.a:
	if [ -d ssa-core-cpp ]; then (cd ssa-core-cpp && ./configure && make); fi

magic: magic/DetectStreaks

magic/DetectStreaks:
	if [ -d magic ]; then (cd magic && make -f Makefile.magic); fi

magic.install:	ssa-core-cpp
	if [ -d magic ]; then (cd magic && make -f Makefile.magic install); fi

FORCE:
