Avoid the problem of lines too long on HP
[u/mrichter/AliRoot.git] / conf / GeneralMacros
index c34f14d3781790e877966bb7bd8ee31c7aa0fad9..fd2a67f597980f85f767b3487f2abf00f4986c6e 100644 (file)
@@ -2,37 +2,35 @@
 
 $(SLIBRARY):
                @echo "Generating $@ for $(PACKAGE)..."
 
 $(SLIBRARY):
                @echo "Generating $@ for $(PACKAGE)..."
+               @[ -d $(dir $@) ] || mkdir $(dir $@)
                @rm -f $@
                 ifeq ($(PLATFORM),aix)
                @rm -f $@
                 ifeq ($(PLATFORM),aix)
-                  @$(SHLD) -o $@ $(LIBS) -p 0 $^
+                  @cd $(ALICE_TARGET) ;\
+                  $(SHLD) -o $@ $(LIBS) -p 0 $(patsubst $(ALICE_TARGET)/%,%,$(filter-out dirs,$^))
                 else
                 else
-                   ifeq ($(PLATFORM),alpha)
-                     @$(SHLD) -o $@ $^ -lcxxstd -lcxx -lexc -lots -lc
-                   else
-                     @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(SHLIB) -o $@
-                   endif
+                  @cd $(ALICE_TARGET) ;\
+                  $(SHLD) $(SOFLAGS) $(LDFLAGS) $(patsubst $(ALICE_TARGET)/%,%,$(filter-out dirs,$^)) $(SHLIB) -o $@
                 endif
                @chmod 555 $@
                @echo "$@ done"
 
 
                 endif
                @chmod 555 $@
                @echo "$@ done"
 
 
-$(ALIBRARY):
+$(ALIBRARY):   
                @echo "Generating $@ for $(PACKAGE)..."
                @echo "Generating $@ for $(PACKAGE)..."
+               @[ -d $(dir $@) ] || mkdir $(dir $@)
                @rm -f $@
                @ar rv $@ $^
                @echo "$@ done"
  
                @rm -f $@
                @ar rv $@ $^
                @echo "$@ done"
  
-$(PROGRAM):
+$(PROGRAM):    
                @echo "Generating $@ for $(PACKAGE)..."
                @echo "Generating $@ for $(PACKAGE)..."
+               @[ -d $(dir $@) ] || mkdir $(dir $@)
                @rm -f $@
                @$(LD) $(LDFLAGS) $^ $(LIBS) -o $@
                @echo "$@ done"
  
 headers:       $(patsubst %,$(ALICE_ROOT)/include/%,$(HEADERS))
 
                @rm -f $@
                @$(LD) $(LDFLAGS) $^ $(LIBS) -o $@
                @echo "$@ done"
  
 headers:       $(patsubst %,$(ALICE_ROOT)/include/%,$(HEADERS))
 
-$(patsubst %,$(ALICE_ROOT)/include/%,$(HEADERS)) : $(ALICE_ROOT)/include/% : %
-               @cp -p $^ $@
-
 $(DICT):
                @echo "Generating $@ for $(PACKAGE)..."
                @rootcint -f $@ -c -I$(ALICE_ROOT)/include $^
 $(DICT):
                @echo "Generating $@ for $(PACKAGE)..."
                @rootcint -f $@ -c -I$(ALICE_ROOT)/include $^