## Makefile for installation program (Win32 version)	-*- Makefile -*-
## Time-stamp: "97/08/24 22:22:41 mik"

!include ..\miktex.inc

prefix = ..\..\..

INSTALL_PROGRAM = copy

all: install.exe unzip.exe

install: install.exe unzip.exe
	$(INSTALL_PROGRAM) install.exe $(prefix)\install.exe
	$(INSTALL_PROGRAM) unzip.exe $(prefix)\unzip.exe

install.dat: src$(major_version_number)$(minor_version_number).mft
	perl makedist.pl $(major_version_number) $(minor_version_number)

src$(major_version_number)$(minor_version_number).mft:
	@echo source/miktex-$(version_number)/*> $@

install.obj: install.c md5.h install.dat
	$(CC) -c -O2 $(cflags) $(CFLAGS) install.c

md5.obj: md5.c md5.h global.h
	$(CC) -c -O2 $(CFLAGS) md5.c

install.exe: install.dat install.obj md5.obj
	link $(ldflags) $(LDFLAGS) install.obj md5.obj advapi32.lib

uninstall:

mostlyclean:
	-del *.obj
	-del *.res
	-del *.ilk

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

distclean: clean
	-del *.opt

realclean: distclean
	-del install.dat
