# Generated automatically from Makefile.in by configure.
# Makefile for tex4ht  -- S. Rahtz s.rahtz@elsevier.co.uk
version = 1.0

# paths.mk -- installation directories.
#
# The compile-time paths are defined in kpathsea/paths.h, which is built
# from kpathsea/texmf.in and these definitions.  See kpathsea/INSTALL
# for 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 = c:/usr/local
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}/share

# Header files.
includedir = ${prefix}/include

# GNU .info* files.
infodir = ${prefix}/info

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

# TeX system-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/texmf.in. Passing all the
# paths to sub-makes can make the arg list too long on system V.
# Note that if you make changes below, you will have to make the
# corresponding changes to texmf.in or texmf.cnf yourself.

# The root of the main tree.
texmf = c:/usr/local/share/texmf

# The directory used by varfonts.
vartexfonts = c:/var/tex/fonts

# Regular input files.
texinputdir = $(texmf)/tex
mfinputdir = $(texmf)/metafont
mpinputdir = $(texmf)/metapost
mftinputdir = $(texmf)/mft

# dvips's epsf.tex, rotate.tex, etc. get installed here;
# ditto for dvilj's fonts support.
dvips_plain_macrodir = $(texinputdir)/plain/dvips
dvilj_latex2e_macrodir = $(texinputdir)/latex/dvilj

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

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

# Memory dumps (.fmt/.base/.mem).
fmtdir = $(web2cdir)
basedir = $(fmtdir)
memdir = $(fmtdir)

# Pool files.
texpooldir = $(web2cdir)
mfpooldir = $(texpooldir)
mppooldir = $(texpooldir)

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

# For dvips configuration files, psfonts.map, etc.
dvipsdir = $(texmf)/dvips

# For dvips .pro files, gsftopk's render.ps, etc.
psheaderdir = $(dvipsdir)

# 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).
# This list must be sorted in ascending order.
default_texsizes = 300:600

# End of paths.mk.
# common.mk -- used by all Makefiles.
SHELL = sh
MAKE=make
top_srcdir = .
srcdir = .

CC = cl

CFLAGS = -nologo -MD -O2 -DWIN32=1 -DW32TEX=1 -DKPATHSEA=1 $(XCFLAGS)
LKDEB =

#CFLAGS = -nologo -MD -Od -Zi -DWIN32=1 -DW32TEX=1 -DKPATHSEA=1 $(XCFLAGS)
#LKDEB = -link /DEBUG

CPPFLAGS =  $(XCPPFLAGS)

YDEFS = -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE \
-D_CRT_OBSOLETE_NO_DEPRECATE -D_SECURE_SCL=0

DEFS = -DHAVE_CONFIG_H $(XDEFS) $(YDEFS)

# Kpathsea needs this for compiling, programs need it for linking.
LIBTOOL =

# You can change [X]CPPFLAGS, [X]CFLAGS, or [X]DEFS, but
# please don't change ALL_CPPFLAGS or ALL_CFLAGS.
# prog_cflags is set by subdirectories of web2c.
ALL_CPPFLAGS = $(DEFS) -I. -I../kpathsea -I$(srcdir) -I$(kpathsea_parent) \
  -I$(kpathsea_srcdir_parent) $(prog_cflags) $(CPPFLAGS)
ALL_CFLAGS = $(ALL_CPPFLAGS) $(CFLAGS) -c
compile = $(CC) $(ALL_CFLAGS)

.SUFFIXES:
.SUFFIXES: .c .obj # in case the suffix list has been cleared, e.g., by web2c
.c.obj:
	$(compile) $<

# Installation.
INSTALL =
INSTALL_PROGRAM =
INSTALL_SCRIPT =
INSTALL_DATA =
INSTALL_LIBTOOL_LIBS =
INSTALL_LIBTOOL_PROG =

# Creating (symbolic) links.
LN = ln

# We use these for many things.
kpathsea_parent = ..
kpathsea_dir = $(kpathsea_parent)/kpathsea
kpathsea_srcdir_parent = $(top_srcdir)/..
kpathsea_srcdir = $(kpathsea_srcdir_parent)/kpathsea
kpathsea = $(kpathsea_dir)/kpathsealib.lib

#M#ifeq ($(CC), gcc)
#M#XDEFS = -Wpointer-arith $(warn_more)
#M#CFLAGS = -pipe -g $(XCFLAGS)
#M#endif
# End of common.mk.
# programs.mk -- used by Makefiles for executables only.

# Don't include $(CFLAGS), since ld -g under Linux forces
# static libraries, e.g., libc.a and libX*.a.
LDFLAGS =  $(XLDFLAGS)

# proglib is for web2c; 
# XLOADLIBES is for the installer.
LIBS = 
LOADLIBES = $(proglib) $(kpathsea) $(LIBS) $(XLOADLIBES)

# May as well separate linking from compiling, just in case.
CCLD = $(CC)
link_command = $(CCLD) -Fe$@ $(LDFLAGS) 

# When we link with Kpathsea, have to take account that it might be a
# shared library, etc.
kpathsea_link = $(link_command)
# End of programs.mk.
# texi.mk -- making .dvi and .info from .texi.
#M#MAKEINFO = makeinfo
#M#MAKEINFO_FLAGS = --paragraph-indent=2 -I$(srcdir)

