#include "../../../../conf/makejsf.tmpl"

INSTALLDIR    = ../../../..
PACKAGENAME   = EXGen
SOREV         = 2005.01
SRCS          = EXEventGen.$(SrcSuf)

OBJS	      =	$(subst .$(SrcSuf),.$(ObjSuf),$(SRCS)) \
		$(PACKAGENAME)Dict.$(ObjSuf)

HDRS	      = $(subst .$(SrcSuf),.h,$(SRCS)) 

DICTNAME      = $(PACKAGENAME)Dict

LIBNAME       = $(PACKAGENAME)

LIBINSTALLDIR = $(INSTALLDIR)/lib
INCINSTALLDIR = $(INSTALLDIR)/include
INCPATH	      = -I. -I.. -I$(INCINSTALLDIR)
CXXFLAGS     += $(INCPATH) -O -g
SHLIBLDFLAGS  = $(DYLIBFLAGS)


all::

SharedLibraryTarget($(LIBNAME),$(SOREV),$(OBJS),.,.)
	
InstallSharedLibrary($(LIBNAME),$(SOREV),$(LIBINSTALLDIR))

InstallMultipleFlags($(HDRS),$(INCINSTALLDIR),-m 644)

clean:: 
	@rm -f $(OBJS) core *.$(DllSuf) $(DICTNAME).$(SrcSuf) $(DICTNAME).h

depend:: $(SRCS) $(HDRS)
	for i in $(SRCS); do \
	rmkdepend -a -- $(DEPENDFILES) -- $$i; done


distclean:: clean
	@rm -f $(OBJS) core *.$(DllSuf) $(DICTNAME).$(SrcSuf) $(DICTNAME).h *~
	@rm -f *.root Makefile

$(DICTNAME).$(SrcSuf): $(HDRS) LinkDef.h
	@echo "Generating dictionary ..."
	rootcint -f $(DICTNAME).$(SrcSuf) \
 		-c $(INCPATH) $(HDRS) LinkDef.h

