# Makefile for Ptolemy Gantt chart library
# Version identification:
# @(#)make.template	2.7 10/28/92
#
# Copyright (c) 1989,1990,1991 The Regents of the University of California.
#			All Rights Reserved.
# Originally written by: S. Bhattacharyya
# Makefile by J. Buck
#
# If this file's name is "make.template" and there is no makefile in
# this directory, do
#	cp make.template makefile
#	make depend
# This will add the dependencies to the makefile.
#
# root of source tree
ROOT	      = ../..
# VPATH points to the "real" source directory
VPATH         = $(ROOT)/src/libgantt

# get configuration info
CONFIG=$(ROOT)/config-$(ARCH).mk
include $(CONFIG)

C_INCL=$(X11INCL)

HDRS	      = colors.h \
		displaysched.h \
		ganttIfc.h \
		highlight.h

SRCS	      = colors.c \
		draw.c \
		error.c \
		events.c \
		gantt_main.c \
		highlight.c \
		read_sched.c \
		resize.c \
		utils.c

EXTRA_SRCS = standalone.c
EXTRA_DESTS= standalone.o gantt

OBJS = $(SRCS:.c=.o)

LIB = libgantt.a

all:	makefile $(LIB) gantt

install: makefile $(LIBDIR)/$(LIB) $(BINDIR)/gantt

gantt:	standalone.o $(LIB)
	rm -f gantt
	cc $(X11LIBDIR) standalone.o $(LIB) $(LX11) -lm -o gantt

$(BINDIR)/gantt:	gantt
	rm -f $(BINDIR)/gantt
	ln gantt $(BINDIR)/gantt

lint:	$(SRCS)
	lint -u $(SRCS) > lint

# include common definitions, rules
include $(ROOT)/common.mk

# Don't add anything after the next line; makedepend will zap it.
# DO NOT DELETE THIS LINE -- make depend depends on it.

colors.o : colors.c colors.h displaysched.h ganttIfc.h 
draw.o : draw.c displaysched.h highlight.h 
error.o : error.c 
events.o : events.c displaysched.h highlight.h 
gantt_main.o : gantt_main.c displaysched.h highlight.h 
highlight.o : highlight.c displaysched.h ganttIfc.h 
read_sched.o : read_sched.c displaysched.h highlight.h 
resize.o : resize.c displaysched.h 
utils.o : utils.c displaysched.h 
