]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/Makefile
Fixes for the creation of PAR files on Mac (Chiara, Gerri)
[u/mrichter/AliRoot.git] / PWG2 / Makefile
index 4d4bd4ad6b21e9a6585604db2c3bdfe5eb8695b9..cde7580bc5c7c83c7451043a3ba3b98961f0c581 100644 (file)
@@ -124,10 +124,27 @@ PARFILE       = $(PACKAGE).par
 lib$(PACKAGE).so: $(OBJS_PWG2)
        @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"