From: Steve Hay Date: Fri, 12 Aug 2005 16:13:11 +0000 (+0000) Subject: Supply same libs for bcc32 builds as cl and gcc builds have X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8169a885e54b185b764945e68a001202a9d927d3;p=p5sagit%2Fp5-mst-13.2.git Supply same libs for bcc32 builds as cl and gcc builds have It makes life easier for third-party extensions if perl provides a decent set of libs to link against. cl and gcc builds already have this (except that gcc was missing one lib), but bcc32 builds only have one or two libs supplied. In particular, the ODBC libs required for building libwin32 were not specified. One of these doesn't exist in the Borland lib dirs by default, so generate it from the DLL if it is missing. p4raw-id: //depot/perl@25289 --- diff --git a/win32/makefile.mk b/win32/makefile.mk index 0a8bd5b..7ab4755 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -180,7 +180,7 @@ CRYPT_SRC *= fcrypt.c # not be quoted) # .IF "$(CCTYPE)" == "BORLAND" -CCHOME *= C:\borland\bcc55 +CCHOME *= C:\Borland\BCC55 .ELIF "$(CCTYPE)" == "GCC" CCHOME *= C:\MinGW .ELSE @@ -391,7 +391,14 @@ SUBSYS = console 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 @@ -403,7 +410,8 @@ LINK_DBG = 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 = @@ -446,7 +454,7 @@ LIBFILES = $(CRYPT_LIB) $(LIBC) \ -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 @@ -927,6 +935,17 @@ MK2 = __not_needed 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 # @@ -1036,6 +1055,8 @@ $(CONFIGPM) : $(MINIPERL) ..\config.sh config_h.PL ..\minimod.pl $(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"