# -----------------------------------------------------------------------
# All the following comes from the Makefile (which is 
# automatically created by the root install process...)
# in $ROOTSYS/doc/root/test/Makefile .....
# It sets all the needed Variables correctly...
#------------------------------------------------------------------------ 
ObjSuf        = o
SrcSuf        = C
ExeSuf        = run
DllSuf        = so
OutPutOpt     = -o


ROOTCFLAGS    = $(shell root-config --cflags) 
ROOTGLIBS     = $(shell root-config --glibs)

# Linux with egcs
CXX           = g++
CXXFLAGS      = -O2 -Wall -fPIC $(ROOTCFLAGS)
LD            = g++
LDFLAGS       = -L$(UU_ROOT_LIB) -L$(shell pwd)
SOFLAGS       = -shared

ROOTLIBS      = $(ROOTGLIBS) 

#--------------------------------------------------------------------------
#-------------------- improved Makefile below  ----------------------------
#--------------------------------------------------------------------------

# source name runMinuitTest.C(main) MinuitTest.C/h FcnClass.C/h 

RUNTREECUT_O    = runMinuitTest.o MinuitTest.o FcnClass.o

all:    runMinuitTest.run

#-- "runMinuitTest.C depends on MinuitTest.h and on FcnClass.h" ---
runMinuitTest.o: runMinuitTest.C MinuitTest.h FcnClass.h

#-- "MinuitTest.C depends on MinuitTest.h and on FcnClass.h" -----
MinuitTest.o: MinuitTest.C MinuitTest.h FcnClass.h

#-- "FcnClass.C depends on FcnClass.h" -----
FcnClass.o: FcnClass.C FcnClass.h

runMinuitTest.run: $(RUNTREECUT_O)
	@echo "Building runMinuitTest.run ...."
	$(LD) $(LDFLAGS) $(RUNTREECUT_O) $(ROOTLIBS) $(FORTRANLIBS) -o runMinuitTest.run

clean:;         @rm -f *.o core *Dict* 

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






