Make also lib directory if missing when making libraries
[u/mrichter/AliRoot.git] / conf / GeneralMacros
1 ########################## General Macros #####################################
2
3 $(SLIBRARY):
4                 @echo "Generating $@"
5                 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
6                 @rm -f $@
7                 ifeq ($(PLATFORM),aix)
8                    @cd tgt_$(ALICE_TARGET) ;\
9                    $(SHLD) -o $@ $(LIBS) -p 0 $(patsubst tgt_$(ALICE_TARGET)/%,%,$(filter-out dirs,$^))
10                 else
11                    @cd tgt_$(ALICE_TARGET) ;\
12                    $(SHLD) $(SOFLAGS) $(LDFLAGS) $(patsubst tgt_$(ALICE_TARGET)/%,%,$(filter-out dirs,$^)) $(SHLIB) -o $@
13                 endif
14                 @chmod 555 $@
15
16
17 $(ALIBRARY):    
18                 @echo "Generating $@"
19                 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
20                 @rm -f $@
21                 @ar rv $@ $^
22  
23 $(PROGRAM):     
24                 @echo "Generating $@"
25                 @[ -d $(dir $@) ] || mkdir $(dir $@)
26                 @rm -f $@
27                 @$(LD) $(LDFLAGS) $^ $(LIBS) -o $@
28  
29 headers:        $(patsubst %,$(ALICE_ROOT)/include/%,$(HEADERS))
30
31 $(DICT):
32                 @echo "Generating $@"
33                 @rootcint -f $@ -c -I$(ALICE_ROOT)/include $^
34  
35 depend:
36                 @$(MAKEDEPEND) -ftgt_$(ALICE_TARGET)/Make-depend -ptgt_$(ALICE_TARGET)/ -- $(CXXFLAGS) $(DEPINC) -- $^
37
38 tgt_$(ALICE_TARGET)/Make-depend:
39                 @[ -d $(dir $@) ] || mkdir $(dir $@)
40                 @cp $(ALICE_ROOT)/conf/Makedepend $@
41
42 macroclean:
43                 @rm -f $(TOCLEAN) *~ \#*
44