File:  [Synchronet] / sbbs / steve / linkc.bat
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:37:52 2018 UTC (8 years, 3 months ago) by root
Branches: digitaldynamics, MAIN
CVS tags: v1_06a, HEAD
1.06a MS-DOS

@echo off
goto start
rem   ************************************************************************
rem   *									     *
rem   *		linkc: link multiple objects with Turbo C libraries	     *
rem   *									     *
rem   *		syntax: linkc {model} main[,sub1[,sub2...]]		     *
rem   *			where {model} is t, s, c, m, l, or h		     *
rem   *									     *
rem   *		searches: directories specified in env variable LIB for	     *
rem   *		Turbo C object and library files of required model.	     *
rem   *		Currently substitutes C0S.LIB for C0T.LIB.  R1 SD 8/90	     *
rem   *									     *
rem   ************************************************************************
:start
echo.
if not %2x==x goto ga1
echo %0 arg 2: no object specified
goto end
:ga1
set space=
set zmdl=x
for %%a in (q t s c m l h) do if %%a==%1 set zmdl=%%a
if not %zmdl%==x goto ga2
echo %0 arg 1: model must be t, s, c, m, l, or h
goto end
:ga2
set zco=c0%zmdl%.obj
for %%a in (%lib%) do if exist %%a\%zco% set pzco=%%a\%zco%
if not %pzco%x==x goto ga3
echo %0: missing %zco% in (%lib%)
goto end
:ga3
if %zmdl%==t set zmdl=s
set zcl=c%zmdl%.lib
for %%a in (%lib%) do if exist %%a\%zcl% set pzcl=%%a\%zcl%
if not %pzcl%x==x goto ga4
echo %0: missing %zcl% in (%lib%)
goto end
:ga4
set zobj=%2
set zout=%2
:next
if %3x==x goto link
shift
set zobj=%zobj%+%2
goto next
:link
echo [%pzco%+%zobj%,%zout%,%zout%,%pzcl%]
rem link /noi %pzco%+%zobj%,%zout%,%zout%,%pzcl%
tlink /c /m %pzco%+%zobj%,%zout%,%zout%,%pzcl%
:end
set zmdl=
set zco=
set pzco=
set zcl=
set pzcl=
set zobj=
set zout=
echo.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.