# Generated automatically from Makefile.in by configure.
# Makefile for dviljk --kb@cs.umb.edu.
version = 2.5

# paths.make -- installation directories.
#
# The compile-time paths are defined in kpathsea/paths.h, which is built
# from kpathsea/paths.h.in and these definitions.  See kpathsea/INSTALL
# for a description of how the various path-related files are used and
# created.

# Do not change prefix and exec_prefix in Makefile.in!
# configure doesn't propagate the change to the other Makefiles.
# Instead, give the -prefix/-exec-prefix options to configure.
# (See kpathsea/INSTALL for more details.) This is arguably
# a bug, but it's not likely to change soon.
prefix = /usr/contrib/texmf
exec_prefix = ${prefix}

# Architecture-dependent executables.
bindir = $(exec_prefix)/bin

# Architecture-independent executables.
scriptdir = $(bindir)

# Architecture-dependent files, such as lib*.a files.
libdir = $(exec_prefix)/lib

# Architecture-independent files.
datadir = $(prefix)/lib

# Header files.
includedir = $(prefix)/include

# GNU .info* files.
infodir = $(prefix)/info

# Unix man pages.
manext = 1
mandir = $(prefix)/man/man$(manext)

# TeX & MF-specific directories. Not all of the following are relevant
# for all programs, but it seems cleaner to collect everything in one place.

# The default paths are now in kpathsea/paths.h.in. Passing all the
# paths to sub-makes can make the arg list too long on system V.

# The root of the tree.
texmf = $(datadir)/texmf

# TeX and MF source files.
texinputdir = $(texmf)/tex
mfinputdir = $(texmf)/mf

# MakeTeXPK.site, texmf.cnf, etc.
web2cdir = $(texmf)/web2c

# The top-level font directory.
fontdir = $(texmf)/fonts

# Memory dumps (.fmt and .base).
fmtdir = $(texmf)/ini
basedir = $(fmtdir)

# Pool files.
texpooldir = $(texmf)/ini
mfpooldir = $(texpooldir)

# If install_fonts=true, the PostScript/LaserJet TFM and VF files for
# the builtin fonts get installed in subdirectories of this directory,
# named for the typeface families of these directories. If you don't
# have the default directory setup, you will want to set
# install_fonts=false.  Ditto for install_macros.
install_fonts = true
install_macros = true

# Where the .map files from fontname are installed.
fontnamedir = $(texmf)/fontname

# Where the dvips configuration files get installed, and where
# psfonts.map is.
dvipsdir = $(texmf)/dvips
psheaderdir = $(dvipsdir)

# MakeTeXPK will go here to create dc*.
dcfontdir = $(fontdir)/public/dc

# MakeTeXPK will go here if it exists to create nonstandard CM fonts,
# e.g., cmr11. See ftp.cs.umb.edu:pub/tex/sauter.tar.gz. The Sauter
# files must be in your regular MFINPUTS.
sauterdir = $(fontdir)/public/sauter

# If a font can't be found close enough to its stated size, we look for
# each of these sizes in the order given.  This colon-separated list is
# overridden by the envvar TEXSIZES, and by a program-specific variable
# (e.g., XDVISIZES), and perhaps by a config file (e.g., in dvips).
default_texsizes = 300:600

# End of paths.make.

# See INSTALL for compilation options.
DEFS = $(XDEFS)

# common.make -- used by all Makefiles.
SHELL = /bin/sh

top_srcdir = .
srcdir = .

CC = gcc
# CFLAGS is used for both compilation and linking.
CFLAGS = -g -O $(XCFLAGS)

# Do not override CPPFLAGS; change XCPPFLAGS, CFLAGS, XCFLAGS, or DEFS instead.
CPPFLAGS = $(XCPPFLAGS) -I. -I$(srcdir) \
	   -I$(kpathsea_parent) -I$(kpathsea_srcdir_parent) \
	   $(prog_cflags)  $(DEFS) 
.c.o:
	$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
.SUFFIXES: .c .o

# Installation.
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644

# This is used to recursively copy a fonts/ or tex/ directory to
# $(fontdir) or $(texinputdir).
# The first arg is `.', and the second is the target directory.
CP_R = cp -r

