1 # Makefile to compile Herwig6 as a shared library for
2 # ROOT. Needs the Herwig6 routines and the F77 to C++
5 # General Definitions for linux compilers
7 include $(ALICE_ROOT)/conf/GeneralDef
8 include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
18 CSRCS = main.c herwig6_address.c
22 COBJS = $(patsubst %.c,tgt_$(ALICE_TARGET)/%.o,$(CSRCS))
26 FSRCS = HERWIG6100.f herwig6_common_block_address.f herwig6_called_from_cc.f
28 FOBJS = $(patsubst %.f,tgt_$(ALICE_TARGET)/%.o,$(FSRCS))
30 SRCS = $(FSRCS) $(CSRCS)
31 OBJS = $(FOBJS) $(COBJS)
35 DOBJS = $(patsubst %.f,tgt_$(ALICE_TARGET)/%.o,$(DSRCS))
37 # C++ compilation flags
39 CXXFLAGS = $(CXXOPTS) $(CLIBCXXOPTS) $(CLIBDEFS)
43 CFLAGS = $(COPT) $(CLIBCOPT) $(CLIBDEFS)
45 # FORTRAN compilation flags
47 FFLAGS = $(FOPT) $(CLIBFOPT) $(CLIBDEFS)
55 SLIBRARY = $(LIBDIR)/libherwig6.$(SL)
56 ALIBRARY = $(LIBDIR)/libherwig6.a
60 $(LIBDIR)/libherwig6.$(SL): $(OBJS)
62 depend: $(CSRCS) $(DSRCS)
64 TOCLEAN = $(OBJS) $(DOBJS) *Cint.cxx *Cint.h
66 ############################### General Macros ################################
68 include $(ALICE_ROOT)/conf/GeneralMacros
70 ############################ Dependencies #####################################
72 -include tgt_$(ALICE_TARGET)/Make-depend
102 ifeq ($(PLATFORM),macosx)
103 # We need to make both the .dylib and the .so
104 $(LD) $(SOFLAGS)$@ $(LDFLAGS) $^ $(OutPutOpt) $@
105 ifneq ($(subst $(MACOSX_MINOR),,1234),1234)
106 ifeq ($(MACOSX_MINOR),4)
107 ln -sf $@ $(subst .$(DllSuf),.so,$@)
109 $(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ \
110 $(OutPutOpt) $(subst .$(DllSuf),.so,$@)
114 ifeq ($(PLATFORM),win32)
115 bindexplib $* $^ > $*.def
116 lib -nologo -MACHINE:IX86 $^ -def:$*.def \
117 $(OutPutOpt)$(EVENTLIB)
118 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) \
121 $(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)