home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c034 / 5.ddi / CDLLOBJS.CM$ / CDLLOBJS.bin
Encoding:
Text File  |  1989-04-26  |  2.5 KB  |  64 lines

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