#
#	Copyright (C) 1996,1997 Matthew Doar 	doar@pobox.com
#
# Permission to use, copy, and distribute this software and its documentation 
# for any purpose with or without fee is hereby granted, provided that the 
# above copyright notice appears with all copies and that both that copyright 
# notice and this permission notice appear in supporting documentation. 
#
#Permission to modify the software is granted, but not the right to distribute 
# the modified code. Modifications are to be distributed as patches to the 
# released version. 
#
# This software is provided "as is" without express or implied warranty. 
#
#
# Makefile for tiers
#

#
# Location of tiers source code
#
TIERS_SRC = .

#
# includes
#
INCLUDES = \
	-I $(TIERS_SRC)

#
# flags
#
#FLAGS= -fconserve-space -fno-inline -Wall -Winline -Wpointer-arith -g -DDEBUG
FLAGS= -g -fconserve-space

#
# tools
#
COMPILER = g++

#
# Default build rule
#.SUFFIXES: .cc .o .hh 
.cc.o:
	$(COMPILER) $(INCLUDES) -o $@ -c $(FLAGS) $(TIERS_SRC)/$<

#
# objects to be built
#
OBJECTS = \
	tiers.o \
	tiers_config.o \
	tiers_create.o \
	tiers_dists.o \
	tiers_misc.o \
	tiers_main.o \
	tiers_output.o \
	tiers_output_gnuplot.o \
	tiers_prims.o \
	tiers_red_intra.o \
	tiers_red_inter.o 

EXEC = $(TIERS_SRC)/tiers

#
# dependencies
#

all : $(OBJECTS) 
	g++ $(OBJECTS) $(FLAGS) -o $(EXEC) -lm	
	@echo ""
	@echo "Done"

clean : robj 

robj:
	rm *.o
	rm $(EXEC)

always :

# end of file
