# Makefile for l2x
# Copyright 1994-1996 by H. Schulzrinne
VERSION = 1.5

# directory where Tcl library libtcl.a resides
TCLLIB = /opt/CUCStcl/lib
# directory where tcl.h resides
TCLINC = /opt/CUCStcl/include
# flags for compiler (the ones below are for gcc)
ARCH_CFLAGS = -g -Wall

# --- no need to modify things below this line ---
CFLAGS = ${ARCH_CFLAGS} -I${TCLINC} -I/usr/local/include -I. 

all: l2x lf pgstrip vise README

vise: vise.o
	$(CC) -g vise.o -o $@

pgstrip: pgstrip.o
	$(CC) -g pgstrip.o -o $@

l2x: l2x.o parse.o strsave.o
	$(CC) -g l2x.o parse.o strsave.o -L${TCLLIB} -R${TCLLIB}\
    -ltcl -lm -o $@

lf: lf.o
	$(CC) -f lf.o -o $@

README: l2x lf doc/readme.tex
	l2x ms.tcl < doc/readme.tex | nroff -ms | ul -tdumb | lf -c2 > README 

l2x-$(VERSION).tar.gz: *.c *.h README Makefile
	cd ..; tar cvfh - l2x/README l2x/*.[ch] \
        l2x/*.tcl l2x/*akefile l2x/doc l2x/examples \
        | gzip -c > l2x/l2x-${VERSION}.tar.gz

clean:
	rm -f *.o core* a.out */*.dvi */*.log l2x lf par pgstrip vise
