# Makefile for GNU Texindex.
# Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.

CC = gcc -g
O = .o
A = .a
CFLAGS = -DOS2 -DHAVE_STRING_H -DHAVE_VFPRINTF -DHAVE_VSPRINTF
LIBS = ../libtxi/libtxi$A

PROGS = texindex.exe deref.exe

all: $(PROGS)

.SUFFIXES: .c $O

.c$O:
	$(CC) $(CFLAGS) -c -I../libtxi $<

texindex.exe: texindex$O $(LIBS)
	$(CC) texindex$O -o $@ $(LIBS)

texindex$O: texindex.c ../libtxi/getopt.h

deref.exe: deref$O
	$(CC) deref$O -o $@ $(LDFLAGS)

clean:
	rm -f *.o *.obj