#M#TEXI2DVI = texi2dvi
#M## To make sure that generation of the dvi files succeeds on the
#M## maintainer's system.
#M#TEXI2DVI = TEXMFCNF=$(web2cdir) texi2dvi

#M#TEXI2HTML = texi2html
#M#TEXI2HTML_FLAGS = -expandinfo -number -menu -split_chapter
# If you prefer one big .html file instead of several, remove
# -split-node or replace it by -split_chapter.

# For making normal text files out of Texinfo source.
#M#one_info = --no-headers --no-split --no-validate

#M#.SUFFIXES: .info .dvi .html .texi
#M#.texi.info:
#M#	$(MAKEINFO) $(MAKEINFO_FLAGS) $< -o $@
#M#.texi.dvi:
#M#	$(TEXI2DVI) $(TEXI2DVI_FLAGS) $<
#M#.texi.html:
#M#	$(TEXI2HTML) $(TEXI2HTML_FLAGS) $< 
# End of texi.mk.
prog_cflags = -DNeedFunctionPrototypes

objects = tex4ht.obj t4ht.obj

#programs = tex4ht.exe t4ht.exe runht.exe hterasefile.exe htrenamefile.exe \
#           htcopyfile.exe

programs = tex4ht.exe t4ht.exe

scripts =  httex httexi htlatex ht


default all: $(programs)  

hterasefile.exe: $(kpathsea) hterasefile.obj
	$(kpathsea_link) hterasefile.obj setargv.obj $(LOADLIBES)

htrenamefile.exe: $(kpathsea) htrenamefile.obj
	$(kpathsea_link) htrenamefile.obj setargv.obj $(LOADLIBES)

htcopyfile.exe: $(kpathsea) htcopyfile.obj
	$(kpathsea_link) htcopyfile.obj setargv.obj $(LOADLIBES)

runht.exe: $(kpathsea) runht.obj
	$(kpathsea_link) runht.obj setargv.obj $(LOADLIBES)

t4ht.exe: $(kpathsea) t4ht.obj
	$(kpathsea_link) t4ht.obj setargv.obj $(LOADLIBES) $(LKDEB)

tex4ht.exe: $(kpathsea) tex4ht.obj
	$(kpathsea_link) tex4ht.obj user32.lib setargv.obj $(LOADLIBES) $(LKDEB)

# tkpathsea.mk -- target for remaking kpathsea.
makeargs = $(MFLAGS) CC='$(CC)' CFLAGS='$(CFLAGS)' $(XMAKEARGS)

# This is wrong: the library doesn't depend on kpsewhich.c or
# acconfig.h.  But what to do?
$(kpathsea): $(kpathsea_srcdir)/*.c $(kpathsea_srcdir)/*.h
	cd $(kpathsea_dir) && $(MAKE) $(makeargs)
# End of tkpathsea.mk.

# BINS=htcopyfile.exe hterasefile.exe htrenamefile.exe t4ht.exe tex4ht.exe
BINS=t4ht.exe tex4ht.exe

install: $(BINS)
	cp -p $(BINS) c:/usr/local/txdir/w32tex/bin/
	cp -p $(BINS) c:/usr/work/edrive/wk/dist/TEX4HT/bin/

uninstall: uninstall-exec uninstall-data

install-exec: all
	$(SHELL) $(top_srcdir)/../mkinstalldirs $(bindir)
	for p in $(programs); do $(INSTALL_LIBTOOL_PROG) $(bindir) $$p; done
	for p in $(scripts); do $(INSTALL_SCRIPT) $(srcdir)/$$p $(bindir)/$$p; done

uninstall-exec:
	for p in $(programs) $(scripts); do rm -f $(bindir)/$$p; done

install-data: tex4ht.env
	$(SHELL) $(top_srcdir)/../mkinstalldirs  $(texmf)/tex4ht/base
	$(INSTALL_DATA) tex4ht.env $(texmf)/tex4ht/base

uninstall-data:

distname = tex4ht

# End of config.mk.
# clean.mk -- cleaning.
mostlyclean::
	rm -f *.obj *~

clean:: mostlyclean
	rm -f $(program) $(programs) squeeze.exe lib$(library).* $(library).lib *.bad
	rm -f *.exe *.dvi *.lj

distclean:: extraclean clean
	rm -f Makefile
	rm -f config.status config.log config.cache c-auto.h
	rm -f stamp-auto stamp-tangle stamp-otangle

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

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

configclean:
	rm -f configure c-auto.in c-auto.h stamp-*
# End of clean.mk.
distclean::
	-rm v*.tex *.txt i*.tex *.gif *.toc *.otc *.lg *.xref *.html *.idv *.log *.aux tmp.* tex4ht.env

dvi info check: 

maybecheck:
	TEXINPUTS=$(srcdir): $(SHELL) $(srcdir)/ht latex test


tex4ht.env: tex4ht.in
	sed -e "s;@texmf@;$(texmf);" < tex4ht.in \
	| sed -e "s;c:/usr/local;$(prefix);g" \
	| sed -e "s;@imbindir@.;;g" \
	| sed -e "s/Mmove/Mmv/" \
	| sed -e "s/Ccopy/Ccp/" \
	> tex4ht.env

.NOEXPORT:

include depend.mk
