build_sources.cmd 3.16 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
Pekka Pessi's avatar
Pekka Pessi committed
6
@if x%AWK%==x set AWK=gawk
7 8 9 10 11 12 13 14 15 16 17
@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% (GNU awk) into your PATH ***
@goto failed
:have_awk

:: in Win32 exit 0; from awk gets converted to errorlevel 1
@set MSG_AWK=gawk -v BINMODE=rw -f ../libsofia-sip-ua/msg/msg_parser.awk success=-1
18
@set TAG_AWK=gawk -f ../libsofia-sip-ua/su/tag_dll.awk BINMODE=rw
Pekka Pessi's avatar
Pekka Pessi committed
19

20 21 22
@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
23 24 25

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

31 32 33 34
@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
35 36

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

44 45 46 47 48 49
@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 PT=../libsofia-sip-ua/sip/sip_parser_table.c
Pekka Pessi's avatar
Pekka Pessi committed
50 51

%MSG_AWK% module=sip PR=%PR% %IN%  < NUL
52
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
53
%MSG_AWK% module=sip PR=%PR2% %IN% < NUL
54
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
55
%MSG_AWK% module=sip PR=%PR3% %IN% < NUL
56
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
57
%MSG_AWK% module=sip PR=%PR4% %IN% < NUL
58
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
59 60 61

%MSG_AWK% module=sip MC_HASH_SIZE=127 MC_SHORT_SIZE=26 ^
  FLAGFILE=../libsofia-sip-ua/sip/sip_bad_mask ^
62
  PT=%PT% %IN% < NUL
63
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
64

65 66 67 68 69
@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
70 71

%MSG_AWK% module=http PR=%PR% %IN%  < NUL
72
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
73
%MSG_AWK% module=http PR=%PR2% %IN% < NUL
74
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
75
%MSG_AWK% module=http PR=%PR3% %IN% < NUL
76
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
77
%MSG_AWK% module=http MC_HASH_SIZE=127 PT=%PT% %IN% < NUL
78
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
79

80
@set P=../libsofia-sip-ua
Pekka Pessi's avatar
Pekka Pessi committed
81 82

%TAG_AWK% NO_DLL=1 %P%/http/http_tag.c  < NUL
83
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
84
%TAG_AWK% NO_DLL=1 %P%/iptsec/auth_tag.c  < NUL
85
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
86
%TAG_AWK% NO_DLL=1 %P%/msg/msg_tag.c  < NUL
87
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
88
%TAG_AWK% NO_DLL=1 %P%/nea/nea_tag.c  < NUL
89
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
90
%TAG_AWK% NO_DLL=1 LIST=nta_tag_list %P%/nta/nta_tag.c  < NUL
91
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
92
%TAG_AWK% NO_DLL=1 %P%/nth/nth_tag.c  < NUL
93
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
94
%TAG_AWK% NO_DLL=1 LIST=nua_tag_list %P%/nua/nua_tag.c  < NUL
95
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
96
%TAG_AWK% NO_DLL=1 %P%/sdp/sdp_tag.c  < NUL
97
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
98
%TAG_AWK% NO_DLL=1 %P%/sip/sip_tag.c  < NUL
99
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
100
%TAG_AWK% NO_DLL=1 LIST=soa_tag_list %P%/soa/soa_tag.c  < NUL
101
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
102
%TAG_AWK% NO_DLL=1 LIST=stun_tag_list %P%/stun/stun_tag.c  < NUL
103
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
104
%TAG_AWK% NO_DLL=1 %P%/tport/tport_tag.c  < NUL
105
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
106
%TAG_AWK% NO_DLL=1 %P%/url/url_tag.c  < NUL
107
%CHECK%
Pekka Pessi's avatar
Pekka Pessi committed
108

109
@GOTO end
110 111 112
:failed
@ECHO *** FAILED ***
:end
113
@endlocal