#
# Copyright (c) 1994 Open Software Foundation, Inc.
# 
# Permission is hereby granted to use, copy, modify and freely distribute
# the software in this file and its documentation for any purpose without
# fee, provided that the above copyright notice appears in all copies, and
# that both the copyright notice and this permission notice appear in
# supporting documentation.  Further, provided that the name of Open
# Software Foundation, Inc. ("OSF") not be used in advertising or
# publicity pertaining to distribution of the software without prior
# written permission from OSF.  OSF makes no representations about the
# suitability of this software for any purpose.  It is provided "AS IS"
# without express or implied warranty.
#
#
# OT 3.0.3
# Makefile for ot family of tools.
#

SOURCES =	ot.c ot_bugs.c \
		otAfterBoot.c otBlankTemplate.c otd.c otKwikPix.c       \
                ode2ot.c otqm.c otBuildDBfiles.c otCreateHeadHistFile.c \
                otSplitHeadHistFile.c otCreateHeadDB.c otcl.c otk.c

HEADERS =	../lib/libot/ot.h ../lib/libot/otInt.h

OBJECTS =	ot.o ot_bugs.o \
		otAfterBoot.o otBlankTemplate.o otd.o otKwikPix.o       \
                ode2ot.o otqm.o otBuildDBfiles.o otCreateHeadHistFile.o \
                otSplitHeadHistFile.o otCreateHeadDB.o otcl.o

PROGRAMS =	ot ot_bugs \
		otAfterBoot otBlankTemplate otd otKwikPix       \
                ode2ot otqm otBuildDBfiles otCreateHeadHistFile \
                otSplitHeadHistFile otCreateHeadDB otcl


TCLLIB   =      /usr/users/pnh/Tk/tcl7.3
TKLIB    =      /usr/users/pnh/Tk/tk3.6

DEBUG=		-g
IFLAG=		-I. -I../lib/libdp -I../lib/libot -I$(TCLLIB)
CFLAGS=		$(IFLAG) $(CFLAG)
LINTARGS=	-x
LDFLAGS=	-L. -L../lib/libdp -L../lib/libot -L../lib/libtcl -L$(TCLLIB) -lot -ldp -ltcl -lm
STRIP=		

all:  $(PROGRAMS)

$(PROGRAMS):  ../lib/libot/ot.h ../lib/libot/otInt.h $$@.o
	$(CC) $(STRIP) -o $@ $@.o $(LDFLAGS)

clean:
	rm -f $(OBJECTS)

lint:
	lint $(LINTARGS) $(SOURCES) | a2ps | lp

otk.o:	otk.c
	cc -c $(IFLAG) -I$(TKLIB) otk.c

otk:	otk.o
	cc $(STRIP) -o $@ $@.o -L. -L../lib/libdp -L../lib/libot -L$(TCLLIB) -L$(TKLIB) -L/usr/lib/X11R4 -lot -ldp -ltk -ltcl -lm -lX11
