#
# Makefile for Lava Flow Simulator
#
# Sample code by Microsoft Multimedia Systems
#
#
#     (C) Copyright Microsoft Corp. 1991.  All rights reserved.
#
#     You have a royalty-free right to use, modify, reproduce and 
#     distribute the Sample Files (and/or any modified version) in 
#     any way you find useful, provided that you agree that 
#     Microsoft has no warranty obligations or liability for any 
#     Sample Application Files which are modified. 
#

INC=-I.

CC  = cl -c -W2 -AS -Gsw -Gh -Zip -Osa -G2 $(INC)
ASM = masm -Mx -Zi $(INC)
LINK= link /NOE/MAP/NOD/CO/LI

NAME= lava

OBJ  = $(NAME).obj lv.obj sqrt.obj
LIBS = libw slibcew

.c.obj:
	$(CC) $*.c

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

goal: $(NAME).exe

$(NAME).exe: $(OBJ) $(NAME).res $(NAME).def
        $(LINK) @<<
        $(OBJ),
        $(NAME),
        $(NAME),
        $(LIBS),
        $(NAME).def
<<
        -cvpack -p $(NAME).exe
        rc -t $(NAME).res $(NAME).exe
        -mapsym $(NAME).map


$(NAME).obj: $(NAME).c
	$(CC) $*.c

$(NAME).res: $(NAME).rc
        rc -r $(INC) $(NAME).rc

clean:
	del $(NAME).exe
        del *.res
        del *.obj
        del *.map
	del *.sym

# START Dependencies 
lava.obj: lava.c lava.h

lv.obj: lv.asm

sqrt.obj: sqrt.asm

# END Dependencies 
