#
# Joint project between the Wisconsin Wind Tunnel
# at the University of Wisconsin, Madison and
# HPSL research group at the University of Maryland,
# College Park.
#
# Participants:
#   Shubu Mukherjee (*) and Shamik Sharma (!).
#   Mark Hill (*), Jim Larus(*), Anne Rogers (%), Joel Saltz (!).
#
#  (*) University of Wisconsin-Madison
#  (!) University of Maryland, College Park
#  (%) Princeton University
#

.KEEP_STATE:

TARGET = unstructured

#----------------------------------------------------------------
# Options Description
#
# VERBOSE     : verbose output, showing results each iteration
# PARTITION   : Partitions nodes of the mesh using RCB partitioner
#               (Partitions iterations using almost-owner-computes)
# LOCAL_SORT  : Reorders local nodes for better locality.
#               (Does not seem to help much )
#
# The PPoPP paper uses :
# OPTIONS      = -DPARTITION 
#
#------------------------------------------------------------------

OPTIONS       = -DPARTITION 

CHAOS_HOME     = ../chaos
CHAOS_LIBPATH  = $(CHAOS_HOME)/lib
INCDIRS        = /p/cm5/usr/include
CC             = gcc
LINKER         = cmmd-ld -comp  
CFLAGS         = -DCM5  -O2   -Wall -Dpe_obj
HOST_CFLAGS    = -DCM5  -O2   -Wall 

HOST_SRCS    = base.cm5.host.c
HOST_OBJS    = $(HOST_SRCS:%.c=%.o)
NODE_SRCS    = base.cm5.node.c \
               unstructured.c  \
               chaos-support.c \
               readmesh.c     
NODE_OBJS    = $(NODE_SRCS:%.c=%.o) 




include   Makefile.include.chaos



#
# Dependencies
#

unstructured.o : unstructured.c   unstructured.h chaos-support.h
chaos-support.o: chaos-support.c  unstructured.h chaos-support.h
readmesh.o     : readmesh.c       unstructured.h chaos-support.h
bisec.o        : bisec.c          unstructured.h chaos-support.h


