
$(LIB): $(OBJS) $(CINT)Cint.o
	@echo " - Building Library lib$(LIB)"
	$(AR) $(LIB) *.o
	@echo " "

$(CINT)Cint.cc: $(HEADERS) $(CINT)LinkDef.h
	@echo " - Generating dictionary $(CINT)Cint.cc"

	$(ROOTSYS)/bin/rootcint -f $(CINT)Cint.cc \
	-c $(INCLUDES) $(DEFINES) $(HEADERS) $(CINT)Incl.h $(CINT)LinkDef.h 

.cxx.o:	
	@echo " - Compiling" $<
	$(CXX) $(CXXFLAGS) -c $< -o $@

.cc.o:	
	@echo " - Compiling" $<
	$(CXX) $(CXXFLAGS) -c $< -o $@

.c.o:	
	@echo " - Compiling" $<
	$(CC) $(CFLAGS) -c $< -o $@

#
# The cleaning facility
#

rmmake:	
	@echo " Removing Makefile.depend"
	@rm -f Makefile.depend

rmcint:	
	@echo " Removing cint-stuff..."
	@rm -f *Cint.*

rmlib:	
	@echo " Removing libraries..."
	@echo " "
	@rm -f lib/lib*.a lib*.a

rmobjs:	
	@echo " Removing object files..."
	@rm -f *.o

rmcore:	
	@echo " Removing core files..."
	@rm -f core*

rmbin:	
	@echo " Removing binary files..."
	@rm -f $(PROGRAMS) $(SOLIB) so_locations

rmbak:
	@echo " Removing backup files..."
	@rm -f *~ kk.kk *.bak .#* .*~

rmbakmac:
	@echo " Removing backup files in macros"
	@rm -f macros/*~

rmhtml:
	@echo " Removing htmldoc-tree"
	rm -rf htmldoc/examples
	rm -rf htmldoc/src
	ls htmldoc/* | grep "htmldoc/" | grep -v images | grep -v CVS | xargs rm -f

cflags: 
	@echo $(INCLUDES) $(CXXFLAGS)

diff:
	@cvs diff | grep -v "^? " > mars.diff
