Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 2484)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 2485)
@@ -22,4 +22,7 @@
    * mhist/Makefile, mhist/HistLinkDef.h:
      - added MHEvent
+
+   * Makefile, Makefile.rules:
+     - automatically create dependancies
 
    * NEWS:
Index: /trunk/MagicSoft/Mars/Makefile
===================================================================
--- /trunk/MagicSoft/Mars/Makefile	(revision 2484)
+++ /trunk/MagicSoft/Mars/Makefile	(revision 2485)
@@ -74,4 +74,6 @@
 	@echo " "
 
+include Makefile.depend
+
 # Use $(CXX) -v ... for a more verbose output
 #
@@ -136,6 +138,14 @@
 	@echo "Making tar-file"
 	@root -b -q -l -n tar.C
-#	@tar cvf ../mars.tar --exclude=Root .rootrc *
+#	@tar cvf ../mars.tar --exclude=Root .roo trc *
 #	@gzip -9 ../mars.tar
 
+depend:
+	(! find ./ Makefile.depend -maxdepth 1 -empty 2> /dev/null && \
+	echo " Generating dependancies into Makefile.depend" && \
+	makedepend -- $(INCLUDES) -- $(PROGRAMS:=.cc) $(SRCS) $(SUBDIRS:=/*.cc) -f- 2> /dev/null | grep -v Cint | grep -v "/usr/" > Makefile.depend && \
+	echo " ") || find -maxdepth 0 -true > /dev/null
+
+Makefile.depend: depend
+
 # @endcode
Index: /trunk/MagicSoft/Mars/Makefile.rules
===================================================================
--- /trunk/MagicSoft/Mars/Makefile.rules	(revision 2484)
+++ /trunk/MagicSoft/Mars/Makefile.rules	(revision 2485)
@@ -1,6 +1,2 @@
-
-depend:
-	@makedepend $(SRCS) $(INCLUDES) -I$(INCLUDE_CPLUS) $(ROOTCFLAGS) \
-        -f Makefile.depend 2> kk.kk ; cat kk.kk
 
 $(LIB): $(OBJS) $(HEADERS) $(CINT)Cint.o
@@ -26,4 +22,5 @@
 	@echo " - Compiling" $<
 	$(CC) $(CFLAGS) -c $< -o $@
+
 #
 # The cleaning facility
