build_sources.cmd 3.62 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
::
:: Build sources on win32 for Open C
::

@setlocal
@if x%AWK%==x set AWK=mawk
@set CHECK=@IF errorlevel 1 GOTO failed

:: Check that we really have awk
@%AWK% "{ exit(0); }" < NUL >NUL
@if not errorlevel 9009 goto have_awk
@echo *** install %AWK% (mawk or GNU awk) into your PATH ***
@echo *** see http://gnuwin32.sourceforge.net/packages/mawk.htm ***
@goto failed
:have_awk

@set MSG_AWK=%AWK% -v BINMODE=rw -f ../libsofia-sip-ua/msg/msg_parser.awk
:: in Win32 exit 0; from gawk 3.1.3 gets converted to errorlevel 1
:: If you have gawk 3.1.3 uncomment the following line
:: @set MSG_AWK=%AWK% -v BINMODE=rw -f ../libsofia-sip-ua/msg/msg_parser.awk success=-1
@set TAG_AWK=%AWK% -f ../libsofia-sip-ua/su/tag_dll.awk BINMODE=rw

@set IN=../libsofia-sip-ua/msg/test_class.h
@set PR=../libsofia-sip-ua/msg/test_protos.h
@set PT=../libsofia-sip-ua/msg/test_table.c

%MSG_AWK% module=msg_test NO_MIDDLE=1 NO_LAST=1 ^
  PR=%PR% %IN% < NUL
%CHECK%
%MSG_AWK% module=msg_test prefix=msg MC_HASH_SIZE=127 multipart=msg_multipart ^
  PT=%PT% %IN% < NUL
%CHECK%

@set IN=../libsofia-sip-ua/msg/sofia-sip/msg_mime.h
@set PR=../libsofia-sip-ua/msg/sofia-sip/msg_protos.h
@set PR2=../libsofia-sip-ua/msg/sofia-sip/msg_mime_protos.h
@set PT=../libsofia-sip-ua/msg/msg_mime_table.c

%MSG_AWK% module=msg NO_FIRST=1 NO_MIDDLE=1 PR=%PR% %IN% < NUL
%CHECK%
%MSG_AWK% module=msg NO_FIRST=1 NO_LAST=1 PR=%PR2% %IN% < NUL
%CHECK%
%MSG_AWK% module=msg_multipart tprefix=msg prefix=mp MC_HASH_SIZE=127 ^
  PT=%PT% %IN% < NUL
%CHECK%

@set IN=../libsofia-sip-ua/sip/sofia-sip/sip.h
@set PR=../libsofia-sip-ua/sip/sip_tag.c
@set PR2=../libsofia-sip-ua/sip/sofia-sip/sip_hclasses.h
@set PR3=../libsofia-sip-ua/sip/sofia-sip/sip_protos.h
@set PR4=../libsofia-sip-ua/sip/sofia-sip/sip_tag.h
@set PR5=../libsofia-sip-ua/sip/sofia-sip/sip_extra.h
@set SIPEXTRA=../libsofia-sip-ua/sip/sip_extra_headers.txt
@set PT=../libsofia-sip-ua/sip/sip_parser_table.c

%MSG_AWK% module=sip PR=%PR% %IN%  < NUL
%CHECK%
%MSG_AWK% module=sip PR=%PR2% %IN% < NUL
%CHECK%
%MSG_AWK% module=sip PR=%PR3% %IN% < NUL
%CHECK%
%MSG_AWK% module=sip PR=%PR4% %IN% < NUL
%CHECK%
%MSG_AWK% module=sip PR=%PR5% TEMPLATE1=%PR2%.in TEMPLATE2=%PR3%.in TEMPLATE=%PR5%.in NO_FIRST=1 NO_LAST=1 < NUL %SIPEXTRA%
%CHECK%

%MSG_AWK% module=sip MC_HASH_SIZE=127 MC_SHORT_SIZE=26 ^
  FLAGFILE=../libsofia-sip-ua/sip/sip_bad_mask ^
  PT=%PT% %IN% < NUL
%CHECK%

@set IN=../libsofia-sip-ua/http/sofia-sip/http.h
@set PR=../libsofia-sip-ua/http/http_tag.c
@set PR2=../libsofia-sip-ua/http/sofia-sip/http_protos.h
@set PR3=../libsofia-sip-ua/http/sofia-sip/http_tag.h
@set PT=../libsofia-sip-ua/http/http_parser_table.c

%MSG_AWK% module=http PR=%PR% %IN%  < NUL
%CHECK%
%MSG_AWK% module=http PR=%PR2% %IN% < NUL
%CHECK%
%MSG_AWK% module=http PR=%PR3% %IN% < NUL
%CHECK%
%MSG_AWK% module=http MC_HASH_SIZE=127 PT=%PT% %IN% < NUL
%CHECK%

@set P=../libsofia-sip-ua

%TAG_AWK% NO_DLL=1 %P%/http/http_tag.c  < NUL
%CHECK%
%TAG_AWK% NO_DLL=1 %P%/iptsec/auth_tag.c  < NUL
%CHECK%
%TAG_AWK% NO_DLL=1 %P%/msg/msg_tag.c  < NUL
%CHECK%
%TAG_AWK% NO_DLL=1 %P%/nea/nea_tag.c  < NUL
%CHECK%
%TAG_AWK% NO_DLL=1 LIST=nta_tag_list %P%/nta/nta_tag.c  < NUL
%CHECK%
%TAG_AWK% NO_DLL=1 %P%/nth/nth_tag.c  < NUL
%CHECK%
%TAG_AWK% NO_DLL=1 LIST=nua_tag_list %P%/nua/nua_tag.c  < NUL
%CHECK%
%TAG_AWK% NO_DLL=1 %P%/sdp/sdp_tag.c  < NUL
%CHECK%
%TAG_AWK% NO_DLL=1 %P%/sip/sip_tag.c  < NUL
%CHECK%
%TAG_AWK% NO_DLL=1 LIST=soa_tag_list %P%/soa/soa_tag.c  < NUL
%CHECK%
%TAG_AWK% NO_DLL=1 LIST=stun_tag_list %P%/stun/stun_tag.c  < NUL
%CHECK%
%TAG_AWK% NO_DLL=1 %P%/tport/tport_tag.c  < NUL
%CHECK%
%TAG_AWK% NO_DLL=1 %P%/url/url_tag.c  < NUL
%CHECK%

@GOTO end
:failed
@ECHO *** FAILED ***
:end
@endlocal