# Makefile for lgrind, a LaTeX prettyprinter

# $Id: Makefile,v 2.0 96/02/19 23:54:15 gvr Exp $

CC=cc
LIBS=C:o.stubs Lib:Utils.o.Utils

CFLAGS=-depend !Depend -throwback -IC:,Lib:Utils
CPPFLAGS=-DNO_PERM_D -Dpopen=fopen -Dpclose=fclose

.SUFFIXES: .o .c

.c.o:;	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<

lgrind: lgrind.o lgrindef.o regexp.o
	link $(LINKFLAGS) -o lgrind lgrind.o lgrindef.o regexp.o $(LIBS)

lgrind.o: lgrind.c lgutil.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -c lgrind.c

v2lg:	v2lg.o
	$(CC) $(CFLAGS) -o v2lg v2lg.o

retest: retest.o regexp.o
	$(CC) $(CFLAGS) -o retest retest.o regexp.o

install: lgrind
	squeeze lgrind <LGrind$Dir>.lgrind

clean:
	Remove lgrind
	-Wipe o.* ~c~v

# Dynamic dependencies:
o.lgrind:	c.lgrind
o.lgrind:	h.lgrindef
o.lgrind:	h.regexp
o.lgrind:	Lib:Utils.sys.h.stat
o.lgrind:	C:h.kernel
o.lgrind:	c.lgutil
o.lgrindef:	c.lgrindef
o.lgrindef:	h.lgrindef
o.regexp:	c.regexp
o.regexp:	h.regexp
