# Makefile for the ROOT test programs.
# This Makefile shows nicely how to compile and link applications
# using the ROOT libraries on all supported platforms.
#
# Copyright (c) 2000 Rene Brun and Fons Rademakers
#
# Author: Fons Rademakers, 29/2/2000

include GNUmakefile.arch

#------------------------------------------------------------------------------

EVENTO        = Event.$(ObjSuf) EventDict.$(ObjSuf)
EVENTS        = Event.$(SrcSuf) EventDict.$(SrcSuf)
EVENTSO       = libEvent.$(DllSuf)
ifeq ($(ARCH),win32)
EVENTLIB      = libEvent.lib
else
EVENTLIB      = $(EVENTSO)
endif

OBJS            = $(EVENTO) 

#------------------------------------------------------------------------------

.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf)

$(EVENTSO):   $(EVENTO)
		$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ 
		@rm -f $(OBJS) core
		@echo "$@ done"


clean:
		@echo "Cleaning up..."
		@rm -f $(OBJS) core


.SUFFIXES: .$(SrcSuf)

###

Event.$(ObjSuf): Event.hh 

EventDict.$(SrcSuf): Event.hh EventLinkDef.h
	@echo deleting old dictionary files
	@-rm *Dict*
	@echo "Generating dictionary $@..."
	@rootcint -f $@ -c  $^

.$(SrcSuf).$(ObjSuf):
	$(CXX) $(CXXFLAGS) -c $<
