build_sources.cmd 3.69 KB
Newer Older
Pekka Pessi's avatar
Pekka Pessi committed
1
::
2
:: Build sources on win32
Pekka Pessi's avatar
Pekka Pessi committed
3 4
::

5
@setlocal
6
@if x%AWK%==x set AWK=mawk
7 8 9 10 11
@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
12 13
@echo *** install %AWK% (mawk or GNU awk) into your PATH ***
@echo *** see http://gnuwin32.sourceforge.net/packages/mawk.htm ***
14 15 16
@goto failed
:have_awk

17
@set MSG_AWK=%AWK% -v BINMODE=rw -f ../libsofia-sip-ua/msg/msg_parser.awk
18 19
:: 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
20 21
:: @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
Pekka Pessi's avatar
Pekka Pessi committed
22

23 24 25
@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
Pekka Pessi's avatar
Pekka Pessi committed
26 27 28

%MSG_AWK% module=msg_test NO_MIDDLE=1 NO_LAST=1 ^
  PR=%PR% %IN% < NUL
29
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
30 31
%MSG_AWK% module=msg_test prefix=msg MC_HASH_SIZE=127 multipart=msg_multipart ^
  PT=%PT% %IN% < NUL
32
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
33

34 35 36 37
@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
Pekka Pessi's avatar
Pekka Pessi committed
38 39

%MSG_AWK% module=msg NO_FIRST=1 NO_MIDDLE=1 PR=%PR% %IN% < NUL
40
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
41
%MSG_AWK% module=msg NO_FIRST=1 NO_LAST=1 PR=%PR2% %IN% < NUL
42
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
43
%MSG_AWK% module=msg_multipart tprefix=msg prefix=mp MC_HASH_SIZE=127 ^
44
  PT=%PT% %IN% < NUL
45
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
46

47 48
@set AWK_SIP_AWK=%MSG_AWK% module=sip

49 50 51 52 53
@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
54 55
@set PR5=../libsofia-sip-ua/sip/sofia-sip/sip_extra.h
@set SIPEXTRA=../libsofia-sip-ua/sip/sip_extra_headers.txt
56
@set PT=../libsofia-sip-ua/sip/sip_parser_table.c
Pekka Pessi's avatar
Pekka Pessi committed
57

58
%AWK_SIP_AWK% PR=%PR% %IN% %SIPEXTRA% < NUL
59
%CHECK%
60
%AWK_SIP_AWK% PR=%PR2% %IN% < NUL
61
%CHECK%
62
%AWK_SIP_AWK% PR=%PR3% %IN% < NUL
63
%CHECK%
64
%AWK_SIP_AWK% PR=%PR4% %IN% < NUL
65
%CHECK%
66 67 68 69 70
%AWK_SIP_AWK% PR=%PR5% NO_FIRST=1 NO_LAST=1 ^
   TEMPLATE1=%PR2%.in ^
   TEMPLATE2=%PR3%.in ^
   TEMPLATE3=%PR4%.in ^
   TEMPLATE=%PR5%.in %SIPEXTRA% < NUL 
71
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
72

73
%AWK_SIP_AWK% PT=%PT% TEMPLATE=%PT%.in ^
Pekka Pessi's avatar
Pekka Pessi committed
74
  FLAGFILE=../libsofia-sip-ua/sip/sip_bad_mask ^
75 76
  MC_HASH_SIZE=127 MC_SHORT_SIZE=26 ^
  %IN% %SIPEXTRA% < NUL
77
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
78

79 80 81 82 83
@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
Pekka Pessi's avatar
Pekka Pessi committed
84 85

%MSG_AWK% module=http PR=%PR% %IN%  < NUL
86
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
87
%MSG_AWK% module=http PR=%PR2% %IN% < NUL
88
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
89
%MSG_AWK% module=http PR=%PR3% %IN% < NUL
90
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
91
%MSG_AWK% module=http MC_HASH_SIZE=127 PT=%PT% %IN% < NUL
92
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
93

94
@set P=../libsofia-sip-ua
Pekka Pessi's avatar
Pekka Pessi committed
95 96

%TAG_AWK% NO_DLL=1 %P%/http/http_tag.c  < NUL
97
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
98
%TAG_AWK% NO_DLL=1 %P%/iptsec/auth_tag.c  < NUL
99
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
100
%TAG_AWK% NO_DLL=1 %P%/msg/msg_tag.c  < NUL
101
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
102
%TAG_AWK% NO_DLL=1 %P%/nea/nea_tag.c  < NUL
103
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
104
%TAG_AWK% NO_DLL=1 LIST=nta_tag_list %P%/nta/nta_tag.c  < NUL
105
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
106
%TAG_AWK% NO_DLL=1 %P%/nth/nth_tag.c  < NUL
107
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
108
%TAG_AWK% NO_DLL=1 LIST=nua_tag_list %P%/nua/nua_tag.c  < NUL
109
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
110
%TAG_AWK% NO_DLL=1 %P%/sdp/sdp_tag.c  < NUL
111
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
112
%TAG_AWK% NO_DLL=1 %P%/sip/sip_tag.c  < NUL
113
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
114
%TAG_AWK% NO_DLL=1 LIST=soa_tag_list %P%/soa/soa_tag.c  < NUL
115
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
116
%TAG_AWK% NO_DLL=1 LIST=stun_tag_list %P%/stun/stun_tag.c  < NUL
117
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
118
%TAG_AWK% NO_DLL=1 %P%/tport/tport_tag.c  < NUL
119
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
120
%TAG_AWK% NO_DLL=1 %P%/url/url_tag.c  < NUL
121
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
122

123
@GOTO end
124 125 126
:failed
@ECHO *** FAILED ***
:end
127
@endlocal