# This is so kpathsea will get remade automatically if you change
# something in it and recompile from the package directory.
kpathsea_parent = ..
kpathsea_dir = $(kpathsea_parent)/kpathsea
kpathsea_srcdir_parent = $(top_srcdir)/..
kpathsea_srcdir = $(kpathsea_srcdir_parent)/kpathsea
kpathsea = $(kpathsea_dir)/kpathsea.a

##ifeq ($(CC), gcc)
##XDEFS = -Wall -Wpointer-arith $(warn_more)
##CFLAGS = -g $(XCFLAGS)
##endif
# End of common.make.
# programs.make -- used by Makefiles for executables only.
# Linking. Don't include $(CFLAGS), since ld -g under Linux forces
# static libraries, including libc.a and libX*.a
LDFLAGS =  $(XLDFLAGS)
LIBS = 
# proglib is for web2c; 
# XLOADLIBES is for the installer.
LOADLIBES= $(proglib) $(kpathsea) $(LIBS) -lm $(XLOADLIBES)

# Why separate CCLD from CC?  No particular reason.
CCLD = $(CC)
link_command = $(CCLD) -o $@ $(LDFLAGS) 
# End of programs.make.

common_objects = tfm.o

program = dvilj
objects = dvilj.o $(common_objects)
objects2p = dvilj2p.o $(common_objects)
program2p = dvilj2p
objects4 = dvilj4.o $(common_objects)
program4 = dvilj4
objects4l = dvilj4l.o $(common_objects)
program4l = dvilj4l

programs = $(program) $(program2p) $(program4) $(program4l)

default: $(programs)
all: $(programs)

$(program): $(kpathsea) $(objects)
	$(CC) $(LDFLAGS) -o $@ $(objects) $(LOADLIBES)

$(program2p): $(objects2p) $(kpathsea)
	$(CC) $(LDFLAGS) -o $@ $(objects2p) $(LOADLIBES)

$(program4): $(objects4) $(kpathsea)
	$(CC) $(LDFLAGS) -o $@ $(objects4) $(LOADLIBES)

$(program4l): $(objects4l) $(kpathsea)
	$(CC) $(LDFLAGS) -o $@ $(objects4l) $(LOADLIBES)

dvilj.o:
	$(CC) $(CPPFLAGS) $(CFLAGS) -DLJ -c dvi2xx.c
	mv dvi2xx.o $@

dvilj2p.o:
	$(CC) $(CPPFLAGS) $(CFLAGS) -DLJ2P -c dvi2xx.c
	mv dvi2xx.o $@

dvilj4.o:
	$(CC) $(CPPFLAGS) $(CFLAGS) -DLJ4 -c dvi2xx.c
	mv dvi2xx.o $@

dvilj4l.o:
	$(CC) $(CPPFLAGS) $(CFLAGS) -DLJ4 -DLJ4L -c dvi2xx.c
	mv dvi2xx.o $@

# tkpathsea.make -- remaking kpathsea.

makeargs = $(MFLAGS) CC='$(CC)' CFLAGS='$(CFLAGS)' $(XMAKEARGS)

