
# Makefile for Texinfo to nroff/troff translator (texi2roff)

CC = cc 

# Flags:
# -DBSD controls use of string(s).h and strchr/index only (not needed for Sun)
# use -Dvoid=int for System III and V7

# problems have been reported for -O with Sun4's, SunOS 4.0.1
CFLAGS = -g

OBJECTS = texi2roff.o table.o translate.o items.o\
		tablema.o tableme.o tablemm.o tablems.o

BUNDLE0 = texi2roff.1 Readme faq copyright Makefile texi2index texi2roff.h
BUNDLE1 = texi2roff.c table.c translate.c items.c
BUNDLE2 = tablema.c tableme.c tablemm.c tablems.c

texi2roff: $(OBJECTS)
	$(CC) -o $@ $(CFLAGS) $(OBJECTS)

texi2roff.o : texi2roff.h

translate.o : texi2roff.h 

table.o : texi2roff.h tablems.c tablemm.c tableme.c tablema.c

tablema.o : texi2roff.h 

tableme.o : texi2roff.h 

tablemm.o : texi2roff.h 

tablems.o : texi2roff.h 

items.o: texi2roff.h

lint:
	lint -ha *.c
clean:
	-rm -f *.o core errs

bundle:
	bundle $(BUNDLE0) $(BUNDLE1) > bundled.01
	ls -l bundled.01
	bundle $(BUNDLE2) >bundled.02
	ls -l bundled.02

tar:
	tar cvf - $(BUNDLE0) $(BUNDLE1) $(BUNDLE2) |compress -c texi2roff.tar.Z
