Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 532)
+++ trunk/MagicSoft/Mars/Changelog	(revision 543)
@@ -1,7 +1,29 @@
                                                                -*-*- END -*-*-
+
+ 2000/01/17: Thomas Bretz
+ 
+ * Makefile:
+    - Exchanged explicit rules to make library by implicit ones
+    - The shared object works now. I exchanged the libraries with the object files.
+      But I don't know why the libraries don't work.
+      
+ * Makefile.conf.linux-gnu:
+    - replaced CC with gcc (instead of g++)
+    
+ * mdatacheck/DataCheckLinkDef.h:
+    - removed unused statements
+    
+ * mraw/RawLinkDef.h:
+    - added globals
+    
+ * mraw/MerppLinkDef.h:
+    - removed unused file
+ 
+ 
  2000/01/12: Thomas Bretz
  
  * MLinkDef.h, MIncl.h, marslogo.xpm, magiclogo.xpm:
     - added
+    
  * LinkDef.h:
     - removed
@@ -27,18 +49,18 @@
  2001/01/11: Harald Kornmayer
 
- * ./: 
+ * ./
    readraw.cc, Makefile, Makefile.rules, LinkDef.h, MParList.cc, MReadTree.cc, 
    MReadTree.h, mbase/Makefile, mraw/Makefile	   
     - small changes in this files. Not really critical. 
 
-   mars.cc 
+ * mars.cc 
     - added the main file for the gui
 
-   mgui/
+ * mgui/
    GuiIncl.h, MGMarsMain.cc, GuiLinkDef.h, MGMarsMain.h, MGDataCheckMain.cc,
    Makefile, MGDataCheckMain.h
     - added the subdir mgui and this files 
 
-   mdatacheck/
+ * mdatacheck/
    DataCheckIncl.h, DataCheckLinkDef.h, MHistosAdc.cc, MHistosAdc.h, 
    MDumpEvtHeader.cc, MDumpEvtHeader.h, MShowSpect.cc, MShowSpect.h,
Index: trunk/MagicSoft/Mars/Makefile
===================================================================
--- trunk/MagicSoft/Mars/Makefile	(revision 532)
+++ trunk/MagicSoft/Mars/Makefile	(revision 543)
@@ -18,7 +18,5 @@
 include Makefile.conf.general
 
-# @endcode 
-
-# @code 
+#
 
 PROGRAMS = merpp readraw mars
@@ -30,15 +28,19 @@
 #
 #    WARNING: the result (whether the linkage works or not) depends on the
-#             order of the libraries
+#             order of the libraries. It seems, that the most base library
+#             must be the last one
 #
-#
-INCLUDES = -I. -Imgui -Imbase -Imraw -Imdatacheck
 
 #
 #  ----->>>   mars libraries
 #
+SUBDIRS = mgui mdatacheck mbase mraw
 
-MARS_LIB = -Llib -lmgui -lmdatacheck -lmraw -lmbase 
-MARS_LIBB = libmbase.a libmgui.a libmraw.a libmdatacheck.a
+#
+# Library rules
+#
+MARS_LIB  = -Llib $(SUBDIRS:%=-l%)
+MARS_LIBB = $(SUBDIRS:%=lib%.a)
+INCLUDES  = -I. $(SUBDIRS:%=-I%)
 
 
@@ -46,5 +48,4 @@
 
 .SUFFIXES: .c .cc .h .o 
-
 
 SRCFILES = 
@@ -63,25 +64,13 @@
 	$(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) MCint.o $(ROOTGLIBS) -o $@
 
-$(SOLIB): $(MARS_LIBB) $(OBJS) MCint.o
+$(SOLIB): $(OBJS) $(MARS_LIBB) MCint.o
 	@echo " Linking $(SOLIB) ..."
-	$(CXX) $(CXXFLAGS) -shared  $(OBJS2) $(OBJS) $(MARS_LIB) MCint.o $(ROOTLIBS) $(ROOTGLIBS) -o $@
+	$(CXX) -shared $(CXXFLAGS) $(SUBDIRS:%=%/*.o) $(ROOTGLIBS) -o $@
 	mv mars.so lib
 
-libmbase.a:
-	@echo " Creating libmbase.a:"
-	(cd mbase; make; cd ..; mv mbase/libmbase.a lib) 
+$(MARS_LIBB):
+	@echo " Creating $@:"
+	(cd $(@:lib%.a=%); make; cd ..; mv $(@:lib%.a=%)/$@ lib) 
 
-libmraw.a:
-	@echo " Creating libmraw.a:"
-	(cd mraw; make; cd ..; mv mraw/libmraw.a lib) 
-
-libmgui.a:
-	@echo " Creating libmgui.a:"
-	(cd mgui; make; cd ..; mv mgui/libmgui.a lib) 
-
-libmdatacheck.a:
-	@echo " Creating libmdatacheck.a:"
-	(cd mdatacheck; make; cd ..; mv mdatacheck/libmdatacheck.a lib) 
-        
 dox:
 	@echo " Creating html documentation:"
Index: trunk/MagicSoft/Mars/Makefile.conf.linux-gnu
===================================================================
--- trunk/MagicSoft/Mars/Makefile.conf.linux-gnu	(revision 532)
+++ trunk/MagicSoft/Mars/Makefile.conf.linux-gnu	(revision 543)
@@ -10,16 +10,7 @@
 # @code
 
-#
-#  ----->>>  includes
-#
-
-INCLUDE_ROOT    = ${ROOTSYS}/include
-INCLUDE_CPLUS   = /usr/include/g++
-INCLUDE_MBASE   = ./mbase
-
-
 # compilers
 
-CC            = g++
+CC            = gcc
 CXX           = g++
 F77           = f77
@@ -34,5 +25,5 @@
 # uncomment this for quiet compilation
 
-.SILENT:
+#.SILENT:
 
 # @endcode
