Files necessary to create par files from EMCAL libraries
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 29 Aug 2009 13:47:24 +0000 (13:47 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 29 Aug 2009 13:47:24 +0000 (13:47 +0000)
EMCAL/Makefile [new file with mode: 0644]
EMCAL/PROOF-INF.EMCALUtils/BUILD.sh [new file with mode: 0755]
EMCAL/PROOF-INF.EMCALUtils/SETUP.C [new file with mode: 0644]
EMCAL/PROOF-INF.EMCALbase/BUILD.sh [new file with mode: 0755]
EMCAL/PROOF-INF.EMCALbase/SETUP.C [new file with mode: 0644]
EMCAL/PROOF-INF.EMCALrec/BUILD.sh [new file with mode: 0755]
EMCAL/PROOF-INF.EMCALrec/SETUP.C [new file with mode: 0644]
EMCAL/PROOF-INF.EMCALsim/BUILD.sh [new file with mode: 0755]
EMCAL/PROOF-INF.EMCALsim/SETUP.C [new file with mode: 0644]

diff --git a/EMCAL/Makefile b/EMCAL/Makefile
new file mode 100644 (file)
index 0000000..06a0d63
--- /dev/null
@@ -0,0 +1,111 @@
+# $Id: Makefile 33076 2009-06-19 16:40:17Z akisiel $
+
+include $(ROOTSYS)/test/Makefile.arch
+
+PACKAGE = EMCAL
+
+default-target: lib$(PACKAGE).so 
+
+ALICEINC      = -I.
+
+### define include dir for local case and par case
+
+ifneq ($(EMCALUtils_INCLUDE),)
+  ALICEINC += -I../$(EMCALUtils_INCLUDE)
+endif
+
+ifneq ($(EMCALbase_INCLUDE),)
+  ALICEINC += -I../$(EMCALbase_INCLUDE)
+endif
+
+ifneq ($(EMCALsim_INCLUDE),)
+  ALICEINC += -I../$(EMCALsim_INCLUDE)
+endif
+
+ifneq ($(EMCALrec_INCLUDE),)
+  ALICEINC += -I../$(EMCALrec_INCLUDE)
+endif
+
+# only if no par file was loaded before
+ifeq ($(ALICEINC),-I.)
+  ifneq ($(ALICE_ROOT),)
+    ALICEINC += -I$(ALICE_ROOT)/include
+    ALICEINC += -I$(ALICE_ROOT)/STEER
+    ALICEINC += -I$(ALICE_ROOT)/RAW
+    ALICEINC += -I$(ALICE_ROOT)/EMCAL
+  endif
+endif
+
+
+CXXFLAGS     += $(ALICEINC) -g
+F77FLAGS     += $(ALICEINC) -g -fPIC
+
+
+include lib$(PACKAGE).pkg
+
+DHDR_EMCAL := $(DHDR)
+HDRS_EMCAL := $(HDRS)
+SRCS_EMCAL := $(SRCS) G__$(PACKAGE).cxx
+FSCRS_EMCAL := $(FSRCS)
+OBJS_EMCAL := $(SRCS_EMCAL:.cxx=.o) $(FSRCS:.F=.o)
+
+PARFILE       = $(PACKAGE).par
+
+lib$(PACKAGE).so: $(OBJS_EMCAL)
+       @echo "Linking" $@ ...
+       @/bin/rm -f $@
+ifeq ($(ARCH),macosx)
+       @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ -o $@
+else
+       @$(LD) $(SOFLAGS) $(LDFLAGS) $^ -o $@
+endif
+       @chmod a+x $@
+       @echo "done"
+
+%.o:    %.cxx %.h
+       $(CXX) $(CXXFLAGS) -c $< -o $@
+
+%.o:    %.F
+       $(F77) $(F77FLAGS) -c $< -o $@
+
+G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS_EMCAL) $(DHDR_EMCAL)
+       @echo "Generating dictionary ..."
+       rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
+
+clean:
+       @rm -f $(OBJS_EMCAL) *.so G__$(PACKAGE).* $(PARFILE)
+
+### CREATE PAR FILE
+
+$(PARFILE): $(patsubst %,$(PACKAGE)/%,$(filter-out G__%, $(HDRS_EMCAL) $(SRCS_EMCAL) $(DHDR_EMCAL) Makefile Makefile.arch lib$(PACKAGE).pkg PROOF-INF))
+       @echo "Creating archive" $@ ...
+       @tar cfzh $@ $(PACKAGE)
+       @rm -rf $(PACKAGE)
+       @echo "done"
+
+$(PACKAGE)/Makefile: Makefile #.$(PACKAGE)
+       @echo Copying $< to $@ with transformations
+       @[ -d $(dir $@) ] || mkdir -p $(dir $@)
+       @sed 's/include \$$(ROOTSYS)\/test\/Makefile.arch/include Makefile.arch/' < $^ > $@
+
+$(PACKAGE)/Makefile.arch: $(ROOTSYS)/test/Makefile.arch
+       @echo Copying $< to $@
+       @[ -d $(dir $@) ] || mkdir -p $(dir $@)
+       @cp -a $^ $@
+
+$(PACKAGE)/PROOF-INF: PROOF-INF.$(PACKAGE)
+       @echo Copying $< to $@
+       @[ -d $(dir $@) ] || mkdir -p $(dir $@)
+       @cp -a -r $^ $@
+
+$(PACKAGE)/%: %
+       @echo Copying $< to $@
+       @[ -d $(dir $@) ] || mkdir -p $(dir $@)
+       @cp -a $< $@
+
+test-%.par: %.par
+       @echo "INFO: The file $< is now tested, in case of an error check in par-tmp."
+       @mkdir -p par-tmp
+       @cd par-tmp; tar xfz ../$<;     cd $(subst .par,,$<); PROOF-INF/BUILD.sh
+       @rm -rf par-tmp
+       @echo "INFO: Testing succeeded (already cleaned up)"
diff --git a/EMCAL/PROOF-INF.EMCALUtils/BUILD.sh b/EMCAL/PROOF-INF.EMCALUtils/BUILD.sh
new file mode 100755 (executable)
index 0000000..fc9490a
--- /dev/null
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+make 
diff --git a/EMCAL/PROOF-INF.EMCALUtils/SETUP.C b/EMCAL/PROOF-INF.EMCALUtils/SETUP.C
new file mode 100644 (file)
index 0000000..71a477b
--- /dev/null
@@ -0,0 +1,13 @@
+void SETUP()
+{
+
+   // Load library
+   gSystem->Load("libEMCALUtils");
+
+   // Set the Include paths
+//   gSystem->SetIncludePath("-I$ROOTSYS/include -IEMCAL");
+   gROOT->ProcessLine(".include EMCALUtils");
+
+   // Set our location, so that other packages can find us
+   gSystem->Setenv("EMCALUtils_INCLUDE", "EMCALUtils");
+}
diff --git a/EMCAL/PROOF-INF.EMCALbase/BUILD.sh b/EMCAL/PROOF-INF.EMCALbase/BUILD.sh
new file mode 100755 (executable)
index 0000000..fc9490a
--- /dev/null
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+make 
diff --git a/EMCAL/PROOF-INF.EMCALbase/SETUP.C b/EMCAL/PROOF-INF.EMCALbase/SETUP.C
new file mode 100644 (file)
index 0000000..469ca77
--- /dev/null
@@ -0,0 +1,13 @@
+void SETUP()
+{
+
+   // Load library
+   gSystem->Load("libEMCALbase");
+
+   // Set the Include paths
+//   gSystem->SetIncludePath("-I$ROOTSYS/include -IEMCAL");
+   gROOT->ProcessLine(".include EMCALbase");
+
+   // Set our location, so that other packages can find us
+   gSystem->Setenv("EMCALbase_INCLUDE", "EMCALbase");
+}
diff --git a/EMCAL/PROOF-INF.EMCALrec/BUILD.sh b/EMCAL/PROOF-INF.EMCALrec/BUILD.sh
new file mode 100755 (executable)
index 0000000..fc9490a
--- /dev/null
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+make 
diff --git a/EMCAL/PROOF-INF.EMCALrec/SETUP.C b/EMCAL/PROOF-INF.EMCALrec/SETUP.C
new file mode 100644 (file)
index 0000000..9456946
--- /dev/null
@@ -0,0 +1,13 @@
+void SETUP()
+{
+
+   // Load library
+   gSystem->Load("libEMCALrec");
+
+   // Set the Include paths
+//   gSystem->SetIncludePath("-I$ROOTSYS/include -IEMCAL");
+   gROOT->ProcessLine(".include EMCALrec");
+
+   // Set our location, so that other packages can find us
+   gSystem->Setenv("EMCALrec_INCLUDE", "EMCALrec");
+}
diff --git a/EMCAL/PROOF-INF.EMCALsim/BUILD.sh b/EMCAL/PROOF-INF.EMCALsim/BUILD.sh
new file mode 100755 (executable)
index 0000000..fc9490a
--- /dev/null
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+make 
diff --git a/EMCAL/PROOF-INF.EMCALsim/SETUP.C b/EMCAL/PROOF-INF.EMCALsim/SETUP.C
new file mode 100644 (file)
index 0000000..cc8bc0d
--- /dev/null
@@ -0,0 +1,13 @@
+void SETUP()
+{
+
+   // Load library
+   gSystem->Load("libEMCALsim");
+
+   // Set the Include paths
+//   gSystem->SetIncludePath("-I$ROOTSYS/include -IEMCAL");
+   gROOT->ProcessLine(".include EMCALsim");
+
+   // Set our location, so that other packages can find us
+   gSystem->Setenv("EMCALsim_INCLUDE", "EMCALsim");
+}