$(kpathsea): $(kpathsea_srcdir)/*.c $(kpathsea_srcdir)/*.h \
	     $(kpathsea_srcdir)/texmf.cnf.in $(top_srcdir)/../make/paths.make
	cd $(kpathsea_dir); $(MAKE) $(makeargs)

# End of tkpathsea.make.

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

install-exec:
	$(SHELL) $(top_srcdir)/../mkdirchain $(bindir)
	test ! -f $(program) \
	  || $(INSTALL_PROGRAM) $(program) $(bindir)/$(program)
	test ! -f $(program2p) \
	  || $(INSTALL_PROGRAM) $(program2p) $(bindir)/$(program2p)
	test ! -f $(program4) \
	  || $(INSTALL_PROGRAM) $(program4) $(bindir)/$(program4)
	test ! -f $(program4l) \
	  || $(INSTALL_PROGRAM) $(program4l) $(bindir)/$(program4l)
uninstall-exec:
	cd $(bindir); rm -f $(programs)

install-data:
	$(SHELL) $(top_srcdir)/../mkdirchain $(mandir) $(texinputdir) $(fontdir)
	$(INSTALL_DATA) $(srcdir)/dvilj.man $(mandir)/dvilj.$(manext)
	($(install_macros) && (cd tex; $(CP_R) . $(texinputdir))) || true
	($(install_fonts) && (cd fonts; $(CP_R) . $(fontdir))) || true	

uninstall-data:
	rm -f $(mandir)/dvilj.$(manext)


distname = dviljk
program_files = dvilj.man README.fonts
version_files = dvi2xx.c

pre-dist-$(distname):
post-dist-$(distname):
	cd $(distdir); ln -s $(lj)/fonts $(lj)/tex $(lj)/contrib .

# dist.make -- how to make the distribution tar file.

top_distdir = $(distname)-$(version)
top_files = ChangeLog FTP Makefile.in configure configure.in README \
  $(HOME)/gnu/gnuorg/COPYING* $(HOME)/gnu/gnuorg/install-sh \
  $(HOME)/bin/mkdirchain \
  $(plain)/texinfo.tex
distdir = $(top_distdir)/$(distname)
kpathsea_distdir = ../$(distname)/$(top_distdir)/kpathsea
ln_files = AUTHORS ChangeLog INSTALL NEWS README TAGS *.in *.h *.c \
  configure *.make .gdbinit stamp-auto

dist: depend.make TAGS pre-dist-$(distname)
	rm -rf $(top_distdir)*
	mkdir -p $(distdir)
	cd ..; make Makefile ./configure
	cd ..; cp -p $(top_files) $(distname)/$(top_distdir)
	ln -s $(gnu)/share/autoconf/acsite.m4 $(top_distdir)/aclocal.m4
	-ln $(ln_files) $(distdir)
	ln $(program_files) $(distdir)
	cd $(kpathsea_dir); $(MAKE) distdir=$(kpathsea_distdir) \
	  ln_files='$(ln_files)' distdir
	cp -rp ../make $(top_distdir)
	ungnumake $(distdir)/Makefile.in $(kpathsea_distdir)/Makefile.in \
	  $(top_distdir)/Makefile.in $(top_distdir)/make/*.make
# Remove the extra files our patterns got us.
	cd $(top_distdir); rm -f */depend.make */c-auto.h */Makefile
	$(MAKE) post-dist-$(distname)
	cd $(distdir); add-version $(version) $(version_files)
	cd $(distdir); test ! -r *.info || touch *.info*
	chmod -R a+rwX $(top_distdir)
	GZIP=-9 tar chzf $(top_distdir).tar.gz $(top_distdir)
	rm -rf $(top_distdir)
# config.make -- autoconf rules to remake the Makefile, c-auto.h, etc.

##ifdef HOSTNAME
##ac_dir = $(gnu)/share/autoconf
##autoconf = $(ac_dir)/acspecific.m4 $(ac_dir)/acgeneral.m4 $(ac_dir)/acsite.m4
##autoheader = $(ac_dir)/acconfig.h
##
### I define $(autoconf) to acgeneral.m4 and the other Autoconf files, so
### configure automatically gets remade in the sources with a new Autoconf
### release.  But it would be bad for installers with Autoconf to remake
### configure (not to mention require Autoconf), so I take out the variable
### $(autoconf) definition before release.
##configure_in = $(srcdir)/configure.in $(kpathsea_srcdir)/common.ac
##$(srcdir)/configure: $(configure_in) $(autoconf)
##	cd $(srcdir) && autoconf
##endif

config.status: $(srcdir)/configure
	$(SHELL) $(srcdir)/configure --no-create --verbose

