# $(dllname)            Library name
# $(exename)            Name (from Library: or Executable:)
# $(mangled-dllname)    Mangled library name
# $(mangled-exename)    Mangled library name
# $(full-dll-name)      Name (from Library: or Executable:) w/suffix ".dll"
# $(full-exe-name)      Name (from Library: or Executable:) w/suffix ".exe"
# $(full-lib-name)      Name (from Library: or Executable:) w/suffix ".lib"
# $(personal-lib)       $OPEN_DYLAN_USER_INSTALL/lib
# $(system-lib)         $OPEN_DYLAN_RELEASE_INSTALL/lib
# $(libraries)          Set below
# $(objects)            Object files:
#                         import fixups (except when linking Dylan itself)
#                         LID files: keyword
#                         LID c-object-files: keyword
#                         LID c-source-files: keyword
# $(dylan-support)      "*.o $(libgc) -lpthread -lc" when linking Dylan itself
# $(c-libs)             Contents of LID all-c-libraries: and rtlibs: keywords
#                         (all-c-libraries: is variable-expanded)
# $(base)               From HDP base-address: keyword
# $(entry-point)	Mangled library name, with Exe0 appended
# $(exports)		Library name w/extension ".exp", or list of .exp files
#			  for libraries being unified
# $(optimization)	"/OPT:REF" for Dylan library, empty otherwise
# $(linkopts)           Variable-expanded from LID linker-options: keyword
# $(image-version)      major.minor, from LID major-version: and minor-version:
# $(libcmt)             C library, multithreaded: set below
#
linkdll
link /NODEFAULTLIB /INCREMENTAL:NO /PDB:NONE /NOLOGO /ENTRY:$(mangled-dllname)Dll@12 -debug:full -debugtype:cv /nologo /dll /out:$(full-dll-name) kernel32.lib @$(dllname).link $(objects) $(c-libs) /base:$(base) /version:$(image-version) $(linkopts)

unifydll
link /NODEFAULTLIB /INCREMENTAL:NO /PDB:NONE /NOLOGO /ENTRY:$(mangled-dllname)Dll@12 -debug:full -debugtype:cv /dll $(optimization) /force:multiple /out:$(full-dll-name) kernel32.lib @unify-$(dllname).link /base:$(base) /version:$(image-version)

linkexe
link /NODEFAULTLIB /INCREMENTAL:NO /PDB:NONE /RELEASE /NOLOGO -subsystem:console,4.0 -debug:full -debugtype:cv /nologo /ENTRY:$(mangled-exename)Exe /out:$(full-exe-name) kernel32.lib @$(exename).link $(objects) $(c-libs) /version:$(image-version) $(linkopts)

unifyexe
link /NODEFAULTLIB /INCREMENTAL:NO /PDB:NONE /RELEASE /NOLOGO /OPT:REF /force:multiple -subsystem:console,4.0 -debug:full -debugtype:cv /ENTRY:$(entry-point) /out:$(full-exe-name) kernel32.lib @unify-$(exename).link $(exports) /version:$(image-version)

linklib
lib /nologo /machine:IX86 /def: $(objects) /out:$(full-lib-name)

ccompile
cl -c -W3 -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -D_X86_=1 -DWINVER=0x0400 -DWIN32  -D_WIN32 -D_MT -D_DLL -MD -Z7 -Od /c

rccompile
rc /r -DWIN32 -D_WIN32 -DWINVER=0x0400 $(resource).rc

dumpobjects
dumpbin /all $(object) > $(object).dump

libcmt
msvcrt.lib

guilflags
/NODEFAULTLIB /INCREMENTAL:NO /PDB:NONE /RELEASE /NOLOGO -subsystem:windows,4.0

guilibsmt
wsock32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib

olelibsmt
ole32.lib uuid.lib oleaut32.lib $(guilibsmt)

comctl32
comctl32.lib

ole32
ole32.lib

