#
# makefile - make file for showgrp application. Build nodebug by default.
#
NODEBUG     = 1

ALL         = ALL                         # NMAKE requirement
APP         = showgrp                     # Application name
MODEL       = M                           # memory model
LIBS        = mlibcew libw                # library
DEF         = $(APP).def                  # .DEF file
EXE         = $(APP).exe                  # executable
MAP         = $(APP).map                  # map file
RCOPTS      = -r                          # rc switch(es)
RC          = $(APP).rc                   # rc file
RES         = $(APP).res                  # resource file
                                          
!IF $(NODEBUG)
CLOPTS    = -W3 -c -A$(MODEL) -Gsw -Zp
LINKOPTS  = /NOD /MAP
!ELSE                                     
CLOPTS    = -W3 -c -A$(MODEL) -Gsw -Od-Zip
LINKOPTS  = /CO /NOD /MAP               
!ENDIF


# object modules
OBJS      = $(APP).obj winmain.obj init.obj about.obj
HEADERS   = $(APP).h winmain.h init.h about.h

$(ALL): $(EXE)

.c.obj: 
    cl $(CLOPTS) $*.c

.rc.res:
    rc $(RCOPTS) $(RC)

$(EXE): $(OBJS) $(RES) $(HEADERS)
    link $(LINKOPTS) $(OBJS), $(EXE), $(MAP),$(LIBS), $(DEF)
    mapsym showgrp.map
    rc -t $(RES)
