#	MAKEFILE
#	Borland Pascal 7.0 Makefile for DOS
#	----------------------------------------------------------------------
#	Copyright (c) 1994-98 by Florian Painke (f.painke@gmx.de).

#	This program is free software; you can redistribute it and/or modify
#	it under the terms of the GNU General Public License as published by
#	the Free Software Foundation; either version 2 of the License, or
#	(at your option) any later version.

#	This program is distributed in the hope that it will be useful, but
#	WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#	General Public License for more details.

#	You should have received a copy of the GNU General Public License
#	along with this program; if not, write to
#		Free Software Foundation, Inc.
#		59 Temple Place - Suite 330
#		Boston, MA 02111-1307, USA
#	or visit the GNU Homepage at http://www.gnu.org/.

.silent
.autodepend

# Version Number
!ifndef VERNUM
VERNUM = 107
!endif

# Language
!ifndef LANG
LANG =	DE
!endif

# Paths
INCLUDE =	$(LANG)

# Options
BPCOPTS =	/CD /I$(INCLUDE) /DDEBUG /V
ASMOPTS =	/i$(LANG) /m /mu /w2
LINKOPTS =	/t

# Dependants
XFDISK =\
	HDEBUG.INC\
	XFDISK.PAS\
	XBOOTM.INC\
	XIO.INC\
	XMENU.INC\
	XPART.INC\
	XTYPES.INC

BOOT =\
	$(LANG)\MBR.BIN\
	$(LANG)\MENU.CRY



# Targets
$(LANG)\BIN\XFDISK.EXE :	$(XFDISK) $(LANG)\HLANG.INC DISKCTRL.TPU MISC.TPU $(BOOT) SETCHECK.EXE MAKEFILE
	bpc $(BPCOPTS) $&
	copy $.+$(LANG)\MBR.BIN+$(LANG)\MENU.CRY $(LANG)\BIN\$. /B
	setcheck $(LANG)\BIN\$.

DISKCTRL.TPU :	DISKCTRL.PAS HDEBUG.INC MISC.TPU MAKEFILE
	bpc $(BPCOPTS) $&

MISC.TPU :	MISC.PAS HDEBUG.INC MAKEFILE
	bpc $(BPCOPTS) $&

$(LANG)\MBR.BIN :	MBR.ASM $(LANG)\MBR.INC MAKEFILE
	tasm $(ASMOPTS) $&
	tlink $(LINKOPTS) $&,$&.BIN
	move $. $(LANG)

$(LANG)\MENU.CRY :	MENU.ASM $(LANG)\MENU.INC BIN2CRY.EXE MAKEFILE
	tasm $(ASMOPTS) $&
	tlink $(LINKOPTS) $&,$&.BIN
	bin2cry $&
	move $. $(LANG)

SETCHECK.EXE :	SETCHECK.PAS MISC.TPU
	bpc $(BPCOPTS) $&

BIN2CRY.EXE :	BIN2CRY.PAS MAKEFILE
	bpc $(BPCOPTS) $&

$(LANG)\XFD$(VERNUM)$(LANG).ZIP :	$(LANG)\BIN\XFDISK.EXE MAKEFILE
	zip -j $(LANG)\$. GPL.TXT $(LANG)\BIN\*

clean :
	if exist *.obj del *.obj
	if exist *.bin del *.bin
	if exist *.map del *.map

all :	clean XFDISK.EXE

archive :	$(LANG)\XFD$(VERNUM)$(LANG).ZIP
