Changes needed on Mac (F.Carminati)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Dec 2004 10:24:07 +0000 (10:24 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 Dec 2004 10:24:07 +0000 (10:24 +0000)
PDF/libpdf.pkg
STEER/AliRun.cxx
STEER/libSTEER.pkg
TPC/AliTPCTrackHitsInterfaces.cxx [new file with mode: 0644]
TPC/AliTPCTrackHitsInterfaces.h
TPC/libTPCbase.pkg

index fe5a780..1ecef8b 100644 (file)
@@ -10,7 +10,6 @@ spdf/afgin2.F \
 spdf/afgint.F \
 spdf/afpolin.F \
 spdf/afratin.F \
-spdf/alphas2.F \
 spdf/augetfv.F \
 spdf/aurgam.F \
 spdf/aurpi1.F \
@@ -145,8 +144,6 @@ spdf/mrseb.F \
 spdf/mrsebp.F \
 spdf/newdo1.F \
 spdf/pdf_beta.F \
-spdf/pdfset.F \
-spdf/pdfsta.F \
 spdf/pdfvers.F \
 spdf/pdxmt.F \
 spdf/pdzxmt.F \
@@ -369,8 +366,6 @@ spdf/strucb.F \
 spdf/struce.F \
 spdf/strucor.F \
 spdf/structf.F \
-spdf/structm.F \
-spdf/structp.F \
 spdf/v3.F \
 spdf/valdis.F \
 spdf/wate32.F \
@@ -388,8 +383,41 @@ spdf/whit6g.F \
 spdf/whit6q.F \
 npdf/eks98.F \
 npdf/eksarp.F \
-npdf/sfeks98.F \
-npdf/structa.F 
+npdf/sfeks98.F 
+
+ifeq (,$(findstring macosx,$(ALICE_TARGET)))
+
+FSRCS+=npdf/structa.F \
+spdf/alphas2.F \
+spdf/pdfset.F \
+spdf/pdfsta.F \
+spdf/structm.F \
+spdf/structp.F
+
+else
+
+FSRCS+=commons.F
+
+TCSRCS=ctmp/npdf/structa.c ctmp/spdf/alphas2.c ctmp/spdf/pdfset.c ctmp/spdf/pdfsta.c \
+ctmp/spdf/structm.c ctmp/spdf/structp.c
+
+CSRCS+=$(TCSRCS)
+
+.SECONDARY: $(TCSRCS)
+
+PDF/ctmp/%.c: PDF/%.F
+       [ -d $(dir $@) ] || mkdir -p $(dir $@)
+ifeq (macosx,$(ALICE_TARGET))
+       $(F77) -E $(pdfINC) $(pdfFFLAGS) $< | f2c -E | sed -e 's/\([0-9,a-z]*_[0-9,a-z]*\)__/\1_/g' > $@
+endif
+ifeq (macosxxlc,$(ALICE_TARGET))
+       $(F77) -d $(pdfINC) -c -o /dev/null $(pdfFFLAGS) $< ; \
+       tmpf=F`basename $@ .c`.f ; export tmpf ; \
+       cat $$tmpf | f2c -E | sed -e 's/\([0-9,a-z]*_[0-9,a-z]*\)__/\1_/g' > $@ ; \
+       rm -f $$tmpf
+endif
+
+endif
 
 PACKFFLAGS := $(FFLAGS) -IPDF/pdf
 
index c2cbff5..8b3bb4e 100644 (file)
 #include "AliPDG.h"
 #include "AliRun.h"
 #include "AliStack.h"
+#ifdef __APPLE__
+#include "AliTPCTrackHitsInterfaces.h"
+#endif
 
 AliRun *gAlice;
 
-
 ClassImp(AliRun)
 
 //_______________________________________________________________________
@@ -171,6 +173,14 @@ AliRun::AliRun(const char *name, const char *title):
   // Add particle list to configuration
   AliConfig::Instance()->Add(fPDGDB); 
 
+#ifdef __APPLE__
+  // Terrible hack to avoid problem with the initialisation of 
+  // static and globals on Mac OS X 
+  AliClassAliTrackHitsInfo p1=galiclass____AliClassAliTrackHitsInfo;
+  AliClassAliTrackHitsParam p2=galiclass____AliTrackHitsParam;
+  AliClassAliHitInfo p3=galiclass____AliHitInfo;
+#endif
+
 }
 
 
