]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TTherminator/Makefile
Fixes for the creation of PAR files on Mac (Chiara, Gerri)
[u/mrichter/AliRoot.git] / TTherminator / Makefile
index 5a75d86c12fd95efa60594d50987f22b68f6a705..99788a4d654542a15efaaab8de1554d42e9b7ce7 100644 (file)
@@ -19,8 +19,11 @@ else
 endif
 
 PACKAGE = TTherminator
-include lib$(PACKAGE).pkg
 
+DHDR =
+HDRS =
+SRCS =
+FSRCS =
 DHDR_TTherminator := $(DHDR)
 HDRS_TTherminator := $(HDRS)
 SRCS_TTherminator := $(SRCS) G__$(PACKAGE).cxx
@@ -31,10 +34,27 @@ PARFILE       = $(PACKAGE).par
 lib$(PACKAGE).so: $(OBJS_TTherminator)
        @echo "Linking" $@ ...
        @/bin/rm -f $@
-ifeq ($(ARCH),macosx)
-       @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
+ifeq ($(PLATFORM),macosx)
+# We need to make both the .dylib and the .so
+               $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@
+ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
+ifeq ($(MACOSX_MINOR),4)
+               ln -sf $@ $(subst .$(DllSuf),.so,$@)
 else
-       @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
+               $(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ \
+                  $(OutPutOpt) $(subst .$(DllSuf),.so,$@)
+endif
+endif
+else
+ifeq ($(PLATFORM),win32)
+               bindexplib $* $^ > $*.def
+               lib -nologo -MACHINE:IX86 $^ -def:$*.def \
+                  $(OutPutOpt)$(EVENTLIB)
+               $(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) \
+                  $(OutPutOpt)$@
+else
+               $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
+endif
 endif
        @chmod a+x $@
        @echo "done"