#/* USMID @(#)Xmakefile	1.1 10/16/90 11:00:41 LLNL  */
#   (c) Copyright 1987 the Regents of the University of California,
#    Lawrence Livermore National Laboratory.  All Rights Reserved.
#
#
# Copyright Cray Research, Inc.	 Unpublished.  All rights reserved.
#
# Cray Research warrants and provides support for this software
# only when distributed and used under the terms of a license
# agreement with Cray Research.
#
# FOR PRODUCT DISTRIBUTED IN ANY OTHER MANNER, CRAY RESEARCH DISCLAIMS
# ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL 
# CRAY RESEARCH BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
# DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
# OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OF
# THIS SOFTWARE.
#
#	This makefile makes the Graphical Multitasking Analysis Tool
#			       TIMELINE
#	Three variables need to be defined to get the compile to work correctly.
#	MACHINE_TYPE, TRACE_TYPE, and MANAGER.
#		MACHINE_TYPE should be cray2, crayxmp, crayymp, or sun for
#	all others.
#		TRACE_TYPE should be either CTSSTRACE or CRAYTRACE
#		MANAGER should be either sunview or X11
#	
#	To make the X11R3 version set the above three variables then use:
#		make xtimeline
#	To make the sunview version set the abover three variables then use:
#		make timeline


MACHINE_TYPE=sun
#TRACE_TYPE=CRAYTRACE
TRACE_TYPE=CTSSTRACE
MANAGER=X11
CC=cc
#MANAGER=sunview
DEFINES = -D${TRACE_TYPE} -D${MANAGER} -D${MACHINE_TYPE} -DSTDERR -DXAW_BC -DUSG
# TIME_SRC defines the directory in which the NEWS file can be found
DEFINES2=-DTIME_SRC=\"/LG2/werner/NGMAT/time\"
CFLAGS=-I/usr/local/include -g $(DEFINES) $(DEFINES2)
#XLDFLAGS=-L/usr/local/lib/X11 -lXaw -lXmu -lXt -lXext -lX11 -lm  -lnan
XLDFLAGS=-L/usr/local/lib/X11 -lXaw -lXmu -lXt -lXext -lX11 -lm  
#XLDFLAGS=-L/usr/local/lib/X11 -lXaw -lXmu -lXt -lX11 -lnet -lm
LDFLAGS=-lsuntool  -lsunwindow -lpixrect -lm
INSTALL_DIR=/usr/local/bin
#
#	Object files to make the 'gmat' timeline program
#
OBJ=driver.o assign.o clscreen.o data_input.o \
	xdisplay.o xdraw.o xkey.o xwinit.o xnotify.o\
	display.o draw.o key.o winit.o notify.o news.o\
	doevents.o initialize.o loads.o load_user.o\
	open_dump.o open_trace.o plot_hist.o confirm.o\
	check.o process.o 

xtimeline : $(OBJ)
	gcc ${CFLAGS} -o xtimeline $(OBJ) ${XLDFLAGS}
#	mv xtimeline timeline

timeline : $(OBJ)
	cc ${CFLAGS} -o timeline $(OBJ) ${LDFLAGS}

xwinit.h: xexterns.h
externvars.h : defines.h
news.o: news.c
load_user.o: load_user.c externvars.h
assign.o :assign.c externvars.h defines.h
clscreen.o : clscreen.c xexterns.h
check.o: check.c externvars.h
data_input.o : data_input.c externvars.h defines.h xexterns.h log_entry.h
xdisplay.o : xdisplay.c xexterns.h
display.o : display.c xexterns.h
xdraw.o : xdraw.c externvars.h defines.h xexterns.h
draw.o : draw.c externvars.h defines.h
driver.o: driver.c externvars.h defines.h xexterns.h
doevents.o : doevents.c externvars.h defines.h xexterns.h
initialize.o : initialize.c externvars.h defines.h xexterns.h
xkey.o : xkey.c externvars.h defines.h xexterns.h
key.o : key.c externvars.h defines.h
loads.o : loads.c externvars.h defines.h xexterns.h
xnotify.o : xnotify.c externvars.h defines.h xexterns.h log_entry.h
notify.o : notify.c externvars.h defines.h log_entry.h
open_dump.o : open_dump.c 
open_trace.o : open_trace.c externvars.h defines.h xexterns.h log_entry.h
plot_hist.o : plot_hist.c externvars.h defines.h xexterns.h
process.o : process.c externvars.h defines.h xexterns.h log_entry.h
confirm.o : confirm.c
xwinit.o : xwinit.c externvars.h defines.h xexterns.h xwinit.h
winit.o : winit.c externvars.h defines.h

install : timeline
	cp timeline /usr/local/bin/timeline

clean :
	rm -f $(OBJ) core timeline gmon.out
