#
# Makefile  -  makefile for ANSI display driver
#
# Copyright (C) 1995,1996 Gero Kuhlmann <gero@gkminix.han.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
#  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 the Free Software
#  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#


#
#  Include system dependent definitions:
#
include ../../config.mk


#
#  List of source and object files:
#
CSRCS	= 
ASRCS	= ansidrv.asm
OBJS	= ansidrv.obj
TARGET	= ansidrv.com


#
#  Rules to create object files from source files:
#
.SUFFIXES:	.c .asm .obj .exe .lib

.c.obj: 
ifdef VERBOSE
	$(CC) -y -c $(CFLAGS) $(UTLCFL) $<
else
	$(CC) -y -c $(CFLAGS) $(UTLCFL) $< >NUL
endif

.asm.obj:
	$(ASM) $(AFLAGS) $(UTLAFL) $< ;


#
#  Target rules.
#
all:		$(TARGET)

exebin.bat:	dummy
	@$(RM) exebin.bat
	@echo @$(DOBIN) %1.exe %1.com >exebin.bat

$(TARGET):	$(OBJS) exebin.bat
	$(LNKP) $(LFLAGS) $(OBJS), $(TARGET:%.com=%.exe) ;
	exebin $(TARGET:%.com=%)
	@copy $@ .. >NUL
	@$(RM) $(OBJS)


#
#  Maintenance rules for cleaning up.
#
.PHONY:	clean

clean:
	-$(RM) $(TARGET)
	-$(RM) $(TARGET:%.com=%.exe)
	@$(RM) exebin.bat
	-$(RM) *.obj
	-$(RM) *.lst
	-$(RM) *.map
	-$(RM) *.bak


dummy:

