#
# Makefile for an index processor ptexindy
#
CFLAGS=-nologo -MD -Os
#CFLAGS=-nologo -MD -Os -favor:blend

all: ptexindy.exe ptex2xindy.exe

ptexindy.exe: ptexindy.obj
	$(CC) -Fe$@ ptexindy.obj setargv.obj

ptexindy.obj: ptexindy.c
	$(CC) $(CFLAGS) -c $<

ptex2xindy.exe: ptex2xindy.obj
	$(CC) -Fe$@ ptex2xindy.obj setargv.obj

ptex2xindy.obj: ptex2xindy.c
	$(CC) $(CFLAGS) -c $<

clean::
	rm -f *~ *.obj *.exe

BINS=ptexindy.exe ptex2xindy.exe
SRCS=ptexindy.c ptex2xindy.c

MYBINDIR=c:/usr/local/txdir/w32tex/bin/
MYDOCDIR=c:/usr/local/txdir/w32tex/share/texmf-dist/doc/support/ptexindy/
DISTBINDIR=c:/usr/work/edrive/wk/dist/PTEX/bin/
DISTDOCDIR=c:/usr/work/edrive/wk/dist/PTEX/share/texmf-dist/doc/support/ptexindy/

install: ptexindy.exe
	cp -p $(BINS) $(MYBINDIR)
	cp -p $(BINS) $(DISTBINDIR)
	cp -p $(SRCS) $(MYDOCDIR)
	cp -p $(SRCS) $(DISTDOCDIR)
