#-----------------------------------------------------------------------------
#                    MASTERING TURBO ASSEMBLER 2nd Ed.
#                              by Tom Swan
#
#       Make-file for WHello 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 files. You must supply
#       the other three:
#
#       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
#
#       Copyright (c) 1995 by Tom Swan. All rights reserved.
#-----------------------------------------------------------------------------

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

LIB     = C:\bc4\lib
INC     = C:\tasm\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$(INC) $(ADEBUG)
LOPTS   = /Twe /L$(LIB) $(LDEBUG)
OBJS    = whello.obj
LIBS    = import

depends: whello.exe

whello.res: whello.rc whello.ico
  brc -r whello.rc

whello.obj: whello.asm
  tasm $(AOPTS) whello.asm

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