FC = g77

FFLAGS = -g

MFLAGS = -c


CPP = g++
GCC = gcc

PVEGASDIR=./pvegas
PVEGASSRC=${PVEGASDIR}/src
PVEGASINCLUDE=${PVEGASDIR}/include

PVEGASLIB=libpvegas.a
PVEGASOBJECTS=pavegas.o \
	nvegas.o \
	timer.o



SOURCES = $(wildcard *.F) 

OBJECTS = $(patsubst %.F,%.o,$(SOURCES)) 


run: $(OBJECTS) $(PVEGASOBJECTS)
	$(CXX) $(CXXFLAGS) -o $@ hggtotal.cc $^ -lg2c -lm


%.o: $(PVEGASSRC)/%.cpp
	$(CPP) -I$(PVEGASINCLUDE) -fPIC -c $< -o $@

%.o: $(PVEGASSRC)/%.cc
	$(CPP) -I$(PVEGASINCLUDE) -fPIC -c $< -o $@

%.o: %.F 
	g77 -c $< -o $@



wipe: 
	rm *.o run *~
