The Makefile template (simple)
CINTGEN = gencintlinkdef.pl
CXXFLAGS = -I. -I$(EVT_INC) -I$(ROOTSYS)/include -I$(PMON)/include -I$(OFFLINE_MAIN)/include
LDFLAGS = -L$(EVT_LIB) -lEvent \
-L$(PMON)/lib -lpmonitor \
-L$(OFFLINE_MAIN)/lib -lPhHistogramFactory
LINKFILE = $(PACKAGE)LinkDef.h
$(SO) : $(PACKAGE).cc $(PACKAGE)_dict.C $(ADDITIONAL_SOURCES) $(LINKFILE)
$(CXX) $(CXXFLAGS) -o $@ -shared $< $(ADDITIONAL_SOURCES) $(PACKAGE)_dict.C $(LDFLAGS)
$(PACKAGE)_dict.C : $(HDRFILES) $(LINKFILE)
rootcint -f $@ -c $(CXXFLAGS) $^
$(CINTGEN) $(HDRFILES) > $@
rm -f $(SO) $(LINKFILE) $(PACKAGE)_dict.C $(PACKAGE)_dict.h
This is an extremely simple Makefile template. Substitute your project name here. That’s it.
For more complex projects we will provide the automake / autoconf template. One remaining little problem with the rootcint command to be worked out.