# Do not remove. Generated by Web2C for Win32 from Makefile.texk.contrib on Fri May 21 22:07:55 1999
!include "../../win32/winmake/inc.mk"
# End of generated configuration data.
# Makefile for MkTeX... programs which emulate the shell scripts.

!include <winmake/paths.mk>
!include <winmake/common.mk>
!include <winmake/library.mk>
!include <winmake/programs.mk>

DEFS = $(DEFS) -DKPATHSEA -DMAKE_MKTEX_DLL -DHAVE_CONFIG_H \
	-I.. -I../kpathsea -I$(REGEXLIBDIR)

c_auto_h_dir = $(kpathsea_srcdir)

!IFDEF MKTEX_DLL
MKTEX = $(objdir)\mktex.lib $(objdir)\mktex.dll
!ELSE
MKTEX = $(objdir)\mktex.lib
!ENDIF
mktex_objs = $(objdir)\fileutils.obj $(objdir)\mktex.obj \
#	$(objdir)\regex.obj \
	$(objdir)\variables.obj $(objdir)\stackenv.obj

mktex_progs = $(objdir)\mktexlsr.exe $(objdir)\mktexnam.exe \
	$(objdir)\mktexupd.exe $(objdir)\mktexpk.exe         \
	$(objdir)\mktexdir.exe $(objdir)\mktexmf.exe         \
	$(objdir)\mktextfm.exe

programs = $(objdir)\dvihp.exe $(objdir)\makempx.exe $(objdir)\mktex.exe \
	$(objdir)\fmtutil.exe 

!IFDEF MKTEX_DLL
default: $(objdir) $(kpathsea) $(objdir)\mktex.dll $(programs)

$(objdir)\mktex.lib: $(objdir) $(kpathsea) $(mktex_objs) 
	$(archive_command) /DEF $(mktex_objs)

$(objdir)\mktex.dll: $(objdir) $(kpathsea) $(mktex_objs) $(objdir)\mktex.lib $(objdir)\mktex.res $(regexlib)
	$(dll_command) $(mktex_objs) $(objdir)\mktex.exp $(objdir)\mktex.res $(LOADLIBES) $(regexlib)
!ELSE
default: $(objdir) $(kpathsea) $(programs)

$(objdir)\mktex.lib: $(objdir) $(kpathsea) $(mktex_objs) $(regexlib)
	$(archive_command) $(mktex_objs) $(regexlib)
!ENDIF

all: default
	for %%i in ($(mktex_progs)) \
		do $(CP) $(objdir)\mktex.exe $(objdir)\%%~nxi

$(objdir)\makempx.exe: $(objdir) $(kpathsea) $(objdir)\makempx.obj $(objdir)\mktex.lib $(objdir)\makempx.res 
	$(link_command) $(objdir)\makempx.obj $(objdir)\mktex.lib $(objdir)\makempx.res $(LOADLIBES)

$(objdir)\fmtutil.exe: $(objdir) $(kpathsea) $(objdir)\fmtutil.obj $(objdir)\mktex.lib
	$(link_command) $(objdir)\fmtutil.obj $(objdir)\mktex.lib $(LOADLIBES)

$(objdir)\dvihp.exe: $(objdir) $(kpathsea) $(objdir)\dvihp.obj \
	$(objdir)\mktex.lib $(objdir)\dvihp.res
	$(kpathsea_link) $(objdir)\dvihp.obj $(objdir)\mktex.lib           \
	$(objdir)\dvihp.res $(LOADLIBES)

$(objdir)\mktex.exe: $(objdir) $(objdir)\main.obj $(MKTEX)
	$(link_command) $(objdir)\main.obj $(objdir)\mktex.lib $(LOADLIBES)
	$(CP) $(objdir)\mktex.exe $(objdir)\mktexdir.exe

$(objdir)\makempx.obj:	makempx.c
	$(compile) -UMAKE_MKTEX_DLL makempx.c

$(objdir)\fmtutil.obj:	fmtutil.c
	$(compile) -UMAKE_MKTEX_DLL fmtutil.c

$(objdir)\main.obj: main.c
	$(compile) -UMAKE_MKTEX_DLL main.c

$(objdir)\dvihp.obj: dvihp.c
	$(compile) -UMAKE_MKTEX_DLL dvihp.c

!include <winmake/libsrul.mk>
!include <winmake/tkpathsea.mk>
!include <winmake/version.mk>
!include <winmake/man.mk>
!include <winmake/clean.mk>

install: all
!IFDEF MKTEX_DLL
	$(CP) $(objdir)\mktex.dll $(bindir)\mktex.dll
!ENDIF
	for %%i in ($(programs)) \
		do $(CP) %%i $(bindir)\%%~nxi
	for %%i in ($(mktex_progs)) \
		do $(CP) $(objdir)\mktex.exe $(bindir)\%%~nxi

check:

!include <winmake/rdepend.mk>
!include "./depend.mk"

#Local Variables:
#mode: Makefile
#End:
