#
# Copyright (C) 1989 by The Regents of the University of California.
#
# This software work was developed at UCLA with support in part from
# DARPA Contract F29601-87-C-0072.
#

#
# Makefile for XWIP
#

CFLAGS = -O

OBJS = ff.o dl.o conn.o window.o prop.o pixmap.o color.o gc.o graphics.o \
	image.o text.o cursor.o pointer.o keyboard.o wm.o event.o misc.o

# where your X11 files are
XINCLUDE = /usr/include/X11
XBIN = /usr/bin/X11
XETC = /usr/etc/X11

UTILS = cfconst cftable 
DUMPS = spx qpx
FILES = cfont.pl cfont.tex 
LOGS = xwip.log xwip.ilg

all:	programs document

programs: xwip.o cfont.pl

xwip.o:	$(OBJS)
	ld -r -o xwip.o $(OBJS)

cfont.pl: cfconst
	./cfconst < $(XINCLUDE)/cursorfont.h > cfont.pl

cfconst: cfconst.o
	cc -o cfconst cfconst.o

document: cfont.tex xwip.ind

cfont.tex: cftable
	./cftable < $(XINCLUDE)/cursorfont.h > cfont.tex

cftable: cftable.o
	cc -o cftable cftable.o

xwip.ind: xwip.idx
	makeindex xwip.idx

plint:
	plint *.pl *.c >! plint.out

install:
	cp xwip.ps $(XETC)
	cp spx $(XBIN)
	cp qpx $(XBIN)

clean:
	rm -f *~ *.o $(UTILS) $(FILES) $(LOGS)

dist:
	rm -f *.o $(UTILS) $(DUMPS) $(LOGS)

local-dist:
	rm -f /u/s4/tangram/xwip/*
	tar cf - . | (cd /u/s4/tangram/xwip; tar xvf -)

ff.o: dl.h ff.h attrib.h
dl.o: dl.h

conn.o: dl.h conn.h ff.h
window.o: dl.h conn.h ff.h attrib.h
prop.o: dl.h conn.h ff.h
pixmap.o: dl.h conn.h ff.h attrib.h
color.o: dl.h conn.h ff.h
gc.o: dl.h conn.h ff.h
graphics.o: dl.h conn.h ff.h
image.o: dl.h conn.h ff.h
text.o: dl.h conn.h ff.h
cursor.o: dl.h conn.h ff.h
pointer.o: dl.h conn.h ff.h attrib.h
keyboard.o: dl.h conn.h ff.h attrib.h
wm.o: dl.h conn.h ff.h
event.o: dl.h conn.h ff.h
misc.o: dl.h conn.h ff.h

cfconst.o:
cftable.o:

#
# eof
#
