## makefile.win32 (texinfo utilities)			-*- Makefile -*-
## Time-stamp: "97/08/02 21:27:29 mik"

!include ..\..\miktex.inc

srcdir = .
common = $(srcdir)\..\lib

DEFS = -D_POSIX_VERSION

all: texindex.exe

.c.obj:
	$(CC) -c $(DEFS) -I$(srcdir) -I.. -I$(common) \
		-MD -O2 $(cflags) $(CFLAGS) $<

install: all
	$(INSTALL_PROGRAM) texindex.exe $(bindir)\texindex.exe

uninstall:
	-del $(bindir)\texindex.exe

TAGS:
	etags *.c *.h $(common)/getopt*.c $(common)/getopt.h

mostlyclean:
	-del *.obj
	-del *.res

clean: mostlyclean
	-del *.exe
	-del *.pdb
	-del *.ilk

distclean: clean
	-del *.opt

realclean: distclean
	-del TAGS

texindex.exe: texindex.obj ..\lib\libtxi.lib
	link $(ldflags) $(LDFLAGS) -out:$@ $**

texindex.obj: texindex.c $(common)/getopt.h
