#    GRDB - debugger for dos with 32-bit extensions
#    Copyright (C) 1997-2003  David Lindauer
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
#    (for GNU General public license see file COPYING)
#
#    you may contact the author at:  mailto::camille@bluegrass.net
# 
#    or by snail mail at:
#
#    David Lindauer
#    850 Washburn Ave.  Apt #99
#    Louisville, KY 40222
#

.AUTODEPEND
#               *Local definitions

#
# Define this next to get it to build in an A20 routine for use without
# XMS
#
RAWA20 = -DRAWA20
#
# Define the following to get it to pull out the full screen
# windowing support.  Image may be several K smaller
#
#NOFS = -DNOFS
#
#   *Translator Definitions*
TASM = TASM -Dsizeof=size $(RAWA20) $(NOFS) /zi /m5 /i$(INCLUDEPATH)
TLIB = tlib
TLINK = tlink

#		*Implicit Rules*
.asm.obj:
  &$(TASM) $? 

.c.obj:
  $(CC) -c {$< }

.cpp.obj:
  $(CC) -c {$< }


#		*List Macros*
    
EXE_dependencies =  \
asm.obj \
asmops.obj \
breaks.obj \
compare.obj \
cpuid.obj \
dis.obj \
dispatch.obj \
dos.obj \
drive.obj \
dump.obj \
entry.obj \
env.obj \
exec.obj \
fill.obj \
fileio.obj \
fp.obj \
hbreak.obj \
help.obj \
history.obj \
inout.obj \
input.obj \
ints.obj \
logging.obj \
loader.obj \
math.obj \
memory.obj \
mmx.obj \
move.obj \
mtrap.obj \
opcodes.obj \
opcom.obj \
operands.obj \
options.obj \
pci.obj \
prints.obj \
regs.obj  \
search.obj \
swift.obj \
window.obj 
#		*Explicit Rules*
grdb.exe: $(EXE_dependencies)
  $(TLINK) /3/v/m/s/L$(LIBPATH) @&&|
$(EXE_dependencies)
grdb.exe
grdb.map
	# NO Lib file
|
link:
  $(TLINK) /3/v/m/s/L$(LIBPATH) @&&|
$(EXE_dependencies)
grdb.exe
grdb.map
	# NO Lib file
|

clean:
	del *.bak
	del *.obj
	del *.t*

move:
	tdstrip *.exe
	move *.exe \util\lang