Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 4019)
+++ trunk/MagicSoft/Mars/Changelog	(revision 4020)
@@ -18,4 +18,19 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2004/05/09: Thomas Bretz
+
+   * Makefile:
+     - added workaround for Mac to create so- and dynlib-object
+
+   * Makefile.conf.darwin:
+     - added necessary option to create both kind of files
+
+   * Makefile.conf.linux:
+     - changed the options to create so-object only
+
+   * Makefile.rules:
+     - added DYLIB to rmbin
+
+
 
  2004/05/08: Thomas Bretz
Index: trunk/MagicSoft/Mars/Makefile
===================================================================
--- trunk/MagicSoft/Mars/Makefile	(revision 4019)
+++ trunk/MagicSoft/Mars/Makefile	(revision 4020)
@@ -97,9 +97,15 @@
 $(SOLIB): $(LIBRARIES) $(OBJS) $(HEADERS)
 	@echo " Linking $(SOLIB) ..."
-	$(CXX) $(CXXFLAGS) $(DYNLIB) $(OBJS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
+	$(CXX) $(CXXFLAGS) $(SOFLAG) $(OBJS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
 
-$(PROGRAMS): $(SOLIB) $(PROGRAMS:=.o)
+# This is a special workaround to create the shared object (bundle, plugin)
+# for root and the dynlib (to be linked with the executable) on Mac OSX
+$(DYLIB): $(LIBRARIES) $(OBJS) $(HEADERS)
+	@echo " Linking $(DYLIB) ..."
+	$(CXX) $(CXXFLAGS) $(DYFLAG) $(OBJS) $(SUBDIRS:=/*.o) $(ROOTGLIBS) -o $@
+
+$(PROGRAMS): $(DYLIB) $(PROGRAMS:=.o)
 	@echo " Linking $@ ..." 
-	$(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(SOLIB) $@.o $(MARS_LIB) -o $@
+	$(CXX) $(CXXFLAGS) $(ROOTGLIBS) $(DYLIB) $@.o $(MARS_LIB) -o $@
 
 dox: $(SOLIB)
Index: trunk/MagicSoft/Mars/Makefile.conf.darwin
===================================================================
--- trunk/MagicSoft/Mars/Makefile.conf.darwin	(revision 4019)
+++ trunk/MagicSoft/Mars/Makefile.conf.darwin	(revision 4020)
@@ -24,5 +24,11 @@
 DEBUG    = 
 ARCHDEF  = -D__LINUX__
-DYNLIB   = -dynamiclib
+
+# For Mac OSX we need to kind of shared objects. One which can be plugged
+# into root (bundle) and one which can be linked to the executables (dynlib)
+SOFLAG   = -bundle
+DYFLAG   = -dynamiclib
+
+DYLIB    = $(SOLIB:.so=.dylib)
 
 # For debugging information use '-g'
@@ -35,5 +41,5 @@
 # uncomment this for quiet compilation
 
-.SILENT:
+#.SILENT:
 
 # @endcode
Index: trunk/MagicSoft/Mars/Makefile.conf.general
===================================================================
--- trunk/MagicSoft/Mars/Makefile.conf.general	(revision 4019)
+++ trunk/MagicSoft/Mars/Makefile.conf.general	(revision 4020)
@@ -18,10 +18,10 @@
 #   export MARSLIBS="-lX11 -lXpm -L/usr/X11R6/lib"
 #
-DEFINES	  = -DMARSVER=\"\<cvs\>\" -D__MARS__ -DROOTVER=\"$(ROOTVER)\" $(ARCHDEF) $(MARSDEFINES)
+DEFINES	 = -DMARSVER=\"\<cvs\>\" -D__MARS__ -DROOTVER=\"$(ROOTVER)\" $(ARCHDEF) $(MARSDEFINES)
 
-CXXFLAGS  = $(ROOTCFLAGS) $(INCLUDES) $(OPTIM) $(DEBUG) $(DEFINES)
-CFLAGS    = $(CXXFLAGS) $(MARSFLAGS)
-FFLAGS    = $(CXXFLAGS)
+CXXFLAGS = $(ROOTCFLAGS) $(INCLUDES) $(OPTIM) $(DEBUG) $(DEFINES)
+CFLAGS   = $(CXXFLAGS) $(MARSFLAGS)
+FFLAGS   = $(CXXFLAGS)
 
-HEADERS = $($(subst .cxx,.cc,SRCFILES):.cc=.h)
-OBJS    = $($(subst .cxx,.cc,SRCFILES):.cc=.o) $(CINT)Cint.o
+HEADERS  = $($(subst .cxx,.cc,SRCFILES):.cc=.h)
+OBJS     = $($(subst .cxx,.cc,SRCFILES):.cc=.o) $(CINT)Cint.o
Index: trunk/MagicSoft/Mars/Makefile.conf.linux
===================================================================
--- trunk/MagicSoft/Mars/Makefile.conf.linux	(revision 4019)
+++ trunk/MagicSoft/Mars/Makefile.conf.linux	(revision 4020)
@@ -21,5 +21,7 @@
 DEBUG    = 
 ARCHDEF  = -D__LINUX__
-DYNLIB   = -shared
+SOFLAG   = -shared
+
+DYLIB    = $(SOLIB)
 
 # For debugging information use '-g'
Index: trunk/MagicSoft/Mars/Makefile.rules
===================================================================
--- trunk/MagicSoft/Mars/Makefile.rules	(revision 4019)
+++ trunk/MagicSoft/Mars/Makefile.rules	(revision 4020)
@@ -68,5 +68,5 @@
 rmbin:	
 	@echo " Removing binary files..."
-	@rm -f $(PROGRAMS) $(SOLIB) so_locations
+	@rm -f $(PROGRAMS) $(SOLIB) $(DYLIB) so_locations
 
 rmbak:
