# Makefile for full test
SHELL = /bin/sh

# Machine specific flags and locations (include files & libraries)
include Make.include

CPP     = g++ -g

OBJS_ := $(patsubst %.cpp,%.o,$(wildcard *.cpp))
OBJS =  $(OBJS_) testDict.o 
CINT_LIST =  Event.h Channel.h
LINKDEF:= LinkDef.h
#########################################################################
all:		lib liblink rootcint readFile 

lib:		$(OBJS)	
		@echo -e "\nBuilding library..."
		$(SOCMD) $(SOFLAGS) $(SOMINF) $(OBJS) $(OutPutOpt) libDecoder.$(DllSuf)	

liblink: 	FORCE	
ifeq ($(strip $(ARCH)),macosx)
	$(SYMLINK) libDecoder.$(DllSuf) libDecoder.$(DllLinkSuf)
endif

readFile:	$(OBJS) readFile.o
		@echo -e "\nBuilding executable: readTFBFile..."
		$(CPP) $(LIBRARIES) -L./ -lDecoder -lz -o readFile readFile.o

clean:
		rm -f *.o
		rm -f *~
		rm -f *.$(DllSuf)
		rm -f *.$(DllLinkSuf)
		rm -f testDict.cc
		rm -f readFile


###
### create ROOT dictionary
rootcint: 	FORCE testDict.o

testDict.cc: 	$(LINKDEF) $(CINTLIST)
		rm -f testDict.*
		@echo -e "\nGenerating dictionary ..."
		rootcint -f testDict.cc -c $(INCLUDES) $(CINT_LIST) $(LINKDEF)

FORCE:	

###