index 25884d6..3e1f36f 100644 (file)
@@ -27,6 +27,9 @@ HDRS:= $(SRCS:.cxx=.h)
 DHDR= STEERLinkDef.h
 
 EINCLUDE:=$(ALICE)/geant3/TGeant3 RAW
+#ifeq (macosx,$(ALICE_TARGET))
+EINCLUDE+=TPC CONTAINERS
+#endif
 
 EXPORT:=$(SRCS:.cxx=.h) AliConst.h AliCallf77.h
 
diff --git a/TPC/AliTPCTrackHitsInterfaces.cxx b/TPC/AliTPCTrackHitsInterfaces.cxx
new file mode 100644 (file)
index 0000000..349dbf1
--- /dev/null
@@ -0,0 +1,27 @@
+#include <stdio.h>
+#ifdef __APPLE__
+
+#include "AliTPCTrackHitsInterfaces.h"
+
+
+AliClassAliTrackHitsInfo & g_AliClassAliTrackHitsInfo()
+{
+  static AliClassAliTrackHitsInfo p;
+  //  printf("AliClassAliTrackHitsInfo\n");
+  return p;
+}
+
+AliClassAliTrackHitsParam & g_AliTrackHitsParam()
+{
+  static AliClassAliTrackHitsParam p;
+  //  printf("AliClassAliTrackHitsParam\n");
+  return p;
+}
+
+AliClassAliHitInfo & g_AliHitInfo()
+{
+  static AliClassAliHitInfo p;
+  //  printf("AliClassAliHitInfo\n");
+  return p;
+}
+#endif
index 1bc2482..4e00296 100644 (file)
@@ -40,7 +40,13 @@ public:
        }
          void ObjectDump(void *p) {((AliTrackHitsInfo*)p)->Dump();}
 };
+
+#ifndef __APPLE__
 AliClassAliTrackHitsInfo galiclass____AliTrackHitsInfo; 
+#else
+#define galiclass____AliClassAliTrackHitsInfo g_AliClassAliTrackHitsInfo()
+AliClassAliTrackHitsInfo & g_AliClassAliTrackHitsInfo();
+#endif
 
 /************************************************/
 /* Automaticaly generated interface for class     
@@ -76,7 +82,13 @@ public:
        }
          void ObjectDump(void *p) {((AliTrackHitsParam*)p)->Dump();}
 };
+
+#ifndef __APPLE__
 AliClassAliTrackHitsParam galiclass____AliTrackHitsParam; 
+#else
+#define galiclass____AliTrackHitsParam g_AliTrackHitsParam()
+AliClassAliTrackHitsParam & g_AliTrackHitsParam();
+#endif
 
 /************************************************/
 /* Automaticaly generated interface for class     
@@ -112,4 +124,10 @@ public:
        }
          void ObjectDump(void *p) {((AliHitInfo*)p)->Dump();}
 };
+
+#ifndef __APPLE__
 AliClassAliHitInfo galiclass____AliHitInfo; 
+#else
+#define galiclass____AliHitInfo g_AliHitInfo()
+AliClassAliHitInfo & g_AliHitInfo();
+#endif
index b9eec91..a7d1420 100644 (file)
@@ -3,7 +3,9 @@ SRCS:=  AliTPCLoader.cxx \
         AliDetectorParam.cxx AliTPCParam.cxx \
         AliTPCParamSR.cxx AliTPCParamCR.cxx \
         AliTPCdigit.cxx \
-        AliSimDigits.cxx AliDigitsArray.cxx AliTPCDigitsArray.cxx
+        AliSimDigits.cxx AliDigitsArray.cxx AliTPCDigitsArray.cxx \
+        AliTPCTrackHitsInterfaces.cxx
+
        
 
 HDRS:= $(SRCS:.cxx=.h)