#-----------------------------------------------------------------------------
#                    MASTERING TURBO ASSEMBLER 2nd Ed.
#                              by Tom Swan
#
#       Make-file for WinApp sample Windows application. To assemble
#       and link the program, open a DOS PROMPT window and enter this
#       command:
#
#               MAKE
#
#       To assemble with debugging information so you can run the
#       program under Turbo Debugger for Windows (TDW), define the
#       DEBUG symbol as follows:
#
#               MAKE -Ddebug
#
#       To create a listing file (WHELLO.LST) define LISTING:
#
#               MAKE -Dlisting
#
#       To rebuild the program (for example, to add debugging
#       information if you didn't do so the last time you assembled and
#       linked the code), use the -B option:
#
#               MAKE -B
#
#       You may combine the preceding commands. For example,
#       to rebuild the program with debugging information and
#       to create a listing, enter:
#
#               MAKE -B -Ddebug -Dlisting
#
#    *  In addition to Turbo Assembler 4.0, you also need the following
#       files and utilities from Borland C++ (or another Windows C,
#       C++, or Pascal development system). Turbo Assembler 4.0
#       provides only the first of these extra items. You must supply
#       the others:
#
#       File/Utility    Usual location    Description
#
#    *  WINDOWS.INC     C:\tasm\include   Windows ASM declarations
#       IMPORT.LIB      C:\bc4\lib        Windows function API
#       BRC.EXE         C:\bc4\bin        Resource compiler
#       WINSTUB.EXE     C:\bc4\bin        DOS exe stub
#       WINDOWS.H       C:\bc4\include    Windows C declarations
#
#       Copyright (c) 1995 by Tom Swan. All rights reserved.
#-----------------------------------------------------------------------------

#----- Adjust the following pathnames as needed:

LIB     = C:\bc4\lib
AINC    = C:\tasm\include
CINC    = C:\bc4\include

#----- The rest of this file should require no changes.

!if $d(DEBUG)
ADEBUG  = /zi
LDEBUG  = /v
!else
ADEBUG  =
LDEBUG  =
!endif

!if $d(LISTING)
LSTNG   = /l
!else
LSTNG   =
!endif

AOPTS   = /ml $(LSTNG) /i$(AINC) $(ADEBUG)
LOPTS   = /Twe /L$(LIB) $(LDEBUG)
OBJS    = winapp.obj
LIBS    = import

depends: winapp.exe

winapp.res: winapp.rc winapp.ico winapp.rh winapp.ri
  brc -r -i$(CINC) winapp.rc

winapp.obj: winapp.asm winapp.ri
  tasm $(AOPTS) winapp.asm

winapp.exe: winapp.obj winapp.def winapp.res
  tlink $(LOPTS) $(OBJS),winapp.exe,,$(LIBS),winapp.def
  brc winapp.res
