#
# MAKEFILE
# GizmoBar Test Version 1.00, March 1993
#
# Copyright (c)1992 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
LINK    = /al:16/ONERROR:NOEXE/CO
DEFS    = -DDEBUG
LIBS    = libw slibcew bttncur gizmobar commdlg
!else
CFLAGS  = -c -Oas -AS -Zpe -G2sw -W3
LINK    = /al:16/ONERROR:NOEXE
DEFS    =
LIBS    = libw slibcew bttncur gizmobar commdlg
!endif


#Files on which every C file depends.  Add others as appropriate
INCLS=gbdemo.h

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

goal:  gbdemo.exe


OBJS   =gbdemo.obj init.obj
RCFILES=gbdemo.ico image72.bmp image96.bmp image120.bmp


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
gbdemo.exe : $(OBJS) gbdemo.res gbdemo.def
    echo ++++++++++
    echo Linking $@
    echo gbdemo init                     > gbdemo.lrf

    echo gbdemo $(LINK)                 >> gbdemo.lrf
    echo nul/li                         >> gbdemo.lrf
    echo $(LIBS)/NOD/NOE                >> gbdemo.lrf
    echo gbdemo.def                     >> gbdemo.lrf

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



##### Dependencies #####

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