Files
TeslaRel410/BORLAND/BC45/SOURCE/RTL/SOURCE/MATHLIB/MAKEFILE
T
CydandClaude Fable 5 63312e07f9 source410: literal 4.10 source reconstruction + BC++ 4.52 fleet toolchain archived
- BORLAND/: Borland C++ 4.52 (chosen over 4.5 by byte-match: CODE/RP/CW32.LIB
  is identical to 4.52's install lib). BCC32/TLINK32/TLIB/MAKE run natively on
  Win11; CODE/BT/OPT.MAK is the shipped BTL4OPT.EXE's exact flag recipe
  (extender = Borland PowerPack DPMI32, not Phar Lap TNT).
- restoration/source410/: the literal 1995-form reconstruction of the missing
  BT game source (never mixed into CODE/). Round 1-3 state:
  * 6 of 10 surviving original TUs COMPILE CLEAN under the period toolchain
    (BTMSSN, BTCNSL, BTSCNRL, BTTEAM, BTL4MODE, BTL4ARND) - first builds
    since 1996.
  * BT_L4/BTL4APP.CPP pilot reconstruction: 12/12 functions, Fail() lands on
    its binary-recorded line 400 exactly.
  * BT/BTCNSL.HPP: console wire IDs recovered from the binary's ctors
    (Killed=9, Damaged=10, ScoreUpdate=13, DeathWithoutHonor=15 [T1];
    TeamScore=12 flagged [T4]).
  * MUNGA/: 8 engine-header backfills back-dated from the BT412 WinTesla tree
    (VDATA numbering decomp-verified; AUDREND's OpenAL-era virtual removed -
    the period compiler is the drift detector).
  * Tooling: backdate.py (WinTesla->1995 header transform), compile410.sh
    (per-TU verification sweep under authentic OPT.MAK flags).
  * README: corrected roadmap - MECH.HPP is the capstone grown with the mech
    TU reconstructions; BTREG.CPP green = the header-family milestone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 07:33:26 -05:00

212 lines
5.7 KiB
Makefile

#############################################################################
#
# The make process relies on the creation of DLL and library response file #
# creation. To control the location of object modules the following should #
# be defined: #
# #
# IMPOBJS - A list of object modules that should appear in the DLL #
# import library. #
# #
# OBJS - If a DLL is build, this is a list of the object modules #
# that are linked into the DLL. If building a library, this #
# is the list of object modules that goes into the library. #
# #
# The building of miscellaneous object modules and libraries is controlled #
# by the list of files in the MISC variable. #
# #
#############################################################################
#############################################################################
# Build the object module lists. #
#############################################################################
!if $(OS) != DPMI16
MATHOBJS = \
matherrl.obj \
matherr.obj \
pow10d.obj \
pow10l.obj \
_matherl.obj \
_matherr.obj \
acosasin.obj \
acossinl.obj \
atan2.obj \
atan2l.obj \
ceil.obj \
ceill.obj \
cos.obj \
cosh.obj \
coshl.obj \
cosl.obj \
exp.obj \
expl.obj \
floor.obj \
floorl.obj \
fmod.obj \
fmodl.obj \
frexp.obj \
frexpl.obj \
hypot.obj \
ldexp.obj \
ldexpl.obj \
log.obj \
log10.obj \
log10l.obj \
logl.obj \
modf.obj \
modfl.obj \
poly.obj \
pow.obj \
powl.obj \
sin.obj \
sinh.obj \
sinhl.obj \
sinl.obj \
sqrt.obj \
sqrtl.obj \
tan.obj \
tanh.obj \
tanhl.obj \
tanl.obj \
_pow10.obj
MATHAUXOBJS= \
atof.obj \
atold.obj \
difftime.obj \
efcvt.obj \
gcvt.obj \
hugeval.obj \
mathwhy.obj \
strtod.obj \
atan.obj \
atanl.obj \
clear87.obj \
ctrl87.obj \
expld.obj \
fabs.obj \
fabsl.obj \
hypotl.obj \
ldtrunc.obj \
polyl.obj \
realcvt2.obj \
round.obj \
scantod2.obj \
stat87.obj \
xcvt.obj
! if $(OS) == WIN16
MATHAUXOBJS = \
$(MATHAUXOBJS) \
fbstp.obj \
wintrans.obj
! else
MATHOBJS = \
$(MATHOBJS) \
fperr.obj \
fpreset.obj
! endif
! if !$d(DLL)
MATHMISC = \
emuvars.obj \
flags87.obj
! endif
MATHMISC = \
$(MATHMISC) \
fftol.obj \
nftol.obj
! if $d(DLL)
IMPOBJS = $(MATHAUXOBJS) $(MATHMISC)
OBJS = $(MATHOBJS)
! else
MATHOBJS = $(MATHAUXOBJS) $(MATHOBJS) $(MATHMISC)
! endif
! if !$d(DLL)
! if $(OS) == DOS
MISC = \
math$(MODEL).lib
! else
MISC = \
mathw$(MODEL).lib
! endif
! endif
!else
OBJS = \
$(OBJS) \
fperr.obj
!endif
#############################################################################
# Configure the environment appropriately. #
#############################################################################
CCSFX = -D__NO_INTRINSICS__ -Z
!if $(OS) == DOS
CCPFX = -k
!endif
TASMCFG = 1 # Force tasm.cfg creation
NOOPT = 1 # Suppress optimizations
!include rules.mak
ASM = $(ASM) -I$(SRCBASE)\emu
#############################################################################
# MISC explicit rules. #
#############################################################################
math$(MODEL).lib : $(MATHOBJS)
makersp "-+%s &\n" &&|
$?
| >> $(LIBDIR)\math.rsp
$(TLIB) $(LIBDIR)\$& @$(LIBDIR)\math.rsp, $(LIBDIR)\temp.lst
if exist $(LIBDIR)\$&.bak del $(LIBDIR)\$&.bak
del $(LIBDIR)\temp.lst
del $(LIBDIR)\math.rsp
mathw$(MODEL).lib : $(MATHOBJS)
makersp "-+%s &\n" &&|
$?
| >> $(LIBDIR)\math.rsp
$(TLIB) $(LIBDIR)\$& @$(LIBDIR)\math.rsp, $(LIBDIR)\temp.lst
if exist $(LIBDIR)\$&.bak del $(LIBDIR)\$&.bak
del $(LIBDIR)\temp.lst
del $(LIBDIR)\math.rsp
ASMOPTS = -m -mx -q -t -I$(INCLBASE)\rtlinc\common16 -D__COMPACT__ -D__BSS__
!if $(OS) == WIN16
ASMOPTS = $(ASMOPTS) -D_WINDOWS -D_Windows -o
!endif
!if $(MODEL) == s || $(MODEL) == m
LDATA = 0
!else
LDATA = 1
!endif
emuvars.obj : emuvars.asm
echo $(ASMOPTS) > tasm.cfg
$(ASM) -DLDATA=$(LDATA) $&,$(OBJDIR)\$.
del tasm.cfg
fftol.obj : ftol.asm
echo $(ASMOPTS) > tasm.cfg
$(ASM) -DFCall ftol, $(OBJDIR)\$.
del tasm.cfg
flags87.obj : flags87.asm
echo $(ASMOPTS) > tasm.cfg
$(ASM) $&, $(OBJDIR)\$.
del tasm.cfg
nftol.obj : ftol.asm
echo $(ASMOPTS) > tasm.cfg
$(ASM) -DNCall ftol, $(OBJDIR)\$.
del tasm.cfg