#
# This file is part of the Pablo Performance Analysis Environment
#
#          (R)
# The Pablo    Performance Analysis Environment software is NOT in
# the public domain.  However, it is freely available without fee for
# education, research, and non-profit purposes.  By obtaining copies
# of this and other files that comprise the Pablo Performance Analysis
# Environment, you, the Licensee, agree to abide by the following
# conditions and understandings with respect to the copyrighted software:
# 
# 1.  The software is copyrighted in the name of the Board of Trustees
#     of the University of Illinois (UI), and ownership of the software
#     remains with the UI. 
#
# 2.  Permission to use, copy, and modify this software and its documentation
#     for education, research, and non-profit purposes is hereby granted
#     to Licensee, provided that the copyright notice, the original author's
#     names and unit identification, and this permission notice appear on
#     all such copies, and that no charge be made for such copies.  Any
#     entity desiring permission to incorporate this software into commercial
#     products should contact:
#
#          Professor Daniel A. Reed                 reed@cs.uiuc.edu
#          University of Illinois
#          Department of Computer Science
#          2413 Digital Computer Laboratory
#          1304 West Springfield Avenue
#          Urbana, Illinois  61801
#          USA
#
# 3.  Licensee may not use the name, logo, or any other symbol of the UI
#     nor the names of any of its employees nor any adaptation thereof in
#     advertizing or publicity pertaining to the software without specific
#     prior written approval of the UI.
#
# 4.  THE UI MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE
#     SOFTWARE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT EXPRESS
#     OR IMPLIED WARRANTY.
#
# 5.  The UI shall not be liable for any damages suffered by Licensee from
#     the use of this software.
#
# 6.  The software was developed under agreements between the UI and the
#     Federal Government which entitle the Government to certain rights.
#
#*************************************************************************
#
# Developed by:  The TAPESTRY Parallel Computing Laboratory
#		 University of Illinois at Urbana-Champaign
#		 Department of Computer Science
#		 1304 W. Springfield Avenue
#		 Urbana, IL	61801
#
# Copyright (c) 1991-1994
# The University of Illinois Board of Trustees.
#	All Rights Reserved.
#
# PABLO is a registered trademark of
# The Board of Trustees of the University of Illinois
# registered in the U.S. Patent and Trademark Office.
#
# Author:  Roger J. Noe (noe@cs.uiuc.edu)
# Contributing Author:  Daniel A. Reed (reed@cs.uiuc.edu)
# Contributing Author:  Brian K. Totty (totty@cs.uiuc.edu)
# Project Manager and Principal Investigator:
#	Daniel A. Reed (reed@cs.uiuc.edu)
#
# Funded by: National Science Foundation grants NSF CCR87-06653 and
# NSF CDA87-22836 (Tapestry), DARPA Contract No. DABT63-91-K-0004,
# by a grant from the Digital Equipment Corporation External Research
# Program, and by a collaborative research agreement with the Intel
# Supercomputer Systems Division.
#
#

#
# There are several user-configurable parameters within this Makefile.
# If you make changes to this file and always start your make from
# this top-level directory of the instrumentation source tree, these
# configurables will be passed down to all appropriate subdirectories
# during the make.  You do not need to change any files below this one
# unless you decide to start makes further down.
#

# DEFAULT is the default make target.  If you like to start your make
# without having to say "make all" or "make install" but simply "make",
# explicitly put that target as the value of DEFAULT.  Do *NOT* put
# DEFAULT=default, or make will be terribly confused!  It has to be
# one of all, install, or clean.

DEFAULT =	all

# If you want to use a program other than "make" for subordinate
# Makefiles, put the name of that program as the value of MAKE.

MAKE =		make

# When you do a "make install" (explicitly or using the DEFAULT),
# executable programs will be put in BINDIR.  Set this to the
# FULL PATHNAME of the directory where you want these executables
# to go.  You *MUST* choose something besides "." if you want the
# make install to do anything.

BINDIR =	.

# When you do a "make install" (explicitly or using the DEFAULT),
# archive libraries will be put in LIBDIR.  Set this to the
# FULL PATHNAME of the directory where you want these libraries
# to go.  You *MUST* choose something besides "." if you want the
# make install to do anything.

LIBDIR =	.

# When you do a "make install" (explicitly or using the DEFAULT),
# include (header) files will be put in INCDIR.  Set this to the
# FULL PATHNAME of the directory where you want these header files
# to go.  You *MUST* choose something besides "." if you want the
# make install to do anything.

INCDIR =	.

# CC is the name of the C compiler program for object code meant to
# run on the machine on which the make is executing.  CFLAGS are
# options passed to CC.  Likewise, AR is the name of the program
# to invoke to build archive libraries of .o files which are the
# result of CC invocations.  ARFLAGS are options passed to AR.

CC =		cc
CFLAGS =	-g
AR =		ar
ARFLAGS =	ruv

# On some systems (frequently BSD UNIX systems), archive libraries
# need to be reordered or rebuilt before anything may be linked
# with them.  RANLIB is the name of the program to do that.  This
# is only for archive libraries built with AR.

RANLIB =	ranlib

# The Pablo trace library has different versions for the different
# target systems on which it may be used.  If you want to build the
# Pablo instrumentation software for use with the Intel iPSC/2 and
# iPSC/860 systems, set SYSTEM to Intel.  To build the BSD UNIX
# version, set SYSTEM to Unix.  To build the Thinking Machines CM-5
# version, set SYSTEM to CM5.

SYSTEM =	Unix

# XCC is the name of the C cross-compiler program to produce object
# code meant to run on a machine other than the one on which the
# make is executing.  XCFLAGS are options passed to XCC.  Likewise,
# XAR is the name of the program to produce archive library files
# from .o files which are the result of XCC invocations.  XARFLAGS
# are options passed to XAR.  These macros are not used whenever
# SYSTEM=Unix.  For the iPSC/860, set XCC=icc and XAR=ar860.  For
# the iPSC/2, set XCC=cc and XAR=ar, the 386 compiler tools.  The
# build must of course be done on a machine which has either the
# native compilers or appropriate cross-compilers.

XCC =		icc
XCFLAGS =	
XAR =		ar860
XARFLAGS =	ruv

# This concludes the section of user-configurable parameters in this
# Makefile.

MAKE_MACROS =	\
	"DEFAULT=$(DEFAULT)"	\
	"MAKE=$(MAKE)"		\
	"BINDIR=$(BINDIR)"	\
	"LIBDIR=$(LIBDIR)"	\
	"INCDIR=$(INCDIR)"	\
	"CC=$(CC)"		\
	"CFLAGS=$(CFLAGS)"	\
	"AR=$(AR)"		\
	"ARFLAGS=$(ARFLAGS)"	\
	"RANLIB=$(RANLIB)"	\
	"SYSTEM=$(SYSTEM)"	\
	"XCC=$(XCC)"		\
	"XCFLAGS=$(XCFLAGS)"	\
	"XAR=$(XAR)"		\
	"XARFLAGS=$(XARFLAGS)"

default:
	$(MAKE) $(MAKE_MACROS) $(DEFAULT)

all clean install:
	cd TraceLibrary; $(MAKE) $(MAKE_MACROS) $@
	cd Extensions; $(MAKE) $(MAKE_MACROS) $@
