### -*- Mode: Makefile -*-
###
### $Header: /home/gene/library/website/docsrc/sca/RCS/Makefile.msdos,v 395.1 2008/04/20 17:25:48 gene Exp $
###

# Include path for the C/C++ compiler
incdir=/I "C:\Program Files\Microsoft SDK\include" /I "C:\Program Files\Microsoft Visual Studio\VC98\Include" /I "C:\Program Files\Microsoft Visual Studio\VC98\ATL\Include"

CPP=cl.exe
RSC=rc.exe

CFLAGS=/D IS_UNIX=0 /D IS_WINDERS=1 /nologo /ML /W3 /GX /O2 /D "WIN32" /D "_CONSOLE" /Fo"tmp\\" /Fd"tmp\\" $(incdir)
# It had /D "_MBCS" after _CONSOLE.
# It had "/FD"immediately before /c.
COMPILE_c=$(CPP) $(CFLAGS) /c

LINK32=link.exe
LINK32_FLAGS=/LIBPATH:"C:\Program Files\Microsoft SDK\Lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio\VC98\Lib" kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /incremental:no /machine:I386

LINK_c=$(LINK32) $(LINK32_FLAGS)

###
### Consider adding "-\$I-" to the flags because I dislike I/O exceptions
### so much.  (gstover, 2004-Nov-15)
###
DCC32="C:\Program Files\Borland\Delphi6\Bin\DCC32"
DELPHI_FLAGS=-Q -\$D- -\$L- -H -R$(DELPHI_DIR)\Lib -U.\tmp -U$(SVCOM_DIR) -U$(SYNAPSE_DIR) -U$(TMS_DIR) -U$(DUNIT_DIR) -W
COMPILE_pas=$(DCC32) $(DELPHI_FLAGS) -Ebin
LINK_dpr=$(DCC32) $(DELPHI_FLAGS) -Ebin 
LINK_pas=$(DCC32) $(DELPHI_FLAGS) -Ebin 
AR_dpr=$(DCC32) $(DELPHI_FLAGS) -Elib

HEADERS=src/this.h

#
# Can't make bin/msg-portmapper.exe on Winders because it does
# not come with an ONC RPC library.
#

all :	\
	bin/counter.exe \
	bin/gen.exe \
	bin/scan.exe

bin/counter.exe : src/counter.obj
	$(LINK_c) /out:bin\counter.exe tmp\counter.obj

bin/counter.obj : src/counter.c src/this.h
	$(COMPILE_c) src\counter.c

bin/gen.exe : tmp/gen.obj
	$(LINK_c) /out:bin\gen.exe tmp\gen.obj

tmp/gen.obj : src/gen.c src/this.h
	$(COMPILE_c) src\gen.c

bin/msg-portmapper.exe : tmp/msg-portmapper.obj
	$(LINK_c) /out:bin\msg-portmapper.exe tmp\msg-portmapper.obj

tmp/msg-portmapper.obj : src/msg-portmapper.c src/this.h
	$(COMPILE_c) src\msg-portmapper.c

bin/scan.exe : tmp/debug.obj tmp/scan.obj
	$(LINK_c) /out:bin\scan.exe tmp\scan.obj tmp\debug.obj

tmp/scan.obj : src/scan.c src/this.h
	$(COMPILE_c) src\scan.c

tmp/debug.obj : src/debug.c src/this.h
	$(COMPILE_c) src\debug.c

### --- end of file ---
