CXXFLAGS =	-O2 -g -Wall -fmessage-length=0 -ISnap-2.1/glib-core/ -ISnap-2.1/snap-core/ -ISnap-2.1/snap-adv/

OBJS =		main.o pagerank_algorithms.o pqueue_double.o pqueue.o

LIBS =      Snap-2.1/snap-core/Snap.o

TARGET =	personalized-pagerank

LDADD =     -lrt

all:	$(TARGET)

pqueue_double.h: pqueue.h

pagerank_algorithms.o : pagerank_algorithms.h pagerank_algorithms.cpp pqueue_double.h
	$(CXX) $(CXXFLAGS) -c pagerank_algorithms.cpp

pqueue_double.o : pqueue_double.cpp  pqueue_double.h
	$(CXX) $(CXXFLAGS) -c pqueue_double.cpp

pqueue.o : pqueue.cpp  pqueue.h
	$(CXX) $(CXXFLAGS) -c pqueue.cpp

$(TARGET):	$(OBJS) graph_names.h
	$(CXX) -o $(TARGET) $(OBJS) $(LIBS) $(LDADD)


clean:
	rm -f $(OBJS) $(TARGET)
