aboutsummaryrefslogtreecommitdiffstats
path: root/dist/mcode/windows/complib.bat
blob: bdd062b6728af2156a941d93b4145d836f625f4d (plain)
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
set GHDL=ghdl

cd build
gnatmake -aI..\windows ghdlfilter
cd ..

set REL=..\..\..
set LIBSRC=%REL%\..\..\libraries

::
:: library sources
::
set STD_SRCS=       textio textio_body
set IEEE_SRCS=      std_logic_1164 std_logic_1164_body numeric_std numeric_std-body numeric_bit numeric_bit-body
set MATH_SRCS=      math_real math_real-body math_complex math_complex-body

set STD08_SRCS=     textio textio_body env env_body
set IEEE08_SRCS=    std_logic_1164 std_logic_1164-body std_logic_textio math_real math_real-body math_complex math_complex-body numeric_bit numeric_bit-body numeric_bit_unsigned numeric_bit_unsigned-body numeric_std numeric_std-body numeric_std_unsigned numeric_std_unsigned-body fixed_float_types fixed_generic_pkg fixed_generic_pkg-body fixed_pkg float_generic_pkg float_generic_pkg-body float_pkg ieee_bit_context ieee_std_context

set VITAL95_SRCS=   vital_timing vital_timing_body vital_primitives vital_primitives_body
set VITAL2000_SRCS= timing_p timing_b prmtvs_p prmtvs_b memory_p memory_b

set SYNOPSYS_SRCS=  std_logic_arith std_logic_textio std_logic_unsigned std_logic_signed std_logic_misc std_logic_misc-body
set MENTOR_SRCS=    std_logic_arith std_logic_arith_body


mkdir lib
cd lib

:::::::::::::::::
echo v87 libraries...

mkdir v87
cd v87

echo std
mkdir std
cd std
for %%F in (%STD_SRCS%)      do %REL%\build\ghdlfilter -v87 < %LIBSRC%\std\%%F.vhdl > %%F.v87   && %REL%\build\%GHDL% -a --std=87 --bootstrap --work=std %%F.v87
cd ..

echo ieee
mkdir ieee
cd ieee
for %%F in (%IEEE_SRCS%)     do %REL%\build\ghdlfilter -v87 < %LIBSRC%\ieee\%%F.vhdl > %%F.v87  && %REL%\build\%GHDL% -a --std=87 -P..\std --work=ieee %%F.v87
for %%F in (%VITAL95_SRCS%)  do copy %LIBSRC%\vital95\%%F.vhdl %%F.vhd                          && %REL%\build\%GHDL% -a --std=87 -P..\std --work=ieee %%F.vhd
cd ..

echo synopsys
mkdir synopsys
cd synopsys
for %%F in (%IEEE_SRCS%)     do %REL%\build\%GHDL% -a --std=87 -P..\std --work=ieee ..\ieee\%%F.v87
for %%F in (%VITAL95_SRCS%)  do %REL%\build\%GHDL% -a --std=87 -P..\std --work=ieee ..\ieee\%%F.vhd
for %%F in (%SYNOPSYS_SRCS%) do copy %LIBSRC%\synopsys\%%F.vhdl %%F.vhd  && %REL%\build\%GHDL% -a --std=87 -P..\std --work=ieee %%F.vhd
cd ..

cd ..

:::::::::::::::::
echo v93 libraries...

mkdir v93
cd v93

echo std
mkdir std
cd std
for %%F in (%STD_SRCS%)       do %REL%\build\ghdlfilter -v93 < %LIBSRC%\std\%%F.vhdl > %%F.v93  && %REL%\build\%GHDL% -a --std=93 --bootstrap --work=std %%F.v93
cd ..

echo ieee
mkdir ieee
cd ieee
for %%F in (%IEEE_SRCS%)      do %REL%\build\ghdlfilter -v93 < %LIBSRC%\ieee\%%F.vhdl > %%F.v93 && %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee %%F.v93
for %%F in (%VITAL2000_SRCS%) do copy %LIBSRC%\vital2000\%%F.vhdl %%F.vhd                       && %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee %%F.vhd
for %%F in (%MATH_SRCS%)      do copy %LIBSRC%\ieee\%%F.vhdl %%F.vhd                            && %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee %%F.vhd
cd ..

echo synopsys
mkdir synopsys
cd synopsys
for %%F in (%IEEE_SRCS%)      do %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee ..\ieee\%%F.v93
for %%F in (%VITAL2000_SRCS%) do %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee ..\ieee\%%F.vhd
for %%F in (%MATH_SRCS%)      do %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee ..\ieee\%%F.vhd
for %%F in (%SYNOPSYS_SRCS%)  do %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee ..\..\v87\synopsys\%%F.vhd
cd ..

echo mentor
mkdir mentor
cd mentor
for %%F in (%IEEE_SRCS%)      do %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee ..\ieee\%%F.v93
for %%F in (%VITAL2000_SRCS%) do %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee ..\ieee\%%F.vhd
for %%F in (%MATH_SRCS%)      do %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee ..\ieee\%%F.vhd
for %%F in (%MENTOR_SRCS%)    do copy %LIBSRC%\mentor\%%F.vhdl %%F.vhd  && %REL%\build\%GHDL% -a --std=93 -P..\std --work=ieee %%F.vhd
cd ..

cd ..

:::::::::::::::::
echo v08 libraries...

mkdir v08
cd v08

echo std
mkdir std
cd std
for %%F in (%STD08_SRCS%)     do %REL%\build\ghdlfilter -v08 < %LIBSRC%\std\%%F.vhdl > %%F.v08 && %REL%\build\%GHDL% -a --std=08 --bootstrap --work=std %%F.v08
cd ..

echo ieee
mkdir ieee
cd ieee
for %%F in (%IEEE08_SRCS%)    do %REL%\build\ghdlfilter -v08 < %LIBSRC%\ieee2008\%%F.vhdl > %%F.v08 && %REL%\build\%GHDL% -a --std=08 -P..\std --work=ieee %%F.v08
cd ..

:::::::::::::::::

cd ..\..