
# texutilk notes:
#
# You will need libkpathsea.a and the kpathsea C includes. 
#
# The easiest way to acquire these is to install either 
# the teTeX or TeXlive Web2C sources, then compile TeX 
# from these sources. That wil automatically compile
# kpathsea.a for you.
#
# Next find and then fix the two paths below. 
# Both paths will usually have the same prefix.
#
# Then run "make texutilk". 

includedir = ../sources/src/texk
kpathsea_dir = ../sources/src/texk/kpathsea

libkpathsea = $(kpathsea_dir)/.libs/libkpathsea.a

CC = gcc
CFLAGS = -Wall -W -g -O2

texutil: texutil.o Makefile
	$(CC) $(CFLAGS)  -o texutil texutil.o 

texutil.o: texutil.c Makefile
	$(CC) $(CFLAGS) -c -o texutil.o texutil.c

texutilk: texutilk.o Makefile
	$(CC) $(CFLAGS) -DTEXUTILK -o texutilk texutilk.o $(libkpathsea)

texutilk.o: texutil.c Makefile
	$(CC) $(CFLAGS) -DTEXUTILK -I$(srcdir) -c -o texutilk.o texutil.c

.PHONY: clean

clean:
	rm -f *.o texutil texutilk
