#
#       MAKEFILE for "Geoworks Analysis Toolkit" programs
#
#       This makefiles requires an object file named "setargv@.obj" to
#       be present in the current directory or on the LIB path. It overrides
#       the default argument wildcard expansion module in the Runtime Lib
#       to enable processing of "@argfile" arguments.
#
#       This file is not included, because it contains Microsoft code;
#       you can remove its reference from the ARGEXP = ... line below,
#       only loosing the @argfile capability of the compiled programs.
#

CC=cl

!ifdef release
CFLAGS=-AC -W3 -F 4000 -Ox -Gy -I.\geostool -Fm
!else
CFLAGS=-AC -qc -Zi -W3 -F 4000 -I.\geostool
!endif

ARGEXP = setargv setargv@

.obj.exe:
        cl $(CFLAGS) $** -link /NOE


geodump.exe: geodump.obj disasm\disasm.lib

geodump.obj: geodump.c geostool\geos.h geostool\geos2.h geostool.inc


# Disassembler engine
disasm\disasm.lib: disasm\disasm.obj disasm\table.obj
        lib $@ -+$(?: =-+);

disasm\disasm.obj: disasm\disasm.c
        cl -c -J $(CFLAGS) -Fo$@ $**

disasm\table.obj: disasm\table.c
        cl -c -J $(CFLAGS) -Fo$@ $**
