#
# MAKEFILE
# StatStrip Test Version 1.00, March 1993
#
# Copyright (c)1993 Microsoft Corporation, All Rights Reserved
#
# Kraig Brockschmidt, Software Design Engineer
# Microsoft Systems Developer Relations
#
# Internet  :  kraigb@microsoft.com
# Compuserve:  >INTERNET:kraigb@microsoft.com
#

#
#Add '#' to following line for 'noisy' operation
!CMDSWITCHES +s

#
#Compiler flags
#Use "SET RETAIL=1" from MS-DOS to compile non-debug version.
#
!ifndef RETAIL
CFLAGS  = -c -Od -AS -Zipe -G2sw -W3 -GA -GEes
LINK    = /al:16/ONERROR:NOEXE/CO
DEFS    = -DSTRICT -DDEBUG
!else
CFLAGS  = -c -Oas -AS -Zpe -G2sw -W3 -GA -GEes
LINK    = /al:16/ONERROR:NOEXE
DEFS    =
!endif



.SUFFIXES: .h .c .obj .exe .cpp .res .rc

goal:  stdemo.exe

INCLS  =stdemo.h

OBJS   =stdemo.obj init.obj
RCFILES=stdemo.ico


clean:
    rm *.obj
    rm *.exe
    rm *.res
    rm err


#####
.c.obj:
    echo ++++++++++
    echo Compiling $*.c
    cl $(CFLAGS) $(DEFS) $*.c


.rc.res:
    echo +++++++++
    echo Compiling Resources
    rc -r $*.rc


#This rule builds a linker response file on the fly depending on debug flags
stdemo.exe : $(OBJS) stdemo.res
    echo stdemo init                              > stdemo.lrf
    echo stdemo.exe $(LINK)                      >> stdemo.lrf
    echo nul/li                                  >> stdemo.lrf
    echo libw slibcew commdlg stastrip/NOD/NOE   >> stdemo.lrf
    echo stdemo.def                              >> stdemo.lrf

    link @stdemo.lrf
    rc -v stdemo.res
    del stdemo.lrf


##### Dependencies #####

stdemo.obj    : stdemo.c    $(INCLS)
init.obj      : init.c      $(INCLS)
stdemo.res    : stdemo.rc   $(INCLS) $(RCFILES)
