From 5c168c350e6509b7cb1b16d00310d2b103247e07 Mon Sep 17 00:00:00 2001 From: Stas Sergeev Date: Mon, 3 Oct 2016 00:39:49 +0300 Subject: [PATCH] add bc3 build support --- config.b | 7 +++++-- default.bat | 3 +++ mkfiles/bc3.mak | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 mkfiles/bc3.mak diff --git a/config.b b/config.b index 1365fd9..d9f13aa 100644 --- a/config.b +++ b/config.b @@ -30,11 +30,13 @@ set XNASM=nasm :********************************************************************** :- Turbo C 2.01 -set COMPILER=TC2 +:- set COMPILER=TC2 :- Turbo C++ 1.01 :- set COMPILER=TURBOCPP :- Turbo C 3.0 :- set COMPILER=TC3 +:- Borland C 3.1 +set COMPILER=BC3 :- Borland C :- set COMPILER=BC5 :- Microsoft C @@ -46,9 +48,10 @@ set COMPILER=TC2 :-- where is the BASE dir of your compiler(s) ?? :-********************************************************************** -set TC2_BASE=c:\tc201 +:- set TC2_BASE=c:\tc201 :- set TP1_BASE=c:\tcpp :- set TC3_BASE=c:\tc3 +set BC3_BASE=c:\bc :- set BC5_BASE=c:\bc5 :- set MS_BASE=c:\msvc diff --git a/default.bat b/default.bat index b6c6cf0..b7fe75d 100644 --- a/default.bat +++ b/default.bat @@ -23,6 +23,7 @@ if not "%MAKE%" == "" goto skip_make if "%COMPILER%" == "TC2" set MAKE=%TC2_BASE%\make if "%COMPILER%" == "TURBOCPP" set MAKE=%TP1_BASE%\bin\make if "%COMPILER%" == "TC3" set MAKE=%TC3_BASE%\bin\make +if "%COMPILER%" == "BC3" set MAKE=%BC3_BASE%\bin\make if "%COMPILER%" == "BC5" set MAKE=%BC5_BASE%\bin\make if "%COMPILER%" == "WATCOM" set MAKE=wmake /ms /h if "%COMPILER%" == "MSCL8" set MAKE=%MS_BASE%\bin\nmake /nologo @@ -38,6 +39,7 @@ if not "%XLINK%" == "" goto skip_xlink if "%COMPILER%" == "TC2" set XLINK=%TC2_BASE%\tlink /m/c if "%COMPILER%" == "TURBOCPP" set XLINK=%TP1_BASE%\bin\tlink /m/c if "%COMPILER%" == "TC3" set XLINK=%TC3_BASE%\bin\tlink /m/c +if "%COMPILER%" == "BC3" set XLINK=%BC3_BASE%\bin\tlink /m/c if "%COMPILER%" == "BC5" set XLINK=%BC5_BASE%\bin\tlink /m/c if "%COMPILER%" == "WATCOM" set XLINK=..\utils\wlinker /ma/nologo if "%COMPILER%" == "MSCL8" set XLINK=%MS_BASE%\bin\link /ONERROR:NOEXE /ma /nologo @@ -71,6 +73,7 @@ set XLINK= set TC2_BASE= set TP1_BASE= set TC3_BASE= +set BC3_BASE= set BC5_BASE= set MS_BASE= set XNASM= diff --git a/mkfiles/bc3.mak b/mkfiles/bc3.mak new file mode 100644 index 0000000..4734c43 --- /dev/null +++ b/mkfiles/bc3.mak @@ -0,0 +1,53 @@ +# +# BC3.MAK - kernel copiler options for Borland C 3.1 +# + +# Use these for Borland C 3.1 + +COMPILERPATH=$(BC3_BASE) +COMPILERBIN=$(COMPILERPATH)\bin +CC=$(COMPILERBIN)\bcc -c +CL=$(COMPILERBIN)\bcc +INCLUDEPATH=$(COMPILERPATH)\include +LIBUTIL=$(COMPILERBIN)\tlib +LIBPATH=$(COMPILERPATH)\lib +LIBTERM= +LIBPLUS=+ + +TINY=-lt +CFLAGST=-L$(LIBPATH) -mt -a- -k- -f- -ff- -O -Z -d +CFLAGSC=-L$(LIBPATH) -a- -mc + +TARGET=KT3 + +# used for building the library + +CLIB=$(COMPILERPATH)\lib\cs.lib +MATH_EXTRACT=*H_LDIV *H_LLSH *H_LURSH *F_LXMUL +MATH_INSERT=+H_LDIV +H_LLSH +H_LURSH +F_LXMUL + +# +# heavy stuff - building the kernel +# Compiler and Options for Borland C++ +# ------------------------------------ +# +# -zAname ¦ ¦ Code class +# -zBname ¦ ¦ BSS class +# -zCname ¦ ¦ Code segment +# -zDname ¦ ¦ BSS segment +# -zEname ¦ ¦ Far segment +# -zFname ¦ ¦ Far class +# -zGname ¦ ¦ BSS group +# -zHname ¦ ¦ Far group +# -zPname ¦ ¦ Code group +# -zRname ¦ ¦ Data segment +# -zSname ¦ ¦ Data group +# -zTname ¦ ¦ Data class +# -zX ¦«¦ Use default name for "X" + +# +# ALLCFLAGS specified by turbo.cfg and config.mak +# +ALLCFLAGS=$(TARGETOPT) -zCHMA_TEXT $(ALLCFLAGS) +INITCFLAGS=$(ALLCFLAGS) -zCINIT_TEXT -zDIB -zRID -zTID -zBIB -zGI_GROUP -zSI_GROUP +CFLAGS=$(ALLCFLAGS)