|
|
1.1 root 1: @echo off
2: echo 386 C Runtime Library DLL Build
3: echo -------------------------------
4: setlocal
5: set OBJSLIB=CDLLOBJS
6: set SUPPLIB=CDLLSUPP
7: if %1.==. goto Message
8: set DESTIN=%1
9: if not %2.==. set LIBC=%2
10: if not %2.==. goto Start
11: for %%A in (%LIB%) do if exist %%A\CRTLIB.OBJ set LIBC=%%A& goto Start
12: echo Cannot find components in LIB directory
13: goto Exit
14: :Start
15: echo.
16: echo Build dynamic link library.
17: echo.
18: echo LINK386 %LIBC%\CRTLIB.OBJ,%DESTIN%\CEXAMPLE.DLL/NOI,,%LIBC%\%OBJSLIB% OS2386/NOD/NOE,%LIBC%\CDLLOBJS.DEF;
19: LINK386 %LIBC%\CRTLIB.OBJ,%DESTIN%\CEXAMPLE.DLL/NOI,,%LIBC%\%OBJSLIB% OS2386/NOD/NOE,%LIBC%\CDLLOBJS.DEF;
20: echo.
21: echo Build imports library.
22: echo.
23: for %%A in (%PATH%) do if exist %%A\IMPLIB.EXE goto Skip2
24: echo Cannot find IMPLIB.EXE in PATH
25: goto Exit
26: :Skip2
27: echo IMPLIB %LIBC%\CEXAMPLE.LIB %LIBC%\CDLLOBJS.DEF
28: IMPLIB %LIBC%\CEXAMPLE.LIB %LIBC%\CDLLOBJS.DEF
29: echo.
30: echo Add supplemental library to CEXAMPLE.LIB. This library contains
31: echo run-time routines that cannot be put in the dynamic link library.
32: echo.
33: echo LIB %LIBC%\CEXAMPLE.LIB+%LIBC%\%SUPPLIB%.LIB;
34: LIB %LIBC%\CEXAMPLE.LIB+%LIBC%\%SUPPLIB%.LIB;
35: DEL %LIBC%\CEXAMPLE.BAK
36: goto Exit
37: :Message
38: echo This batch file creates a dynamic link library and a corresponding
39: echo imports library containing the C run-time. The imports library (which
40: echo is invoked at link time) specifies the symbols and routines that will
41: echo be imported from the dynamic link library at run time. Your PATH should
42: echo point to the directory containing IMPLIB.EXE. Your LIB environment
43: echo variable should have a pathname for OS2386.LIB. The files CDLLOBJS.DEF,
44: echo %OBJSLIB%.LIB, and %SUPPLIB%.LIB should be in the same directory as CRTLIB.OBJ.
45: echo.
46: echo The dynamic link library is named CEXAMPLE.DLL and the imports library
47: echo is named CEXAMPLE.LIB. To build the libraries with a different name,
48: echo edit this file (CDLLOBJS.CMD) and CDLLOBJS.DEF, and replace all
49: echo occurrences of CEXAMPLE with the desired name.
50: echo.
51: echo Syntax:
52: echo CDLLOBJS dlldir [libdir]
53: echo.
54: echo Arguments:
55: echo dlldir Destination directory for DLL (should be in LIBPATH
56: echo in CONFIG.SYS). Use . for the current directory.
57: echo libdir Destination directory for LIB (Default is LIB
58: echo environment variable).
59: echo.
60: echo Examples:
61: echo CDLLOBJS C:\OS2\DLL
62: echo Puts CEXAMPLE.DLL in C:\OS2\DLL and CEXAMPLE.LIB
63: echo in LIB directory.
64: echo CDLLOBJS . D:\LIBC
65: echo Puts CEXAMPLE.DLL in the current directory and
66: echo CEXAMPLE.LIB in D:\LIBC
67: :Exit
68: endlocal
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.