# Generated automatically from Makefile.in by configure.
# Makefile for TeX-project WEB sources to C conversion programs.

# These get expanded from the parent directory, not this one.
# common.mk -- used by all Makefiles.
SHELL = sh
MAKE = make

top_srcdir = ..
srcdir = .

WD = setargv.obj
CC = cl
#
# for Release
#
CFLAGS = -nologo -W3 -favor:blend -MD -DWIN32=1 -DHAVE_DECL_STRSTR=1 -DHAVE_STRING_H $(XCFLAGS)
LKDEBUG =
#
# for Debug
#
#CFLAGS = -nologo -MD -Od -Zi -DWIN32=1 -DHAVE_DECL_STRSTR=1 -DHAVE_STRING_H $(XCFLAGS)
#LKDEBUG = -link /DEBUG

CPPFLAGS =  $(XCPPFLAGS)

YDEFS = -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE \
-D_CRT_OBSOLETE_NO_DEPRECATE -D_SECURE_SCL=0 -D__STDC_VERSION__=199901L

DEFS = -DW32TEX=1 -DHAVE_CONFIG_H -DYY_NO_UNISTD_H=1 $(XDEFS) $(YDEFS)

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

kpathsea_parent = ../..
kpathsea_dir = $(kpathsea_parent)/kpathsea
kpathsea_srcdir_parent = $(top_srcdir)/..
kpathsea_srcdir = $(kpathsea_srcdir_parent)/kpathsea
kpathsea = $(kpathsea_dir)/kpathsealibw64.lib

# 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$(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 = cp
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = $(INSTALL_PROGRAM)
INSTALL_DATA = ${INSTALL}
INSTALL_LIBTOOL_LIBS =
INSTALL_LIBTOOL_PROG =

# Creating (symbolic) links.
LN = ln

#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.
# 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 = c:/usr/local

# 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.
# web2c/kpathsea.mk -- In subdirectories of web2c, the build directory
# for kpathsea is one more level up.  c_auto_h_dir is used by make depend.
kpathsea_parent = ../..
c_auto_h_dir = ..

prog_cflags = -I.. -I$(srcdir)/..
# End of web2c/kpathsea.mk.

LEX = flex
LEXLIB =
LEX_OUTPUT_ROOT = lex.yy
YACC = bison -y

proglib = ../lib/lib.lib
programs = omfonts.exe
linked_programs = ofm2opl.exe opl2ofm.exe ovf2ovp.exe ovp2ovf.exe
scripts = 

omfonts_objects = omfonts.obj pl-parser.obj pl-lexer.obj \
                  char_routines.obj dimen_routines.obj error_routines.obj \
                  header_routines.obj ligkern_routines.obj list_routines.obj \
                  out_routines.obj param_routines.obj print_routines.obj \
                  font_routines.obj extra_routines.obj out_ofm.obj \
                  parse_ofm.obj

h_files = char_routines.h dimen_routines.h error_routines.h \
          font_routines.h header_routines.h ligkern_routines.h \
          list_routines.h out_routines.h param_routines.h print_routines.h \
          extra_routines.h manifests.h parser.h out_ofm.h dvi.h \
          parse_ofm.h omfonts.h

all: omfonts.exe ofm2opl.exe opl2ofm.exe ovf2ovp.exe ovp2ovf.exe

omfonts.exe: $(omfonts_objects)
	$(kpathsea_link) $(omfonts_objects) $(WD) $(LEXLIB) $(LOADLIBES) $(LKDEBUG) 

ofm2opl.exe: ofm2opl.obj
	$(kpathsea_link) ofm2opl.obj $(WD)

opl2ofm.exe: opl2ofm.obj
	$(kpathsea_link) opl2ofm.obj $(WD)

ovf2ovp.exe: ovf2ovp.obj
	$(kpathsea_link) ovf2ovp.obj $(WD)

ovp2ovf.exe: ovp2ovf.obj
	$(kpathsea_link) ovp2ovf.obj $(WD)

omfonts.obj: omfonts.c pl-parser.h
ofm2opl.obj: ofm2opl.c
opl2ofm.obj: opl2ofm.c
ovf2ovp.obj: ovf2ovp.c
ovp2ovf.obj: ovp2ovf.c

#pl-parser.c pl-parser.h: pl-parser.y
#	$(YACC) -d -v $(srcdir)/pl-parser.y
#	-test -f y.tab.c && mv -f y.tab.c pl-parser.c
#	-test -f y.tab.h && mv -f y.tab.h pl-parser.h

pl-lexer.obj: pl-lexer.c pl-parser.h

#$(LEX_OUTPUT_ROOT).c: pl-lexer.l
#	$(LEX) $(srcdir)/pl-lexer.l

$(programs): $(proglib) $(kpathsea)

$(omfonts_objects): $(h_files)

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.
# clean.mk -- cleaning.

BINS=omfonts.exe opl2ofm.exe ofm2opl.exe ovp2ovf.exe ovf2ovp.exe
ZZZ=c:/usr/local/txdir/w32tex/bin64

install: $(BINS) 
	cp -p $(BINS) c:/usr/work/edrive/wk/w64dist/ALEPH/bin64/
	cp -p $(BINS) $(ZZZ)/

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

# Although we can remake configure and c-auto.in, we don't remove
# them, since many people may lack Autoconf.  Use configclean for that.

# rdepend.mk -- rules for remaking the dependencies.

TAGS: *.c *.h
	pwd | grep kpathsea >/dev/null && append=../kpathsea/TAGS; \
	  etags $$append *.[ch]

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