浏览代码

Streamlining thirdparty libs makefiles to ease transition to Clang

Same compiler and linker flags for all libs
- O2 optimization enabled for libs3 and mfc
- otherwise the change should not be big

Preferring passing parameter on commandline instead of response files whenever possible, so they get logged

Passing includes and defined using separate parameter (as Clang does not seem to support semicolon separated lists)

Using extension rules for neon instead of separate rules for each file
Keeping separate rules for openssl as it is generated anyway

Source commit: 0a69ef054ed274abbe0ae1f8dc644c884670922f
Martin Prikryl 3 月之前
父节点
当前提交
0712b574e1
共有 7 个文件被更改,包括 956 次插入1462 次删除
  1. 5 0
      libs/Makefile.inc
  2. 2 4
      libs/buildlibs.bat
  3. 16 177
      libs/expat/bcb5/expat_static.mak
  4. 14 23
      libs/libs3/Makefile
  5. 34 316
      libs/mfc/source/borland.mak
  6. 21 80
      libs/neon/Makefile.bcb
  7. 864 862
      libs/openssl/Makefile

+ 5 - 0
libs/Makefile.inc

@@ -0,0 +1,5 @@
+CC = "$(BDS)\bin\bcc32"
+MKLIB = "$(BDS)\bin\tlib" /a /C
+CFLAG_COMMON=-O2 -c -fp -tWM
+# These are defaults anyway
+CFLAG_COMMON=$(CFLAG_COMMON) -a8 -vi -ff

+ 2 - 4
libs/buildlibs.bat

@@ -36,13 +36,11 @@ cd expat\bcb5
 make -f makefile.mak
 cd ..\..
 
-if not exist expat\bcb5\release\libexpats_mtd.lib (
+if not exist %LIB_PATH%\libexpats_mtd.lib (
 echo Expat build failed
 exit /B 1
 )
 
-copy expat\bcb5\release\libexpats_mtd.lib %LIB_PATH%
-
 :SKIP_EXPAT
 
 rem ==== neon ====
@@ -111,7 +109,7 @@ goto SKIP_MFC
 
 echo Building MFC ...
 cd mfc\source
-make -fborland.mak NO_WARNINGS=1
+make -fborland.mak
 cd ..\..
 
 if not exist %LIB_PATH%\UafxcW.lib (

+ 16 - 177
libs/expat/bcb5/expat_static.mak

@@ -1,189 +1,28 @@
+!include ../../Makefile.inc
 # ---------------------------------------------------------------------------
-!if !$d(BCB)
-BCB = $(MAKEDIR)\..
-!endif
-
+PROJECT = $(LIB_PATH)\libexpats_mtd.lib
+OBJD = Release\obj\libexpat_static
 # ---------------------------------------------------------------------------
-# IDE SECTION
+OBJFILES = \
+    $(OBJD)\xmlparse.obj \
+    $(OBJD)\xmlrole.obj \
+    $(OBJD)\xmltok.obj \
+    $(OBJD)\loadlibrary.obj
 # ---------------------------------------------------------------------------
-# The following section of the project makefile is managed by the BCB IDE.
-# It is recommended to use the IDE to change any of the values in this
-# section.
-# ---------------------------------------------------------------------------
-
-VERSION = BCB.05.03
-# ---------------------------------------------------------------------------
-PROJECT = Release\libexpats_mtd.lib
-OBJFILES = Release\obj\libexpat_static\xmlparse.obj \
-    Release\obj\libexpat_static\xmlrole.obj \
-    Release\obj\libexpat_static\xmltok.obj \
-    Release\obj\libexpat_static\loadlibrary.obj
-RESFILES = 
-RESDEPEN = $(RESFILES)
-LIBFILES = 
-IDLFILES = 
-IDLGENFILES = 
-LIBRARIES = 
-PACKAGES = 
-SPARELIBS = 
-DEFFILE = 
-# ---------------------------------------------------------------------------
-PATHCPP = .;..\lib
-PATHASM = .;
-PATHPAS = .;
-PATHRC = .;
-LINKER = TLib
-DEBUGLIBPATH = $(BCB)\lib\debug
-RELEASELIBPATH = $(BCB)\lib\release
-USERDEFINES = _WINDOWS;WIN32;NDEBUG;_LIB;XML_STATIC;WINSCP
-SYSDEFINES = _NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL
-INCLUDEPATH = ..;..\lib;$(BCB)\include
-LIBPATH = ..\lib;$(BCB)\lib;$(RELEASELIBPATH)
+DEFINES = _WINDOWS;WIN32;NDEBUG;_LIB;XML_STATIC;WINSCP;_NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL
+INCLUDEPATH = ..;..\lib
 WARNINGS = -w-rch -w-par -w-8027 -w-8026 -w-ccc -w-8012
-LISTFILE = 
-# ---------------------------------------------------------------------------
-CFLAG1 = -O2 -X- -a8 -b -k- -vi -q -tWM -c
-IDLCFLAGS = -I$(BCB)\include
-PFLAGS = -N2Release\obj\libexpat_static -N0Release\obj\libexpat_static -$Y- -$L- -$D-
-RFLAGS = /l 0x409 /d "NDEBUG" /i$(BCB)\include
-AFLAGS = /mx /w2 /zn
+CFLAG1 = $(CFLAG_COMMON)
 LFLAGS = 
 # ---------------------------------------------------------------------------
-ALLOBJ = $(OBJFILES)
-ALLRES = $(RESFILES)
-ALLLIB = $(LIBFILES) $(LIBRARIES)
-# ---------------------------------------------------------------------------
-!ifdef IDEOPTIONS
-
-[Version Info]
-IncludeVerInfo=0
-AutoIncBuild=0
-MajorVer=1
-MinorVer=0
-Release=0
-Build=0
-Debug=0
-PreRelease=0
-Special=0
-Private=0
-DLL=0
-
-[Version Info Keys]
-CompanyName=
-FileDescription=
-FileVersion=1.0.0.0
-InternalName=
-LegalCopyright=
-LegalTrademarks=
-OriginalFilename=
-ProductName=
-ProductVersion=1.0.0.0
-Comments=
-
-[Debugging]
-DebugSourceDirs=$(BCB)\source\vcl
-
-!endif
-
-
-
-
-
-# ---------------------------------------------------------------------------
-# MAKE SECTION
-# ---------------------------------------------------------------------------
-# This section of the project file is not used by the BCB IDE.  It is for
-# the benefit of building from the command-line using the MAKE utility.
-# ---------------------------------------------------------------------------
-
 .autodepend
 # ---------------------------------------------------------------------------
-!if "$(USERDEFINES)" != ""
-AUSERDEFINES = -d$(USERDEFINES:;= -d)
-!else
-AUSERDEFINES =
-!endif
-
-!if !$d(BCC32)
-BCC32 = bcc32
-!endif
-
-!if !$d(CPP32)
-CPP32 = cpp32
-!endif
-
-!if !$d(DCC32)
-DCC32 = dcc32
-!endif
-
-!if !$d(TASM32)
-TASM32 = tasm32
-!endif
-
-!if !$d(LINKER)
-LINKER = TLib
-!endif
-
-!if !$d(BRCC32)
-BRCC32 = brcc32
-!endif
-
-
-# ---------------------------------------------------------------------------
-!if $d(PATHCPP)
-.PATH.CPP = $(PATHCPP)
-.PATH.C   = $(PATHCPP)
-!endif
-
-!if $d(PATHPAS)
-.PATH.PAS = $(PATHPAS)
-!endif
-
-!if $d(PATHASM)
-.PATH.ASM = $(PATHASM)
-!endif
-
-!if $d(PATHRC)
-.PATH.RC  = $(PATHRC)
-!endif
+DEFINESARGS = -D$(DEFINES:;= -D)
 # ---------------------------------------------------------------------------
-!if "$(LISTFILE)" ==  ""
-COMMA =
-!else
-COMMA = ,
-!endif
-
-$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE)
-    $(BCB)\BIN\$(LINKER) /a $@ @&&!
-    $(LFLAGS) $? $(COMMA) $(LISTFILE)
-
-!
+$(PROJECT): $(OBJFILES)
+    $(MKLIB) $@ $(**)
 # ---------------------------------------------------------------------------
-.pas.hpp:
-    $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< }
-
-.pas.obj:
-    $(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< }
-
-.cpp.obj:
-    $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< }
-
+.path.c = ..\lib
 .c.obj:
-    $(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< }
-
-.c.i:
-    $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< }
-
-.cpp.i:
-    $(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< }
-
-.asm.obj:
-    $(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@
-
-.rc.res:
-    $(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $<
+    $(CC) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH:;= -I) $(DEFINESARGS) -n$(@D) {$< }
 # ---------------------------------------------------------------------------
-
-
-
-

+ 14 - 23
libs/libs3/Makefile

@@ -1,17 +1,16 @@
-# Set your compiler options
-CFLAG=-DWIN32 -DWIN32_LEAN_AND_MEAN -DWINSCP -DNE_LFS -q-c -tWC -tWM -P
-CFLAG = $(CFLAG) -w-aus -w-par
+!include ../Makefile.inc
 
-# The output directory for everything interesting
-OUT_D=$(LIB_PATH)
+# Set your compiler options
+DEFINES = WIN32;WIN32_LEAN_AND_MEAN;WINSCP;NE_LFS
+WARNINGS = -w-aus -w-par
+# Compile like C++ (it's probably only to support newer features and won't be needed with Clang)
+CFLAG = -P
+CFLAG = -D$(DEFINES:;= -D) $(WARNINGS) $(CFLAG) $(CFLAG_COMMON)
 # The output directory for all the temporary muck
 TMP_D=tmp
 
-CC=bcc32
-MKLIB=tlib /P64 /C
-
 .autodepend
-.PATH.c   = src
+.path.c   = src
 
 # ---------------------------------------------------------------------------
 
@@ -19,11 +18,10 @@ MKLIB=tlib /P64 /C
 OBJ_D=$(TMP_D)
 INCL=inc;inc/mingw;../openssl/include;../expat/lib;../neon/src
 
-O_LIBS3=$(OUT_D)\libs3.lib
+O_LIBS3=$(LIB_PATH)\libs3.lib
 
-INC=-I$(INCL)
+INC=-I$(INCL:;= -I)
 LIB_CFLAGS=$(INC) $(CFLAG) $(LIB_CFLAG)
-LIBS_DEP=$(O_LIBS3)
 
 #############################################
 LIBS3_OBJS=\
@@ -43,26 +41,19 @@ LIBS3_OBJS=\
     $(OBJ_D)\util.obj
 
 .c.obj:
-    $(CC) -n$(OBJ_D) $(LIB_CFLAGS) -c {$< }
+    $(CC) $(LIB_CFLAGS) -n$(@D) {$< }
 
 $(O_LIBS3): $(LIBS3_OBJS)
     if exist $(O_LIBS3) del $(O_LIBS3)
-    $(MKLIB) $(O_LIBS3) @&&!
-+$(**: = &^
-+)
-!
+    $(MKLIB) /P64 $@ $(**)
 
 ###################################################################
-all: banner $(TMP_D) $(OUT_D) lib
+all: banner $(TMP_D) lib
 
 banner:
     @echo Building libs3
-    @echo $(LIBS3_OBJS)
 
 $(TMP_D):
     if not exist "$(TMP_D)" ( mkdir "$(TMP_D)" )
 
-$(OUT_D):
-    if not exist "$(OUT_D)" ( mkdir "$(OUT_D)" )
-
-lib: $(LIBS_DEP)
+lib: $(O_LIBS3)

+ 34 - 316
libs/mfc/source/borland.mak

@@ -1,3 +1,5 @@
+!include ../../Makefile.inc
+
 # BORLAND.MAK: Borland makefile for MFC variants
 #
 # Usage: MAKE -F BORLAND.MAK CLEAN        (removes all intermediary files)
@@ -5,152 +7,37 @@
 # Note that an MAKE CLEAN should be performed before building a new variant.
 #
 # 'Options' are one of each of:
-#   "DLL"              (defaults to 0)
-#           If this item is 0, then a normal library is generated.
-#                       DLL=1 is obsolete and not supported by this release.
-#           If this item is 2, objects suitable for the shared DLL version
-#           of MFC are created.  Note: DLL=2 is to be used only from
-#           MFCDLL.MAK, MFCOLE.MAK, or MFCDB.MAK
-#
 #   "DEBUG"             (defaults to 1)
 #           If this item is 1, diagnostic support is compiled into
 #           the library.  If this item is 0, then diagnostic support
 #           is disabled. Diagnostic support does not include debug info
 #           information.
 #
-#   "OBJ=.\obj"         (defaults to '$$(MODEL)$(BASE)$(DEBUG)')
-#           This optional specification specifies where temporary OBJ files
-#           are stored during the build process.  The directory is created or
-#           removed as necessary.
-#
-#   "OPT="              (no default value)
-#           This allows additional compiler options to be added to the build.
-#           If more than one switch is desired, put double-quotes around the
-#           whole OPT= argument, e.g., "OPT=/J /W3".
-#
-#   "NO_PCH=1"
-#           Set this item to override the default use of precompiled headers.
-#
-#   "BROWSE=1"          (defaults to 0)
-#           Set this option to build browse info
-#
-#   "MT=0"              (defaults to 1)
-#           To build a non-multithreaded library instead of the default
-#           (which enables multitheading and uses the multithread
-#           C-runtimes) you can use MT=0.
-#
-#=============================================================================
-# Borland Additional flags
-#=============================================================================
-#
-#   "NO_CLEAN_PCH"      (defaults to off)
-#           To prevent deleting an existing PCH (.csm) file
-#
-#   "DBGINFO"           (defaults to 0)
-#           If this item is 1, Turbo Debugger debug info is compiled into
-#           the library.  If it's 0, then no debugger info is added.
-#
-#   "LIBDIR=..\..\lib"
-#           Directory for libraries that are created
-#
-#   "MFCINCL=..\..\include\mfc"
-#           MFC Include directory base
-#
-#   "BCINCL=..\..\include"
-#           BC++ Include directory
-#
 #############################################################################
 # Define defaults if not defined
-UNICODE=1
-# Default to DEBUG mode
 !ifndef DEBUG
 DEBUG=0
 !endif
 
-# Default to No Debug Info mode
-!ifndef DBGINFO
-DBGINFO=0
-!endif
-
-# Check for MS syntax
-!ifdef CODEVIEW
-DBGINFO=$(CODEVIEW)
-!endif
-
-# Default to NOT DLL
-!ifndef DLL
-DLL=0
-!endif
-
-# Default to no BROWSE info
-!ifndef BROWSE
-BROWSE=0
-!endif
-
-# Default to no precompiled headers
-#!ifndef NO_PCH
-#NO_PCH=1
-#!endif
-
-# Default to _MBCS build
-MBCS=1
-
-# Default to multithreading support
-!ifndef MT
-MT=1
-!endif
-
-# Default to not enable Borland CodeGuard
-!ifndef CG
-CG=0
-!endif
-
-# Lib directory
-!ifndef LIBDIR
-LIBDIR=$(LIB_PATH)
-!endif
-
 # Lib Path
-!ifndef LPATH
-LPATH=..\..\LIB;..\..\LIB\PSDK
-!endif
+LPATH=..\..\lib;..\..\lib\psdk
 
 # MFC Include directory base
-!ifndef MFCINCL
 MFCINCL=..\include
-!endif
 
 # BC Include directory
-!ifndef BCINCL
 BCINCL=..\..\include;..\..\include\atl
-!endif
-
-# Disable Warnings
-!ifndef NO_WARNINGS
-NO_WARNINGS=0
-!endif
-
-
-# Clean up PCH file
-!ifndef NO_CLEAN_PCH
-NO_CLEAN_PCH=0
-!endif
 
 BASE=W
 MODEL=U
-TARGDEFS=/D_UNICODE /DUNICODE /DWINSCP \
-         /D_AFX_NO_OLEDB_SUPPORT /D_AFX_NO_OCC_SUPPORT /D_AFX_NO_OCX_SUPPORT /D_AFX_NO_DB_SUPPORT \
-         /D_AFX_NO_AFXCMN_SUPPORT /D_AFX_NO_RICHEDIT_SUPPORT /D_AFX_NO_INET_SUPPORT /D_AFX_NO_DHTML_SUPPORT \
-         /D_AFX_NO_OLE_SUPPORT /D_AFX_NO_SOCKET_SUPPORT /D_AFX_NO_SYNC_SUPPORT
-!if "$(MBCS)" != "0"
-TARGDEFS=$(TARGDEFS) /D_MBCS
-!endif
-PLATFORM=INTEL
+TARGDEFS=_UNICODE;UNICODE;WINSCP
+TARGDEFS=$(TARGDEFS);_AFX_NO_OLEDB_SUPPORT;_AFX_NO_OCC_SUPPORT;_AFX_NO_OCX_SUPPORT;_AFX_NO_DB_SUPPORT
+TARGDEFS=$(TARGDEFS);_AFX_NO_AFXCMN_SUPPORT;_AFX_NO_RICHEDIT_SUPPORT;_AFX_NO_INET_SUPPORT;_AFX_NO_DHTML_SUPPORT
+TARGDEFS=$(TARGDEFS);_AFX_NO_OLE_SUPPORT;_AFX_NO_SOCKET_SUPPORT;_AFX_NO_SYNC_SUPPORT
+TARGDEFS=$(TARGDEFS);_MBCS;_MT=1;_X86_
 
 LFLAGS=$(LFLAGS) /j$(LPATH) /L$(LPATH)
-!if "$(NO_WARNINGS)" == "1"
 LFLAGS=$(LFLAGS) /w-
-!endif
 
 #
 # DEBUG OPTIONS
@@ -158,139 +45,45 @@ LFLAGS=$(LFLAGS) /w-
 !if "$(DEBUG)" != "0"
 
 DEBUGSUF=D
-DEBDEFS=/D_DEBUG
-DEBOPTS=
+DEBDEFS=;_DEBUG
 
-!endif
+!else
 
 #
 # NON-DEBUG OPTIONS
 #
-!if "$(DEBUG)" == "0"
 
 DEBUGSUF=
 DEBDEFS=
-DEBOPTS=/O1
-
-!endif
 
-!if "$(DBGINFO)" == "1"
-DEBOPTS=/Od /v /vi
-!endif
-
-!if "$(CG)" == "1"
-DEBOPTS=$(DEBOPTS) -vG
-!endif
-
-#
-# PLATFORM options
-#
-CC=bcc32
-LIB32=tlib
-!ifndef LINK32
-LINK32=ilink32 /Gn
-!endif
-CL_MODEL=/D_X86_
-GENDEFS=perl -w $(MAKEDIR)\gendefs.pl
-
-# TYPE = Library Type Designator
-#       c = normal C library
-#       d = DLL library
-TYPE=c
-
-!if "$(DEXT)" == ""
-DEXT=
 !endif
 
 #
 # Object File Directory
 #
-!if "$(OBJ)" == ""
-D=$$$(MODEL)$(BASE)$(DEBUGSUF)$(DEXT)    # subdirectory specific to variant
-!else
-D=$(OBJ)                                 # User specified directory
-!endif
-
-#
-# _AFXDLL DLL Variant
-#
-!if "$(DLL)" == "2"
-!if "$(TARG)" == ""
-!error DLL=2 is used only from BFCDLL.MAK, BFCOLE.MAK, or BFCDB.MAK
-!endif
-GOAL=$(TARG)
-TYPE=e
-!if "$(OBJ)" == ""
-D=DLL$(DEBUGSUF).$(BASE)
-!if "$(UNICODE)" == "1"
-D=$(MODEL)$(D)
-!endif
-D=$$$(D)
-!endif
-TARGDEFS=$(TARGDEFS) /D_WINDLL /D_AFXDLL
-!else
-GOAL=$(MODEL)afx$(TYPE)$(BASE)$(DEBUGSUF)
-!endif
-
-#
-# Threaded-ness
-#
-!if "$(MT)" != "0"
-TARGOPTS=$(TARGOPTS) /WM /D_MT=1
-!else
-!error This makefile only builds multi-threaded libraries, not single threaded.
-!endif
+D=$$$(MODEL)$(BASE)$(DEBUGSUF)    # subdirectory specific to variant
 
-#
-# Import libraries for the DLL builds
-#
-IMPORT_LIBS=import32.lib inet.lib odbc32.lib
+GOAL=$(MODEL)afxc$(BASE)$(DEBUGSUF)
 
 #
 # COMPILER OPTIONS
 #
+# -VF4 Support MFC 4.0
+CL_OPT=-VF4 -n$(D) -w-
 
-DEFS=$(DEFS)  -D_declspec=__declspec /D_WCHAR_T_DEFINED /D__MSC /D_ANONYMOUS_STRUCT -D_MSC_VER=1200 -D_WINDOWS
-!if "$(DLL)" == "2"
-DEFS=$(DEFS) /D_RTLDLL /D_DLL
-!endif
-CL_OPT= -a8 -g0 -j2 -jb -VF4 $(INCROPTS) $(DEBOPTS) $(CVOPTS) $(TARGOPTS)
-
-#
-# Internal debugging switch for the compiler (-=xx)
-#
-!ifdef COMPILER_DIAG
-CL_OPT= $(CL_OPT) -=o
-!endif
-
-!if "$(BROWSE)" != "0"
-CL_OPT=-R $(CL_OPT)
-!endif
-
-CL_OPT=-n$(D) $(CL_OPT)
-
-!if "$(NO_WARNINGS)" == "1"
-CL_OPT=$(CL_OPT) -w-
-!endif
-
-!if "$(DEVBUILD)" != "0"
-CL_OPT=$(CL_OPT) /D_AFX_DEVBUILD
-!endif
-
-DEFS=$(DEFS) $(DEBDEFS) $(TARGDEFS)
+DEFS=_declspec=__declspec;_WCHAR_T_DEFINED;__MSC;_ANONYMOUS_STRUCT;_MSC_VER=1200;_WINDOWS
+DEFS=$(DEFS)$(DEBDEFS);$(TARGDEFS)
 
 #############################################################################
 # Library Components
 
-OBJECT=objcore.obj except.obj validadd.obj \
+OBJECT = objcore.obj except.obj validadd.obj
 	
-FILES=filecore.obj filex.obj filest.obj
+FILES = filecore.obj filex.obj filest.obj
 
-MISC=	strcore.obj strex.obj timecore.obj \
-	fixalloc.obj \
-        plex.obj
+MISC = strcore.obj strex.obj timecore.obj fixalloc.obj plex.obj
 
-WINMISC= winstr.obj apphelp.obj 
+WINMISC = winstr.obj apphelp.obj 
 
 !if "$(DEBUG)" == "1"
 INLINES = afxinl1.obj afxinl2.obj afxinl3.obj
@@ -298,11 +91,9 @@ INLINES = afxinl1.obj afxinl2.obj afxinl3.obj
 INLINES =
 !endif
 
-CPP_OBJS=$(OBJECT) $(INLINES) $(FILES)  $(MISC) \
-	$(WINMISC)
-
+CPP_OBJS=$(OBJECT) $(INLINES) $(FILES)  $(MISC) $(WINMISC)
 
-OBJS=$(CPP_OBJS) $(OLEASM)
+OBJS=$(CPP_OBJS)
 
 
 #############################################################################
@@ -311,90 +102,39 @@ OBJS=$(CPP_OBJS) $(OLEASM)
 #############################################################################
 # Set CPPFLAGS for use with .cpp.obj and .c.obj rules
 # Define rule for use with OBJ directory
-# C++ uses a PCH file
 
-CPPFLAGS=$(CPPFLAGS) $(CL_MODEL) $(CL_OPT) $(PDBOPTS) $(DEFS) $(OPT)
-BORRSP=bor.rsp
+CPPFLAGS=$(CFLAG_COMMON) $(CL_OPT) -D$(DEFS:;= -D)
 
-!ifndef NO_PCH
-!ifndef PCH_FILE
-# put the PCH file in the OBJ directory for easy cleanup later
-PCH_FILE=$(D)\stdafx
-!if "$(BROWSE)" != "0"
-PCH_FILE=$(PCH_FILE)b
-!endif
-PCH_FILE=$(PCH_FILE).csm
-!endif
-!ifndef PCH_CPP
-PCH_CPP=objcore
-!endif
-PCH_CMD=-Hc -H=$(PCH_FILE)
-!else
-PCH_CMD=-H-
-PCH_FILE=
-!endif
-CPPFLAGS=$(CPPFLAGS) $(PCH_CMD)
+INCL=$(BCINCL);$(MFCINCL)
 
-!ifdef JOHNS_CPP32
-PREPROCFLAGS=-Sd -Sk -Sr -P-
-!else
-PREPROCFLAGS=-Sd -Sk -Ss -P
-!endif
+BORFLAGS=$(CPPFLAGS) -I$(INCL:;= -I)
 
 .SUFFIXES: .cpp
 
 .path.obj = $(D)
 
-
-.cpp.i:
-	cpp32 @$(BORRSP) $(PREPROCFLAGS) $<
-
 .cpp.obj:
-!if $d(FORCE_CPP32)
-	cpp32 @$(BORRSP) $(PREPROCFLAGS) $<
-!else
-	$(CC) @$(BORRSP) /c { $< }
-!endif
-
-!ifndef NO_PCH
-PCH_TARGETS=$(PCH_FILE) $(D)\$(PCH_CPP).obj
-!endif
+	$(CC) $(BORFLAGS) { $< }
 
 #############################################################################
 # Goals to build
 
-GOALS=log.mode create.dir create.rsp
-!ifndef NO_PCH
-GOALS=$(GOALS) $(PCH_TARGETS)
-!endif
-GOALS=$(GOALS) $(LIBDIR)\$(GOAL).lib
+LIB=$(LIB_PATH)\$(GOAL).lib
+GOALS=log.mode create.dir $(LIB)
 
 goal: $(GOALS)
 
 log.mode:
   @-echo BORLAND.MAK: 
-  @-echo              GOAL=$(GOAL), DLL=$(DLL),  DEBUG=$(DEBUG), 
-  @-echo              DBGINFO=$(DBGINFO), RCDEFINES=$(RCDEFINES), 
-  @-echo              CL_OPT=$(CL_OPT), DEFS=$(DEFS),
+  @-echo              GOAL=$(GOAL), DEBUG=$(DEBUG), 
+  @-echo              CL_OPT=$(CL_OPT)
+  @-echo              DEFS=$(DEFS),
   @-echo              CPPFLAGS=$(CPPFLAGS)	 
   @-echo              D=$(D)
-  @-echo              STATICLINK_OBJS=$(STATICLINK_OBJS)
-
-create.rsp:
-!ifndef NO_PCH
-!if "$(NO_CLEAN_PCH)" == "0"
-    @-if exist $(PCH_FILE) echo Erasing PCH file: $(PCH_FILE) for a fresh build
-    @-if exist $(PCH_FILE) erase $(PCH_FILE) > nul 
-!endif
-!endif
-    @-if exist $(BORRSP) erase $(BORRSP) > nul
-    copy &&|
-$(CPPFLAGS) -I$(BCINCL);$(MFCINCL)
-| $(BORRSP)
 
 create.dir:
 	@-if not exist $(D) mkdir $(D)
-	@-if not exist $(LIBDIR) mkdir $(LIBDIR)
+	@-if not exist $(LIB_PATH) mkdir $(LIB_PATH)
 
 clean:
 	@-if exist *.map erase *.map
@@ -402,9 +142,6 @@ clean:
 	@-if exist *.cfg erase *.cfg
 	@-if exist *.rsp erase *.rsp
 	@-if exist *.tds erase *.tds
-!if $d(INTEGRATION_BUILD)
-	@-if exist $(PLATFORM)\*.def erase $(PLATFORM)\*.def
-!endif
 	@-if exist $$DLLD.W  rmdir $$DLLD.W /s
 	@-if exist $$DLL.W rmdir $$DLL.W /s
 	@-if exist $$NW rmdir $$NW /s
@@ -414,36 +151,17 @@ clean:
 #############################################################################
 # Precompiled header file
 
-!ifndef NO_PCH
-
 !if "$(DEBUG)" == "1"
 HDRS =$(MFCINCL)\*.h
 !else
 HDRS =$(MFCINCL)\*.h $(MFCINCL)\*.inl
 !endif
 
-!if "$(DLL)" != "2"
-$(PCH_TARGETS): $(PCH_CPP).cpp
-	$(CC) @&&!
-$(CPPFLAGS) -I$(BCINCL);$(MFCINCL) /c $(PCH_CPP).cpp
-!
-
-!endif # DLL != 2
-!endif # NO_PCH
-
-
 #############################################################################
 # Build the library from the up-to-date objs
 
-!if "$(DLL)" != "2"
 # Build final library
-$(LIBDIR)\$(GOAL).lib: $(D)\$(OBJS)
-	# @-if exist $@ erase $@
-	@$(LIB32) $@ /P2048 @&&!
-+$(**: = &^
-+)
-!
-
-!endif #DLL!=2
+$(LIB): $(OBJS)
+	$(MKLIB) $@ $(**)
 
 #############################################################################

+ 21 - 80
libs/neon/Makefile.bcb

@@ -1,10 +1,12 @@
-# Set your compiler options
-OPENSSL_CFLAG=-DOPENSSL_SYSNAME_WIN32 -DL_ENDIAN -DDSO_WIN32 -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_SEED -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_CMS -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_KRB5 -DOPENSSL_NO_ENGINE -DOPENSSL_NO_DYNAMIC_ENGINE -DOPENSSL_DISABLE_OLD_DES_SUPPORT -DNO_CHMOD -DOPENSSL_NO_DGRAM -DOPENSSL_NO_EC -DOPENSSL_NO_ECDH -DOPENSSL_NO_ECDSA -DDOPENSSL_NO_EC_NISTP_64_GCC_128
-EXPAT_CFLAG=-DCOMPILED_FROM_DSP;XML_STATIC
+!include ../Makefile.inc
 
-CFLAG=-DWIN32;WIN32_LEAN_AND_MEAN;_WINDOWS;WIN32;NDEBUG;_LIB;_NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL -DNE_HAVE_SSL;HAVE_OPENSSL;HAVE_EXPAT;HAVE_EXPAT_H;NE_HAVE_DAV;NE_LFS;NOUSER;NOGDI;HAVE_STRTOLL;WINSCP;
-CFLAG=$(CFLAG) -q -w-ccc -w-rch -w-pia -w-aus -w-par -w-inl -w-eff -w-sus -w-dup -w-spa -w-csu -w-rvl -w-8065 -w-8069  -c -tWC -tWM -O2 -ff -fp
-LIB_CFLAG=$(OPENSSL_CFLAG) $(EXPAT_CFLAG)
+# Set your compiler options
+OPENSSL_DEFINES=OPENSSL_SYSNAME_WIN32;L_ENDIAN;DSO_WIN32;BN_ASM;MD5_ASM;SHA1_ASM;RMD160_ASM;OPENSSL_NO_CAMELLIA;OPENSSL_NO_SEED;OPENSSL_NO_RC5;OPENSSL_NO_MDC2;OPENSSL_NO_CMS;OPENSSL_NO_CAPIENG;OPENSSL_NO_KRB5;OPENSSL_NO_ENGINE;OPENSSL_NO_DYNAMIC_ENGINE;OPENSSL_DISABLE_OLD_DES_SUPPORT;NO_CHMOD;OPENSSL_NO_DGRAM;OPENSSL_NO_EC;OPENSSL_NO_ECDH;OPENSSL_NO_ECDSA;DOPENSSL_NO_EC_NISTP_64_GCC_128
+EXPAT_DEFINES=COMPILED_FROM_DSP;XML_STATIC
+DEFINES=WIN32;WIN32_LEAN_AND_MEAN;_WINDOWS;WIN32;NDEBUG;_LIB;_NO_VCL;_ASSERTE;NO_STRICT;_RTLDLL;NE_HAVE_SSL;HAVE_OPENSSL;HAVE_EXPAT;HAVE_EXPAT_H;NE_HAVE_DAV;NE_LFS;NOUSER;NOGDI;HAVE_STRTOLL;WINSCP
+ALLDEFINES=$(OPENSSL_DEFINES);$(EXPAT_DEFINES);$(DEFINES)
+WARNINGS=-w-ccc -w-rch -w-pia -w-aus -w-par -w-inl -w-eff -w-sus -w-dup -w-spa -w-csu -w-rvl -w-8065 -w-8069
+CFLAG=$(WARNINGS) $(CFLAG_COMMON)
 
 # neon directory
 SRC_D=.
@@ -14,36 +16,26 @@ OUT_D=$(LIB_PATH)
 # The output directory for all the temporary muck
 TMP_D=tmp
 
-CC=bcc32
-CP=copy
-RM=del
-MKDIR=mkdir
-MKLIB=tlib /P64 /C
-
-######################################################
-# You should not need to touch anything below this point
 ######################################################
 
 # INCL_D - local library directory
 # OBJ_D  - temp object file directory
 OBJ_D=$(TMP_D)
 INCL_D=src
-INCL=$(INCL_D);../openssl/include;../expat/lib;
+INCL=$(INCL_D);../openssl/include;../expat/lib;.
 
 O_NEON=$(OUT_D)\neon.lib
 
-######################################################
-# Don't touch anything below this point
 ######################################################
 
-INC=-I$(INCL) -I.
-LIB_CFLAGS=$(INC) $(CFLAG) $(LIB_CFLAG)
+INC=-I$(INCL:;= -I)
+LIB_CFLAGS=$(INC) $(CFLAG) -D$(ALLDEFINES:;= -D)
 LIBS_DEP=$(O_NEON)
 
 #############################################
 HEADER=$(INCL_D)\ne_uri.h
 
-NEONOBJS=\
+OBJFILES=\
     $(OBJ_D)\ne_alloc.obj \
     $(OBJ_D)\ne_auth.obj \
     $(OBJ_D)\ne_basic.obj \
@@ -70,79 +62,28 @@ NEONOBJS=\
     $(OBJ_D)\ne_locks.obj \
     $(OBJ_D)\ne_openssl.obj
 
-$(OBJ_D)\ne_alloc.obj: $(SRC_D)/src/ne_alloc.c
-    $(CC) -o$(OBJ_D)\ne_alloc.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_alloc.c
-$(OBJ_D)\ne_auth.obj: $(SRC_D)/src/ne_auth.c
-    $(CC) -o$(OBJ_D)\ne_auth.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_auth.c
-$(OBJ_D)\ne_basic.obj: $(SRC_D)/src/ne_basic.c
-    $(CC) -o$(OBJ_D)\ne_basic.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_basic.c
-$(OBJ_D)\ne_compress.obj: $(SRC_D)/src/ne_compress.c
-    $(CC) -o$(OBJ_D)\ne_compress.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_compress.c
-$(OBJ_D)\ne_dates.obj: $(SRC_D)/src/ne_dates.c
-    $(CC) -o$(OBJ_D)\ne_dates.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_dates.c
-$(OBJ_D)\ne_i18n.obj: $(SRC_D)/src/ne_i18n.c
-    $(CC) -o$(OBJ_D)\ne_i18n.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_i18n.c
-$(OBJ_D)\ne_md5.obj: $(SRC_D)/src/ne_md5.c
-    $(CC) -o$(OBJ_D)\ne_md5.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_md5.c
-$(OBJ_D)\ne_pkcs11.obj: $(SRC_D)/src/ne_pkcs11.c
-    $(CC) -o$(OBJ_D)\ne_pkcs11.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_pkcs11.c
-$(OBJ_D)\ne_redirect.obj: $(SRC_D)/src/ne_redirect.c
-    $(CC) -o$(OBJ_D)\ne_redirect.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_redirect.c
-$(OBJ_D)\ne_request.obj: $(SRC_D)/src/ne_request.c
-    $(CC) -o$(OBJ_D)\ne_request.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_request.c
-$(OBJ_D)\ne_session.obj: $(SRC_D)/src/ne_session.c
-    $(CC) -o$(OBJ_D)\ne_session.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_session.c
-$(OBJ_D)\ne_socket.obj: $(SRC_D)/src/ne_socket.c
-    $(CC) -o$(OBJ_D)\ne_socket.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_socket.c
-$(OBJ_D)\ne_socks.obj: $(SRC_D)/src/ne_socks.c
-    $(CC) -o$(OBJ_D)\ne_socks.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_socks.c
-$(OBJ_D)\ne_sspi.obj: $(SRC_D)/src/ne_sspi.c
-    $(CC) -o$(OBJ_D)\ne_sspi.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_sspi.c
-$(OBJ_D)\ne_string.obj: $(SRC_D)/src/ne_string.c
-    $(CC) -o$(OBJ_D)\ne_string.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_string.c
-$(OBJ_D)\ne_uri.obj: $(SRC_D)/src/ne_uri.c
-    $(CC) -o$(OBJ_D)\ne_uri.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_uri.c
-$(OBJ_D)\ne_utils.obj: $(SRC_D)/src/ne_utils.c
-    $(CC) -o$(OBJ_D)\ne_utils.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_utils.c
-$(OBJ_D)\ne_207.obj: $(SRC_D)/src/ne_207.c
-    $(CC) -o$(OBJ_D)\ne_207.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_207.c
-$(OBJ_D)\ne_xml.obj: $(SRC_D)/src/ne_xml.c
-    $(CC) -o$(OBJ_D)\ne_xml.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_xml.c
-$(OBJ_D)\ne_xmlreq.obj: $(SRC_D)/src/ne_xmlreq.c
-    $(CC) -o$(OBJ_D)\ne_xmlreq.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_xmlreq.c
-$(OBJ_D)\ne_oldacl.obj: $(SRC_D)/src/ne_oldacl.c
-    $(CC) -o$(OBJ_D)\ne_oldacl.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_oldacl.c
-$(OBJ_D)\ne_acl3744.obj: $(SRC_D)/src/ne_acl3744.c
-    $(CC) -o$(OBJ_D)\ne_acl3744.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_acl3744.c
-$(OBJ_D)\ne_props.obj: $(SRC_D)/src/ne_props.c
-    $(CC) -o$(OBJ_D)\ne_props.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_props.c
-$(OBJ_D)\ne_locks.obj: $(SRC_D)/src/ne_locks.c
-    $(CC) -o$(OBJ_D)\ne_locks.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_locks.c
-$(OBJ_D)\ne_openssl.obj: $(SRC_D)/src/ne_openssl.c
-    $(CC) -o$(OBJ_D)\ne_openssl.obj $(LIB_CFLAGS) -c $(SRC_D)/src/ne_openssl.c
-
-$(O_NEON): $(NEONOBJS)
-    if exist $(O_NEON) $(RM) $(O_NEON)
-    $(MKLIB) $(O_NEON) @&&!
-+$(**: = &^
-+)
-!
+.path.c = $(SRC_D)/src
+.c.obj:
+    $(CC) $(LIB_CFLAGS) -n$(@D) {$< }
+
+$(O_NEON): $(OBJFILES)
+    if exist $(O_NEON) del $(O_NEON)
+    $(MKLIB) /P64 $@ $(**)
 
 ###################################################################
 all: banner clean_lib $(TMP_D) $(OUT_D) headers lib
 
 banner:
     @echo Building neon
-    @echo $(NEONOBJS)
 
 clean_lib:
     if exist $(O_NEON) $(RM) $(O_NEON)
 
 $(TMP_D):
-    if not exist "$(TMP_D)" ( $(MKDIR) "$(TMP_D)" )
+    if not exist "$(TMP_D)" ( mkdir "$(TMP_D)" )
 
 $(OUT_D):
-    if not exist "$(OUT_D)" ( $(MKDIR) "$(OUT_D)" )
+    if not exist "$(OUT_D)" ( mkdir "$(OUT_D)" )
 
 headers: $(HEADER)
     @

文件差异内容过多而无法显示
+ 864 - 862
libs/openssl/Makefile


部分文件因为文件数量过多而无法显示