Files
TeslaRel410/CODE/RP/RP_L4/rpL4.mak
T
CydandClaude Fable 5 fdd9ac9d97 Initial import: Tesla Release 4.10 (Tesla:BattleTech & Tesla:Red Planet)
Archival snapshot of the Virtual World Entertainment Tesla cockpit
software, 1994-1996: MUNGA engine and L4 pod layer source (Borland
C++ 5.0), BT/RP game code, and game content (models, audio, maps,
gauges, Division renderer data). Includes third-party libraries:
Division dVS/DPL graphics, HMI SOS audio, WATTCP networking.

Files are preserved byte-for-byte (.gitattributes disables all
line-ending conversion). README.md documents the layout, target
hardware, and toolchain.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 13:21:58 -05:00

135 lines
2.9 KiB
Makefile

.autodepend
.cacheautodepend
.suffixes: .cpp
!ifndef BTYPE
!error BTYPE macro not supplied
!endif
!ifndef BPATH
!error BPATH macro not supplied
!endif
!include make.cfg
!include $(BPATH)
!ifndef RPL4_ROOT
!error RPL4_ROOT macro is not defined
!endif
TARGET_DIR = $(RPL4_ROOT)\$(BTYPE)
TARGET_PATH = $(TARGET_DIR)\\
.path.obj = $(TARGET_DIR)
.path.lib = $(LIBRARY_PATH)
LIB_PREFIX = -+$(TARGET_DIR)\\
CFG_FILE = $(TARGET_DIR)\$(BTYPE).cfg
HEADER_FILE = rpl4$(BTYPE).csm
#------------------------------------------------------------------------------
# Library targets
#
all: $(CFG_FILE) $(TARGET_DIR)\rpl4$(BTYPE).exe $(TARGET_DIR)\rpl4tool.exe
clean:
del $(TARGET_DIR)\*.obj
del $(TARGET_DIR)\*.lib
del $(TARGET_DIR)\*.exe
del $(TARGET_DIR)\*.bak
del $(TARGET_DIR)\*.cfg
assemble:
@echo No assembly targets
#------------------------------------------------------------------------------
# Implicit rules
#
!include $(BTYPE).mak
!ifndef STARTUP_OBJ
!error STARTUP_OBJ macro is not defined
!endif
!ifndef STARTUP_LIBS
!error STARTUP_LIBS macro is not defined
!endif
{$(INCLUDE_PATH)}.cpp{$(TARGET_DIR)}.obj:
$(BCC) @$(CFG_FILE) $< >>error.log
{$(INCLUDE_PATH)}.c{$(TARGET_DIR)}.obj:
$(BCC) @$(CFG_FILE) $< >>error.log
{$(RPL4_ROOT)}.asm{$(TARGET_DIR)}.obj:
tasm32 -ml $(TASM_OPTIONS) -i$(RPL4_ROOT) $<,$@ >>error.log
#------------------------------------------------------------------------------
# Game
#
$(TARGET_DIR)\rpl4$(BTYPE).exe: \
$(RPL4_ROOT)\rpl4.mak l4stub.lib stub.lib $(BTYPE).mak munga.lib\
mungal4.lib rp.lib $(TARGET_DIR)\rpl4.lib $(TARGET_DIR)\rpl4.obj\
$(DPL_ROOT)\libdpl.lib
tlink32 @&&|
$(LINK_OPTIONS) +
$(STARTUP_OBJ)+
$(TARGET_DIR)\rpl4.obj
$<,$*
l4stub.lib+
stub.lib+
munga.lib+
mungal4.lib+
$(DPL_ROOT)\libdpl.lib+
rp.lib+
$(TARGET_DIR)\rpl4.lib+
$(STARTUP_LIBS)
| >>error.log
rpl4.obj: $(CFG_FILE)
#------------------------------------------------------------------------------
# Tools
#
$(TARGET_DIR)\rpl4tool.exe: \
$(RPL4_ROOT)\rpl4.mak $(TARGET_DIR)\rpl4tool.obj l4stub.lib stub.lib\
$(BTYPE).mak munga.lib mungal4.lib rp.lib $(TARGET_DIR)\rpl4.lib\
$(DPL_ROOT)\libdpl.lib
tlink32 @&&|
$(LINK_OPTIONS) +
$(STARTUP_OBJ)+
$(TARGET_DIR)\rpl4tool.obj
$<,$*
l4stub.lib+
stub.lib+
munga.lib+
mungal4.lib+
$(DPL_ROOT)\libdpl.lib+
rp.lib+
$(TARGET_DIR)\rpl4.lib+
$(STARTUP_LIBS)
| >>error.log
rpl4tool.obj: $(CFG_FILE)
#------------------------------------------------------------------------------
# Red Planet library
#
RPL4_OBJS = \
?rpl4mode.obj \
?rpl4gaug.obj \
?rpl4grnd.obj \
?rpl4vid.obj \
?rpl4mppr.obj \
?rpl4arnd.obj \
?rpl4mssn.obj \
?rpl4app.obj \
?rpl4pb.obj
$(RPL4_OBJS:?=): $(CFG_FILE)
$(TARGET_DIR)\rpl4.lib: $(RPL4_OBJS:?=) $(RPL4_ROOT)\rpl4.mak
tlib $@ $(LIB_OPTIONS) @&&|
$(RPL4_OBJS:?=$(LIB_PREFIX))
| >>error.log