# Makefile for gsftopkk --kb@cs.umb.edu. Modified Yves.Arrouye@imag.fr
version = 1.17

program = gsftopk
default all: $(program) gsftopk.1

ac_include ../make/paths.mk
ac_include ../make/common.mk
ac_include ../make/programs.mk

gsftopkpsheaderdir = $(psheaderdir)/gsftopk

# (Optional) The fully-qualified path of Ghostscript.
# GSPATH=-DGS=\"/usr/local/gnu/bin/gs\"

# See INSTALL for compilation options.
DEFS = @DEFS@ $(XDEFS) $(GSPATH) -DKPATHSEA

objects = gsftopk.o


$(program): $(kpathsea) $(objects)
	$(kpathsea_link) $(objects) $(LOADLIBES)

ac_include ../make/tkpathsea.mk

gsftopk.1: gsftopk1.sed sedscript
	sed -f sedscript <$(srcdir)/gsftopk1.sed >$@

sedscript: mksedscript Makefile
	$(SHELL) $(srcdir)/mksedscript $(DEFS) >$@

install: install-exec install-data
uninstall: uninstall-exec uninstall-data

install-exec: $(program)
	$(SHELL) $(top_srcdir)/../mkinstalldirs $(bindir)
	$(INSTALL_LIBTOOL_PROG)  $(bindir) $(program)
uninstall-exec:
	rm -f $(bindir)/$(program)

install-data: gsftopk.1
	$(SHELL) $(top_srcdir)/../mkinstalldirs $(mandir) $(gsftopkpsheaderdir)
	$(INSTALL_DATA) gsftopk.1 $(mandir)/gsftopk.$(manext)
	$(INSTALL_DATA) $(srcdir)/render.ps $(gsftopkpsheaderdir)/render.ps
uninstall-data:
	rm -f $(mandir)/gsftopk.$(manext)
	rm -f $(gsftopkpsheaderdir)/render.ps

ac_include ../make/clean.mk

clean::
	rm -f sedscript

distclean::
	rm -f gsftopk.1

ac_include ../make/config.mk

info dvi check:

ac_include ../make/rdepend.mk
ac_include depend.mk
