]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/Makefile
Fix coverity defects
[u/mrichter/AliRoot.git] / PHOS / Makefile
index ddda47b3c8178b5f2e6e7861e8623677095696df..771dbe5e201e6e3176aa4902ef101ed5d3855540 100644 (file)
@@ -1,7 +1,10 @@
 PACKAGE = invalid-only-for-proof
 
 include $(ROOTSYS)/test/Makefile.arch
-include lib$(PACKAGE).pkg
+
+SRCS     = $(wildcard *.cxx)
+HDRS     = $(SRCS:.cxx=.h)
+DHDR     = $(PACKAGE)LinkDef.h
 
 ifndef PACKCXXFLAGS
    PACKCXXFLAGS = $(CXXFLAGS)
@@ -11,6 +14,9 @@ ALICEINC = -I.
 
 ### define include dir for local case and par case
 
+ifneq ($(STEERBase_INCLUDE),)
+  ALICEINC += -I../$(STEERBase_INCLUDE)
+endif
 
 # only if no par file was loaded before
 ifeq ($(ALICEINC),-I.)
@@ -27,10 +33,27 @@ OBJS          = $(SRCS:.cxx=.o)
 lib$(PACKAGE).so: $(OBJS)
        @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"