Do not include from subdirectories
[u/mrichter/AliRoot.git] / HERWIG / Makefile
CommitLineData
d909f169 1# Makefile to compile Herwig6 as a shared library for
2# ROOT. Needs the Herwig6 routines and the F77 to C++
3# interface routines
4
5# General Definitions for linux compilers
6
7include $(ALICE_ROOT)/conf/GeneralDef
8include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
9
10PACKAGE = HERWIG
11
12# C++ sources
13
14SRCS =
15
16# C sources
17
18CSRCS = main.c herwig6_address.c
19
20# C Objects
21
22COBJS = $(patsubst %.c,tgt_$(ALICE_TARGET)/%.o,$(CSRCS))
23
24##### MACROS #####
25
26FSRCS = HERWIG6100.f herwig6_common_block_address.f herwig6_called_from_cc.f
27
28FOBJS = $(patsubst %.f,tgt_$(ALICE_TARGET)/%.o,$(FSRCS))
29
30SRCS = $(FSRCS) $(CSRCS)
31OBJS = $(FOBJS) $(COBJS)
32
33DSRCS =
34
35DOBJS = $(patsubst %.f,tgt_$(ALICE_TARGET)/%.o,$(DSRCS))
36
37# C++ compilation flags
38
39CXXFLAGS = $(CXXOPTS) $(CLIBCXXOPTS) $(CLIBDEFS)
40
41# C compilation flags
42
43CFLAGS = $(COPT) $(CLIBCOPT) $(CLIBDEFS)
44
45# FORTRAN compilation flags
46
47FFLAGS = $(FOPT) $(CLIBFOPT) $(CLIBDEFS)
48
49
50
51##### TARGETS #####
52
53# Target
54
55SLIBRARY = $(LIBDIR)/libherwig6.$(SL)
56ALIBRARY = $(LIBDIR)/libherwig6.a
57
58default: $(SLIBRARY)
59
60$(LIBDIR)/libherwig6.$(SL): $(OBJS)
61
62depend: $(CSRCS) $(DSRCS)
63
64TOCLEAN = $(OBJS) $(DOBJS) *Cint.cxx *Cint.h
65
66############################### General Macros ################################
67
68include $(ALICE_ROOT)/conf/GeneralMacros
69
70############################ Dependencies #####################################
71
72-include tgt_$(ALICE_TARGET)/Make-depend
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
d86acb69 102ifeq ($(PLATFORM),macosx)
103# We need to make both the .dylib and the .so
104 $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@
105ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
106ifeq ($(MACOSX_MINOR),4)
107 ln -sf $@ $(subst .$(DllSuf),.so,$@)
108else
109 $(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ \
110 $(OutPutOpt) $(subst .$(DllSuf),.so,$@)
111endif
112endif
113else
114ifeq ($(PLATFORM),win32)
115 bindexplib $* $^ > $*.def
116 lib -nologo -MACHINE:IX86 $^ -def:$*.def \
117 $(OutPutOpt)$(EVENTLIB)
118 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) \
119 $(OutPutOpt)$@
120else
121 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
122endif
123endif