Creation of par files with CMake
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Jan 2011 16:36:37 +0000 (16:36 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Jan 2011 16:36:37 +0000 (16:36 +0000)
OADB/Makefile [new file with mode: 0644]
OADB/PROOF-INF.OADB/BUILD.sh [moved from OADB/PROOF-INF/BUILD.sh with 100% similarity]
OADB/PROOF-INF.OADB/SETUP.C [moved from OADB/PROOF-INF/SETUP.C with 100% similarity]

diff --git a/OADB/Makefile b/OADB/Makefile
new file mode 100644 (file)
index 0000000..da8f76c
--- /dev/null
@@ -0,0 +1,55 @@
+PACKAGE = invalid-only-for-proof
+
+include $(ROOTSYS)/test/Makefile.arch
+
+SRCS     := $(wildcard *.cxx */*.cxx)
+HDRS     := $(SRCS:.cxx=.h)
+DHDR     := $(PACKAGE)LinkDef.h
+
+
+ifndef PACKCXXFLAGS
+   PACKCXXFLAGS = $(CXXFLAGS)
+endif
+
+ALICEINC = -I.
+
+ifneq ($(OADB_INCLUDE),)
+   ALICEINC += -I../$(OADB_INCLUDE) 
+endif
+
+# only if no par file was loaded before
+ifeq ($(ALICEINC),-I.)
+  ifneq ($(ALICE_ROOT),)
+    ALICEINC += -I$(ALICE_ROOT)/include
+  endif
+endif
+
+
+
+
+CXXFLAGS += $(ALICEINC) -g
+
+SRCS         += G__$(PACKAGE).cxx
+OBJS          = $(SRCS:.cxx=.o)
+
+lib$(PACKAGE).so: $(OBJS)
+       @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) $(PACKCXXFLAGS) -c $< -o $@
+
+clean:
+       @rm -f $(OBJS) *.so G__$(PACKAGE).*
+
+G__$(PACKAGE).cxx G__$(PACKAGE).h: $(HDRS) $(DHDR)
+       @echo "Generating dictionaries ..." $(ALICEINC)
+       rootcint -f $@ -c $(CINTFLAGS) $(ALICEINC) $^
+