2
0

build_sources.cmd 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. ::
  2. :: Build sources on win32
  3. ::
  4. @setlocal
  5. @if x%AWK%==x set AWK=mawk
  6. @set CHECK=@IF errorlevel 1 GOTO failed
  7. :: Check that we really have awk
  8. @%AWK% "{ exit(0); }" < NUL >NUL
  9. @if not errorlevel 9009 goto have_awk
  10. @echo *** install %AWK% (mawk or GNU awk) into your PATH ***
  11. @echo *** see http://gnuwin32.sourceforge.net/packages/mawk.htm ***
  12. @goto failed
  13. :have_awk
  14. @set MSG_AWK=%AWK% -v BINMODE=rw -f ../libsofia-sip-ua/msg/msg_parser.awk
  15. :: in Win32 exit 0; from gawk 3.1.3 gets converted to errorlevel 1
  16. :: If you have gawk 3.1.3 uncomment the following line
  17. :: @set MSG_AWK=%AWK% -v BINMODE=rw -f ../libsofia-sip-ua/msg/msg_parser.awk success=-1
  18. @set TAG_AWK=%AWK% -f ../libsofia-sip-ua/su/tag_dll.awk BINMODE=rw
  19. @set IN=../libsofia-sip-ua/msg/test_class.h
  20. @set PR=../libsofia-sip-ua/msg/test_protos.h
  21. @set PT=../libsofia-sip-ua/msg/test_table.c
  22. %MSG_AWK% module=msg_test NO_MIDDLE=1 NO_LAST=1 ^
  23. PR=%PR% %IN% < NUL
  24. %CHECK%
  25. %MSG_AWK% module=msg_test prefix=msg MC_HASH_SIZE=127 multipart=msg_multipart ^
  26. PT=%PT% %IN% < NUL
  27. %CHECK%
  28. @set IN=../libsofia-sip-ua/msg/sofia-sip/msg_mime.h
  29. @set PR=../libsofia-sip-ua/msg/sofia-sip/msg_protos.h
  30. @set PR2=../libsofia-sip-ua/msg/sofia-sip/msg_mime_protos.h
  31. @set PT=../libsofia-sip-ua/msg/msg_mime_table.c
  32. %MSG_AWK% module=msg NO_FIRST=1 NO_MIDDLE=1 PR=%PR% %IN% < NUL
  33. %CHECK%
  34. %MSG_AWK% module=msg NO_FIRST=1 NO_LAST=1 PR=%PR2% %IN% < NUL
  35. %CHECK%
  36. %MSG_AWK% module=msg_multipart tprefix=msg prefix=mp MC_HASH_SIZE=127 ^
  37. PT=%PT% %IN% < NUL
  38. %CHECK%
  39. @set AWK_SIP_AWK=%MSG_AWK% module=sip
  40. @set IN=../libsofia-sip-ua/sip/sofia-sip/sip.h
  41. @set PR=../libsofia-sip-ua/sip/sip_tag.c
  42. @set PR2=../libsofia-sip-ua/sip/sofia-sip/sip_hclasses.h
  43. @set PR3=../libsofia-sip-ua/sip/sofia-sip/sip_protos.h
  44. @set PR4=../libsofia-sip-ua/sip/sofia-sip/sip_tag.h
  45. @set PR5=../libsofia-sip-ua/sip/sofia-sip/sip_extra.h
  46. @set SIPEXTRA=../libsofia-sip-ua/sip/sip_extra_headers.txt
  47. @set PT=../libsofia-sip-ua/sip/sip_parser_table.c
  48. %AWK_SIP_AWK% PR=%PR% %IN% %SIPEXTRA% < NUL
  49. %CHECK%
  50. %AWK_SIP_AWK% PR=%PR2% %IN% < NUL
  51. %CHECK%
  52. %AWK_SIP_AWK% PR=%PR3% %IN% < NUL
  53. %CHECK%
  54. %AWK_SIP_AWK% PR=%PR4% %IN% < NUL
  55. %CHECK%
  56. %AWK_SIP_AWK% PR=%PR5% NO_FIRST=1 NO_LAST=1 ^
  57. TEMPLATE1=%PR2%.in ^
  58. TEMPLATE2=%PR3%.in ^
  59. TEMPLATE3=%PR4%.in ^
  60. TEMPLATE=%PR5%.in %SIPEXTRA% < NUL
  61. %CHECK%
  62. %AWK_SIP_AWK% PT=%PT% TEMPLATE=%PT%.in ^
  63. FLAGFILE=../libsofia-sip-ua/sip/sip_bad_mask ^
  64. MC_HASH_SIZE=127 MC_SHORT_SIZE=26 ^
  65. %IN% %SIPEXTRA% < NUL
  66. %CHECK%
  67. @set IN=../libsofia-sip-ua/http/sofia-sip/http.h
  68. @set PR=../libsofia-sip-ua/http/http_tag.c
  69. @set PR2=../libsofia-sip-ua/http/sofia-sip/http_protos.h
  70. @set PR3=../libsofia-sip-ua/http/sofia-sip/http_tag.h
  71. @set PT=../libsofia-sip-ua/http/http_parser_table.c
  72. %MSG_AWK% module=http PR=%PR% %IN% < NUL
  73. %CHECK%
  74. %MSG_AWK% module=http PR=%PR2% %IN% < NUL
  75. %CHECK%
  76. %MSG_AWK% module=http PR=%PR3% %IN% < NUL
  77. %CHECK%
  78. %MSG_AWK% module=http MC_HASH_SIZE=127 PT=%PT% %IN% < NUL
  79. %CHECK%
  80. @set P=../libsofia-sip-ua
  81. %TAG_AWK% NO_DLL=1 %P%/http/http_tag.c < NUL
  82. %CHECK%
  83. %TAG_AWK% NO_DLL=1 %P%/iptsec/auth_tag.c < NUL
  84. %CHECK%
  85. %TAG_AWK% NO_DLL=1 %P%/msg/msg_tag.c < NUL
  86. %CHECK%
  87. %TAG_AWK% NO_DLL=1 %P%/nea/nea_tag.c < NUL
  88. %CHECK%
  89. %TAG_AWK% NO_DLL=1 LIST=nta_tag_list %P%/nta/nta_tag.c < NUL
  90. %CHECK%
  91. %TAG_AWK% NO_DLL=1 %P%/nth/nth_tag.c < NUL
  92. %CHECK%
  93. %TAG_AWK% NO_DLL=1 LIST=nua_tag_list %P%/nua/nua_tag.c < NUL
  94. %CHECK%
  95. %TAG_AWK% NO_DLL=1 %P%/sdp/sdp_tag.c < NUL
  96. %CHECK%
  97. %TAG_AWK% NO_DLL=1 %P%/sip/sip_tag.c < NUL
  98. %CHECK%
  99. %TAG_AWK% NO_DLL=1 LIST=soa_tag_list %P%/soa/soa_tag.c < NUL
  100. %CHECK%
  101. %TAG_AWK% NO_DLL=1 LIST=stun_tag_list %P%/stun/stun_tag.c < NUL
  102. %CHECK%
  103. %TAG_AWK% NO_DLL=1 %P%/tport/tport_tag.c < NUL
  104. %CHECK%
  105. %TAG_AWK% NO_DLL=1 %P%/url/url_tag.c < NUL
  106. %CHECK%
  107. %TAG_AWK% NO_DLL=1 %P%/su/su_tag.c < NUL
  108. %CHECK%
  109. @GOTO end
  110. :failed
  111. @ECHO *** FAILED ***
  112. :end
  113. @endlocal