# --------------------------------------------------------------------------- # \author mdejong # # This file can be used to create a so-called ROOT dictionary using rootcint. # To this end, symbols PACKAGE, INCLUDES and LINKDEF must be defined. # # The symbol PACKAGE refers to the name of the library files. # The file names have the usual suffixes ".a" and ".so" # for static and dynamic linkage, respectively. # By common standard, the file names are preceeded with "lib". # For dynamic linking, options -L $(JPP_LIB) -l thus apply. # For execution of an application, the environment variable LD_LIBRARY_PATH # should include $(JPP_LIB). # This inclusion is defined after sourcing /setenv[c]sh. # # The symbol INCLUDES should contain a complete list of the include files # to be processed by rootcint. # Note that a subset of this list is extracted which only includes # files with some ClassDef and excludes the so-called LINKDEF file. # # The symbol LINKDEF refers to the steering file for rootcint # (see ROOT documentation for the naming convention of this file). # # The library files are internally defined by symbols LIBROOTa and LIBROOTso # which refer to static linkage and dynamic linkage, respectively. # The symbol NATIVE_LIBS is expanded with both symbols so that # the library files are installed using the standard make procedure. # # Note that the package name should be unique amongst all library files # to ensure that the name of the underlying source file of the ROOT dictionary # is unique conform the ROOT prescription. # # --------------------------------------------------------------------------- ifndef __JMAKEROOTDICTIONARY__ __JMAKEROOTDICTIONARY__=$(lastword $(MAKEFILE_LIST)) ifndef PACKAGE $(error Symbol PACKAGE not defined) endif ifndef INCLUDES $(error Symbol INCLUDES not defined) endif ifndef LINKDEF $(error Symbol LINKDEF not defined) endif include $(JPP_DIR)/make/JMakedefines DICTIONARY := $(PACKAGE)Dictionary LIBROOTso := lib$(PACKAGE)ROOT.so INCLUDES := $(filter-out $(LINKDEF), $(INCLUDES)) INCLUDES := $(call linkdef, $(INCLUDES)) NATIVE_OBJS += $(DICTIONARY).o NATIVE_LIBS += $(LIBROOTa) $(LIBROOTso) $(call rootpcm,$(DICTIONARY)) include $(JPP_DIR)/make/JMakefile # Make library files $(LIBROOTso): $(DICTIONARY).o # Make dictionary file $(DICTIONARY).cc: $(INCLUDES) $(LINKDEF) rootcint -f $(DICTIONARY).cc $(ROOTCINTFLAGS) $(INCLUDES) $(LINKDEF) $(DICTIONARY)_rdict.pcm: $(DICTIONARY).cc clean:: $(RM) $(LIBROOTa) $(LIBROOTso) $(DICTIONARY).* endif