Fixes for the creation of PAR files on Mac (Chiara, Gerri)
[u/mrichter/AliRoot.git] / RAW / Makefile
1 # Makefile for ALICE MDC program for Linux
2
3 include $(ROOTSYS)/test/Makefile.arch
4
5 LDFLAGS      += -Wl,-rpath,/ROOT/Linux/CurrentRelease/root/lib \
6                 -Wl,-rpath,/date/smi/linux \
7                 -Wl,-rpath,/date/dim/linux \
8                 -Wl,-rpath,/adcRoot/alimdc5
9
10 ifneq ($(findstring rdm,$(MAKECMDGOALS)),)
11 CXXFLAGS += -DUSE_RDM
12 endif
13
14 ifneq ($(findstring debug,$(MAKECMDGOALS)),)
15 CXXFLAGS += -DUSE_DEBUG -g
16 endif
17
18 ifneq ($(findstring smi,$(MAKECMDGOALS)),)
19 #SMIDIR    = ./smi
20 #DIMDIR    = ./dim
21 SMIDIR    = /date/smi
22 DIMDIR    = /date/dim
23 CXXFLAGS += -DUSE_SMI -I$(SMIDIR)/smixx -I$(DIMDIR)/dim
24 LIBS     += -L$(SMIDIR)/linux -lsmiui -lsmi -L$(DIMDIR)/linux -ldim
25 endif
26
27 ifneq ($(findstring evb,$(MAKECMDGOALS)),)
28 ifneq ($(findstring rdm,$(MAKECMDGOALS)),)
29 EBDIR     = ./eb
30 BMDIR     = ./eb
31 DBMDIR    = ./eb
32 DBDIR     = ./eb
33 FIFODIR   = ./eb
34 INFODIR   = ./eb
35 else
36 EBDIR     = /date/eventBuilder
37 BMDIR     = /date/banksManager
38 DBMDIR    = /date/bufferManager
39 DBDIR     = /date/db
40 FIFODIR   = /date/simpleFifo
41 INFODIR   = /date/infoLogger
42 endif
43 CXXFLAGS += -DUSE_EB -I$(EBDIR)
44 LIBS     += -L$(EBDIR)/Linux -L$(BMDIR)/Linux -L$(DBMDIR)/Linux \
45             -L$(DBDIR)/Linux -L$(FIFODIR)/Linux -L$(INFODIR)/Linux \
46             -lDateEb -lBanksManager -lDateBufferManager \
47             -lDb -lFifo -lInfo
48 endif
49
50 ifneq ($(findstring hlt,$(MAKECMDGOALS)),)
51 include ../HLT/hlt.conf
52 CXXFLAGS += -DUSE_HLT ${HLTDEFS} -I${ALICE_ROOT}/include -I../HLT/src -I../HLT/hough -I../HLT/comp
53 LIBS     += -lEG -lVMC -lGeom -lThread -L../lib/tgt_linuxDEBUG -lSTEER -lRAWData -lTPCbase -lTPCsim -lTPCrec -lCONTAINERS -lAliHLTSrc -lAliHLTMisc -lAliHLTHough -lAliHLTComp
54 endif
55
56 ##### DATE #####
57
58 ifdef DATE_ROOT
59 DATEFLAGS = -DALI_DATE -D${DATE_SYS} -DDATE_SYS=${DATE_SYS} -Dlong32=${DATE_LONG32} -Dlong64='${DATE_LONG64}' -DdatePointer=${DATE_POINTER} -I${DATE_COMMON_DEFS}
60 CXXFLAGS += $(DATEFLAGS)
61 endif
62
63 ##### MACROS and TARGETS #####
64
65 ifeq ($(PLATFORM),macosx)
66 # We need to make both the .dylib and the .so
67                 $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@
68 ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
69 ifeq ($(MACOSX_MINOR),4)
70                 ln -sf $@ $(subst .$(DllSuf),.so,$@)
71 else
72                 $(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ \
73                    $(OutPutOpt) $(subst .$(DllSuf),.so,$@)
74 endif
75 endif
76 else
77 ifeq ($(PLATFORM),win32)
78                 bindexplib $* $^ > $*.def
79                 lib -nologo -MACHINE:IX86 $^ -def:$*.def \
80                    $(OutPutOpt)$(EVENTLIB)
81                 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) \
82                    $(OutPutOpt)$@
83 else
84                 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
85 endif
86 endif