## Makefile for DVIcopy (Win32 version)		-*- Makefile -*-
## Time-stamp: "97/08/04 00:10:12 mik"

!include ..\miktex.inc

srcdir = .
dvicopy_web = $(srcdir)\dvicopy.web

.c.obj:
	$(CC) -c -I$(srcdir) -I$(srcdir)\..\lib -DMIKTEX_DLL $(release_info) \
			-MD -O2 $(cflags) $(CFLAGS) $<

all: dvicopy.exe

dvicopy.exe: dvicopy.obj $(libdir)\miktex.lib dvicopy.res
	link $(ldflags) $(LDFLAGS) -out:$@ $**

dvicopy.res: dvicopy.rc $(libdir)\miktex.version $(libdir)\version.h
	rc -I$(libdir) dvicopy.rc

dvicopy.c dvicopy.h: dvicopy.p
	$(C4P) $(C4PFLAGS) --rename link --rename index \
		--include-filename=miktex.h --one=dvicopy dvicopy.p

dvicopy.p: $(dvicopy_web) dvicopy.win32-changes
	$(TANGLE) $(dvicopy_web) $(srcdir)\dvicopy.win32-changes dvicopy.p nul

install: dvicopy.exe
	$(INSTALL_PROGRAM) dvicopy.exe $(bindir)\dvicopy.exe

uninstall:

mostlyclean:
	-del *.obj
	-del *.c
	-del *.h
	-del *.p
	-del *.exp
	-del *.res

clean: mostlyclean
	-del *.exe
	-del *.ilk
	-del *.pdb

distclean: clean
	-del makefile.win32.bak

realclean: distclean

depend: dvicopy.c
	makedepend -f makefile.win32 -I$(srcdir) -I..\lib $**

# DO NOT DELETE

dvicopy.obj: ..\lib/miktex.h ..\lib/c4plib.h dvicopy.h
