#**	Makefile for COW, Character Oriented Window User Interface.
#
#	Functional Description.
#	This file builds the COW User Interface.
#
#	Modification history.
#	S. E. Jones	91/05/10.	Cloned from STARLITE UTIL's MAKEFILE.
#	S. E. Jones	91/05/14.	Added POPUP.C.
#	S. E. Jones	92/07/15.	#1.099, added MASM600 stuff.
#	S. E. Jones	92/09/28.	#1.100, added STREAM stuff.
#	S. E. Jones	92/10/19.	#1.100, removed CPRINTF.OBJ target.

.SUFFIXES:	.c .asm .obj .lst .def .lnk .lrf .exe .com .inc

LINK=	link
LFLAGS= /NOD/SEGMENTS:512
LIBS=	libh.lib+llibcr.lib
GLIBS=	libh.lib+llibcr.lib+graphics.lib
C=	cl
CFLAGS= /AL /Gs /Ox /c /Zp1 /FoOBJ\ /c
ASM=	masm
AFLAGS= /Ml

#	If you are using MASM 5.1, you'll need to disable the following
#	line by inserting a leading pound sign (#).  Note that MASM600
#	is the name of the "compatibility driver" that calls ML automatically.
#	This enables us to keep the same command-line syntax in the makefile.

ASM=	masm600 /T

#	Rules for generating object files.

.asm.obj:
	$(ASM) $(AFLAGS) $*.asm;

.asm.lst:
	$(ASM) -l -n $(AFLAGS) $*.asm;

.c.obj:
	$(C) $(CFLAGS) $*.c

#	Rules for building objects go here.

all: test.exe

test.exe: obj\test.obj obj\window.obj obj\field.obj obj\list.obj \
	obj\stream.obj obj\input.obj obj\screen.obj obj\popup.obj \
	obj\menu.obj obj\util.obj
	$(LINK) $(LFLAGS) @test.lrf,,,$(LIBS);

#	Rules for object files go here.

obj\test.obj: test.c cow.h
	$(C) $(CFLAGS) test.c

obj\window.obj: window.c cow.h
	$(C) $(CFLAGS) window.c

obj\popup.obj: popup.c cow.h
	$(C) $(CFLAGS) popup.c

obj\menu.obj: menu.c cow.h
	$(C) $(CFLAGS) menu.c

obj\field.obj: field.c cow.h
	$(C) $(CFLAGS) field.c

obj\screen.obj: screen.c cow.h
	$(C) $(CFLAGS) screen.c

obj\list.obj: list.c cow.h
	$(C) $(CFLAGS) list.c

obj\stream.obj: stream.c cow.h
	$(C) $(CFLAGS) stream.c

obj\input.obj: input.c cow.h
	$(C) $(CFLAGS) input.c

obj\util.obj: util.c cow.h
	$(C) $(CFLAGS) util.c
