Index: /branches/eam_branches/20091113/magic/Makefile
===================================================================
--- /branches/eam_branches/20091113/magic/Makefile	(revision 26247)
+++ /branches/eam_branches/20091113/magic/Makefile	(revision 26247)
@@ -0,0 +1,40 @@
+
+default: all
+
+all: ssa-core-cpp magic remove
+
+install: magic.install remove.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
+
+REMOVE = remove/src
+
+remove: FORCE
+	@cd $(REMOVE) && make -f Makefile.simple all
+
+remove.install: remove
+	@cd $(REMOVE) && make -f Makefile.simple install
+
+FORCE:
Index: /branches/eam_branches/20091113/magic/Makefile.in
===================================================================
--- /branches/eam_branches/20091113/magic/Makefile.in	(revision 26246)
+++ /branches/eam_branches/20091113/magic/Makefile.in	(revision 26247)
@@ -32,16 +32,9 @@
 REMOVE = remove/src
 
-REMOVE_PROGRAMS = \
-$(REMOVE)/isdestreaked \
-$(REMOVE)/streakscompare \
-$(REMOVE)/streaksrelease \
-$(REMOVE)/streaksremove \
-$(REMOVE)/streaksreplace 
-
-remove: $(REMOVE_PROGRAMS)
-
- $(REMOVE_PROGRAMS):
+remove: FORCE
 	@cd $(REMOVE) && make -f Makefile.simple all
 
 remove.install: remove
 	@cd $(REMOVE) && make -f Makefile.simple install
+
+FORCE:
Index: /branches/eam_branches/20091113/magic/configure.tcsh
===================================================================
--- /branches/eam_branches/20091113/magic/configure.tcsh	(revision 26246)
+++ /branches/eam_branches/20091113/magic/configure.tcsh	(revision 26247)
@@ -105,8 +105,10 @@
 echo 
 
-# the config.tools fixconf operations below interpolate values in Makefile
-if (-e Makefile) mv Makefile Makefile.bak
-cp -f Makefile.in Makefile
+# we do not actually need to modify the Makefile
 
+#  # the config.tools fixconf operations below interpolate values in Makefile
+#  if (-e Makefile) mv Makefile Makefile.bak
+#  cp -f Makefile.in Makefile
+#  
 # BINDIR holds the output binary files
 if ("$bindir" == "") then
@@ -115,14 +117,15 @@
 endif
 set bindir = `./config.tools fixpath $bindir`
-./config.tools fixconf @BINDIR@ $bindir
-echo BINDIR $bindir
 
-# MANDIR (DESTMAN) holds the output man pages
-if ("$mandir" == "") then
-  set mandir = $prefix/man
-endif
-set mandir = `./config.tools fixpath $mandir`
-./config.tools fixconf @MANDIR@ $mandir
-echo DESTMAN $mandir
+#  ./config.tools fixconf @BINDIR@ $bindir
+#  echo BINDIR $bindir
+#  
+#  # MANDIR (DESTMAN) holds the output man pages
+#  if ("$mandir" == "") then
+#    set mandir = $prefix/man
+#  endif
+#  set mandir = `./config.tools fixpath $mandir`
+#  ./config.tools fixconf @MANDIR@ $mandir
+#  echo DESTMAN $mandir
 
 echo ""
Index: /branches/eam_branches/20091113/magic/remove/src/Makefile.simple
===================================================================
--- /branches/eam_branches/20091113/magic/remove/src/Makefile.simple	(revision 26246)
+++ /branches/eam_branches/20091113/magic/remove/src/Makefile.simple	(revision 26247)
@@ -10,5 +10,4 @@
 
 REMOVE_OBJECTS=    \
-    ${COMMON_OBJECTS} \
     streaksremove.o \
     streaksextern.o \
@@ -17,17 +16,13 @@
 
 REPLACE_OBJECTS=      \
-    ${COMMON_OBJECTS} \
     streaksreplace.o
 
 COMPARE_OBJECTS=      \
-    ${COMMON_OBJECTS} \
     streakscompare.o
 
 RELEASE_OBJECTS=      \
-    ${COMMON_OBJECTS} \
     streaksrelease.o
 
 ISDESTREAKED_OBJECTS=      \
-    ${COMMON_OBJECTS} \
     isdestreaked.o
 
@@ -45,16 +40,27 @@
 HEADERS=Line.h streaksastrom.h streaksextern.h streaksio.h streaksremove.h
 
-all:	${PROGRAMS}
+all: ${PROGRAMS}
 
-${REMOVE_OBJECTS}:	${HEADERS}
-streaksremove:  ${REMOVE_OBJECTS}
+# programs all depend on the common objects and the common headers
+PROGRAM_OBJECTS = \
+ ${REMOVE_OBJECTS} \
+ ${REPLACE_OBJECTS} \
+ ${COMPARE_OBJECTS} \
+ ${RELEASE_OBJECTS} \
+ ${ISDESTREAKED_OBJECTS}
 
-streaksreplace:  ${REPLACE_OBJECTS}
+${COMMON_OBJECTS}: ${HEADERS}
 
-streakscompare:  ${COMPARE_OBJECTS}
+${PROGRAM_OBJECTS}: ${HEADERS} ${COMMON_OBJECTS}
 
-streaksrelease:  ${RELEASE_OBJECTS}
+streaksremove:  ${REMOVE_OBJECTS} ${COMMON_OBJECTS}
 
-isdestreaked:	${ISDESTREAKED_OBJECTS}
+streaksreplace:  ${REPLACE_OBJECTS} ${COMMON_OBJECTS}
+
+streakscompare:  ${COMPARE_OBJECTS} ${COMMON_OBJECTS}
+
+streaksrelease:  ${RELEASE_OBJECTS} ${COMMON_OBJECTS}
+
+isdestreaked:	${ISDESTREAKED_OBJECTS} ${COMMON_OBJECTS}
 
 
