# not be quoted)
#
.IF "$(CCTYPE)" == "BORLAND"
-CCHOME *= C:\borland\bcc55
+CCHOME *= C:\Borland\BCC55
.ELIF "$(CCTYPE)" == "GCC"
CCHOME *= C:\MinGW
.ELSE
CXX_FLAG = -P
LIBC = cw32mti.lib
-LIBFILES = $(CRYPT_LIB) ws2_32.lib import32.lib $(LIBC)
+
+# same libs as MSVC, except Borland doesn't have oldnames.lib
+LIBFILES = $(CRYPT_LIB) \
+ kernel32.lib user32.lib gdi32.lib winspool.lib \
+ comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib \
+ netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib \
+ version.lib odbc32.lib odbccp32.lib \
+ import32.lib $(LIBC)
.IF "$(CFG)" == "Debug"
OPTIMIZE = -v -D_RTLDLL -DDEBUGGING
CFLAGS = -w -g0 -tWM -tWD $(INCLUDES) $(DEFINES) $(LOCDEFS) \
$(PCHFLAGS) $(OPTIMIZE)
-LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
+LINK_FLAGS = $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)" \
+ -L"$(CCLIBDIR)\PSDK"
OBJOUT_FLAG = -o
EXEOUT_FLAG = -e
LIBOUT_FLAG =
-lmoldname -lkernel32 -luser32 -lgdi32 \
-lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 \
-loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr \
- -lwinmm -lversion -lodbc32
+ -lwinmm -lversion -lodbc32 -lodbccp32
.IF "$(CFG)" == "Debug"
OPTIMIZE = -g -O2 -DDEBUGGING
RIGHTMAKE =
.ENDIF
+.IMPORT .IGNORE : SystemRoot windir
+
+# Don't just .IMPORT OS from the environment because dmake sets OS itself.
+ENV_OS=$(subst,OS=, $(shell @set OS))
+
+.IF "$(ENV_OS)" == "Windows_NT"
+ODBCCP32_DLL = $(SystemRoot)\system32\odbccp32.dll
+.ELSE
+ODBCCP32_DLL = $(windir)\system\odbccp32.dll
+.ENDIF
+
#
# Top targets
#
$(MINIPERL) : $(MINIDIR) $(MINI_OBJ) $(CRTIPMLIBS)
.IF "$(CCTYPE)" == "BORLAND"
+ if not exist $(CCLIBDIR)\PSDK\odbccp32.lib \
+ cd $(CCLIBDIR)\PSDK && implib odbccp32.lib $(ODBCCP32_DLL)
$(LINK32) -Tpe -ap $(BLINK_FLAGS) \
@$(mktmp c0x32$(o) $(MINI_OBJ:s,\,$B,),$(@:s,\,$B,),,$(LIBFILES),)
.ELIF "$(CCTYPE)" == "GCC"