makevp.bat 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. :: AH 20-12-06 modified for new PCRE-7.0 and VP/BCC
  2. :: PH 19-03-07 renamed !compile.txt and !linklib.txt as makevp-compile.txt and
  3. :: makevp-linklib.txt
  4. :: PH 26-03-07 re-renamed !compile.txt and !linklib.txt as makevp-c.txt and
  5. :: makevp-l.txt
  6. :: PH 29-03-07 hopefully the final rename to makevp_c and makevp_l
  7. :: AH 27.08.08 updated for new PCRE-7.7
  8. :: required PCRE.H and CONFIG.H will be generated if not existing
  9. @echo off
  10. echo.
  11. echo Compiling PCRE with BORLAND C++ for VIRTUAL PASCAL
  12. echo.
  13. REM This file was contributed by Alexander Tokarev for building PCRE for use
  14. REM with Virtual Pascal. It has not been tested with the latest PCRE release.
  15. REM This file has been modified and extended to compile with newer PCRE releases
  16. REM by Stefan Weber (Angels Holocaust).
  17. REM CHANGE THIS FOR YOUR BORLAND C++ COMPILER PATH
  18. SET BORLAND=f:\bcc
  19. REM location of the TASM binaries, if compiling with the -B BCC switch
  20. SET TASM=f:\tasm
  21. SET PATH=%PATH%;%BORLAND%\bin;%TASM%\bin
  22. SET PCRE_VER=77
  23. SET COMPILE_DEFAULTS=-DHAVE_CONFIG_H -DPCRE_STATIC -I%BORLAND%\include
  24. del pcre%PCRE_VER%.lib >nul 2>nul
  25. :: sh configure
  26. :: check for needed header files
  27. if not exist pcre.h copy pcre.h.generic pcre.h
  28. if not exist config.h copy config.h.generic config.h
  29. bcc32 -DDFTABLES %COMPILE_DEFAULTS% -L%BORLAND%\lib dftables.c
  30. IF ERRORLEVEL 1 GOTO ERROR
  31. :: dftables > chartables.c
  32. dftables pcre_chartables.c
  33. REM compile and link the PCRE library into lib: option -B for ASM compile works too
  34. bcc32 -a4 -c -RT- -y- -v- -u- -R- -Q- -X -d -fp -ff -P- -O2 -Oc -Ov -3 -w-8004 -w-8064 -w-8065 -w-8012 -UDFTABLES -DVPCOMPAT %COMPILE_DEFAULTS% @makevp_c.txt
  35. IF ERRORLEVEL 1 GOTO ERROR
  36. tlib %BORLAND%\lib\cw32.lib *calloc *del *strncmp *memcpy *memmove *memset *memcmp *strlen
  37. IF ERRORLEVEL 1 GOTO ERROR
  38. tlib pcre%PCRE_VER%.lib @makevp_l.txt +calloc.obj +del.obj +strncmp.obj +memcpy.obj +memmove.obj +memset.obj +memcmp.obj +strlen.obj
  39. IF ERRORLEVEL 1 GOTO ERROR
  40. del *.obj *.tds *.bak >nul 2>nul
  41. echo ---
  42. echo Now the library should be complete. Please check all messages above.
  43. echo Don't care for warnings, it's OK.
  44. goto END
  45. :ERROR
  46. echo ---
  47. echo Error while compiling PCRE. Aborting...
  48. pause
  49. goto END
  50. :END