# Makefile for AB-Clique Enumerator

LANG=-std=c99

ifeq ($(PE_ENV),CRAY)
  LANG=-h c99
endif

OPTS = -DUSE_MPI -DUSE_PTHREADS

CC = mpicc
#CC = cc
CFLAGS = $(LANG) $(OPTS) -g -O3 -D_POSIX_C_SOURCE=200112
#CFLAGS = $(LANG) $(OPTS) -g -D_POSIX_C_SOURCE=200112
#LIBS = -lpthread
#LIBS = -L /usr/lib -lprofiler
#LIBS =

OBJECTS = graph.o clique.o clique-main.o mm.o msg.o stats.o
HEADERS = graph.h clique.h mm.h
EXECUTABLE = AB-Clique

all: $(EXECUTABLE)

AB-Clique: $(OBJECTS) Makefile
	$(CC) $(CFLAGS) -o $@ $(OBJECTS) $(LIBS)

clean:
	rm -rf core* *.o $(EXECUTABLE)

clique-main.o: graph.h clique.h msg.h mm.h stats.h
clique.o: graph.h clique.h msg.h mm.h stats.h
graph.o: graph.h msg.h
mm.o: mm.h
msg.o: graph.h clique.h msg.h mm.h stats.h
stats.o: clique.h msg.h stats.h