Makefile: $(srcdir)/Makefile.in config.status $(top_srcdir)/../make/*.make
	$(SHELL) config.status

# This rule isn't used for web2c or the top-level Makefile, but it
# doesn't hurt.  We don't depend on config.status because configure
# always rewrites config.status, even when it doesn't change. Thus it
# might be newer than c-auto.h when we don't need to remake the latter.
c-auto.h: $(srcdir)/stamp-auto
$(srcdir)/stamp-auto: $(srcdir)/c-auto.h.in
	$(SHELL) config.status
	touch $(srcdir)/stamp-auto

##ifdef HOSTNAME
### autoheader reads acconfig.h (and c-auto.h.top) automatically.
##$(srcdir)/c-auto.h.in: $(srcdir)/stamp-auto.in
##$(srcdir)/stamp-auto.in: $(configure_in) $(autoheader) $(srcdir)/acconfig.h
##	cd $(srcdir) && autoheader
##	touch $(srcdir)/stamp-auto.in
##endif

info dvi check:

# misc.make -- cleaning, etc.
TAGS: *.c *.h
	if pwd | grep kpathsea >/dev/null; then \
	  etags *.c *.h; else etags -i $(kpathsea_dir)/TAGS *.c *.h; fi

mostlyclean::
	rm -f *.o $(program) $(programs) squeeze $(library).a

clean:: mostlyclean
	rm -f *.dvi *.lj

distclean:: clean
	rm -f Makefile MakeTeXPK *.pool
	rm -f config.status config.log config.cache c-auto.h 

# Although we can remake configure and c-auto.h.in, we don't remove
# them, since many people may lack Autoconf.  Use configclean for that.
realclean:: distclean
	rm -f TAGS *.info*

extraclean::
	rm -f *.aux *.bak *.bbl *.blg *.dvi *.log *.orig *.pl *.rej
	rm -f *.i *.s *.tfm *.vf *.vpl *\#* *gf *pk *~
	rm -f CONTENTS.tex a.out core mfput.* texput.*

configclean:
	rm -f configure c-auto.h.in c-auto.h

# Prevent GNU make 3.[59,63) from overflowing arg limit on system V.
.NOEXPORT:
# End of misc.make.

mostlyclean::
	rm -f $(programs)

# rdepend.make -- rules for remaking the dependencies.
# Have to use -M, not -MM, since we use <kpathsea/...> instead of
# "kpathsea/..." in the sources.  But that means we have to remove the
# directory prefixes and all the system include files.
# And <kpathsea/paths.h> is generated, not part of the distribution.
depend depend.make:: c-auto.h $(top_srcdir)/../make/rdepend.make
	$(CC) -M $(CPPFLAGS) *.c \
	  | sed -e 's,\.\./kpathsea/,$$(kpathsea_srcdir)/,g' \
	        -e 's,$$(kpathsea_srcdir)/paths.h,paths.h,g' \
	        -e 's,/usr[^ ]* ,,g' \
	        -e 's,/usr[^ ]*$$,,g' \
	        -e 's,dvi2xx.o,dvilj.o dvilj2p.o dvilj4.o dvilj4l.o,' \
	  | grep -v '^ *\\$$' \
	  >depend.make
# End of rdepend.make.
dvilj.o dvilj2p.o dvilj4.o dvilj4l.o: dvi2xx.c $(kpathsea_srcdir)/config.h ./c-auto.h $(kpathsea_srcdir)/c-std.h \
  $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
  $(kpathsea_srcdir)/c-memstr.h \
  $(kpathsea_srcdir)/c-errno.h $(kpathsea_srcdir)/c-minmax.h \
  $(kpathsea_srcdir)/c-limits.h \
  $(kpathsea_srcdir)/c-proto.h \
  $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/debug.h \
  $(kpathsea_srcdir)/magstep.h $(kpathsea_srcdir)/proginit.h $(kpathsea_srcdir)/progname.h \
  $(kpathsea_srcdir)/tex-glyph.h $(kpathsea_srcdir)/tex-file.h config.h commands.h 
tfm.o: tfm.c $(kpathsea_srcdir)/config.h ./c-auto.h $(kpathsea_srcdir)/c-std.h \
  $(kpathsea_srcdir)/c-unistd.h $(kpathsea_srcdir)/systypes.h \
  $(kpathsea_srcdir)/c-memstr.h \
  $(kpathsea_srcdir)/c-errno.h $(kpathsea_srcdir)/c-minmax.h \
  $(kpathsea_srcdir)/c-limits.h \
  $(kpathsea_srcdir)/c-proto.h \
  $(kpathsea_srcdir)/lib.h $(kpathsea_srcdir)/types.h $(kpathsea_srcdir)/debug.h \
  $(kpathsea_srcdir)/c-fopen.h $(kpathsea_srcdir)/tex-file.h config.h
