8 rm -rf YosysVS-Tpl-v2.
zip YosysVS
9 wget https
://yosyshq.net
/yosys
/nogit
/YosysVS-Tpl-v2.
zip
10 wget https
://www.zlib.net
/fossils
/zlib-1.2
.11.
tar.gz
12 unzip YosysVS-Tpl-v2.
zip
13 rm -f YosysVS-Tpl-v2.
zip
14 tar xvfz zlib-1.2
.11.
tar.gz
17 mkdir
-p "$vcxsrc"/yosys
18 mkdir
-p "$vcxsrc"/yosys
/libs
/zlib
19 mv zlib-1.2
.11/* "$vcxsrc"/yosys
/libs
/zlib
/.
22 ls libs
/zlib
/*.c |
sed 's,.*:,,; s,//*,/,g; s,/[^/]*/\.\./,/,g; y, \\,\n\n,;' |
grep '^[^/]' >> ..
/..
/srcfiles.txt
25 n
=$
(grep -B999 '<ItemGroup>' "$vcxsrc"/YosysVS
/YosysVS.vcxproj |
wc -l)
26 head -n$n "$vcxsrc"/YosysVS
/YosysVS.vcxproj
27 egrep '\.(h|hh|hpp|inc)$' srcfiles.txt |
sed 's,.*,<ClInclude Include="../yosys/&" />,'
28 egrep -v '\.(h|hh|hpp|inc)$' srcfiles.txt |
sed 's,.*,<ClCompile Include="../yosys/&" />,'
29 echo '<ClCompile Include="../yosys/kernel/version.cc" />'
30 tail -n +$
((n
+1)) "$vcxsrc"/YosysVS
/YosysVS.vcxproj
31 } > "$vcxsrc"/YosysVS
/YosysVS.vcxproj.new
33 mv "$vcxsrc"/YosysVS
/YosysVS.vcxproj.new
"$vcxsrc"/YosysVS
/YosysVS.vcxproj
35 mkdir
-p "$vcxsrc"/yosys
36 tar -cf - -T srcfiles.txt |
tar -xf - -C "$vcxsrc"/yosys
37 cp -r share
"$vcxsrc"/
39 echo "namespace Yosys { extern const char *yosys_version_str; const char *yosys_version_str=\"Yosys" \
40 "$yosysver (git sha1 $gitsha, Visual Studio)\"; }" > "$vcxsrc"/yosys
/kernel
/version.cc
42 cat > "$vcxsrc"/readme-git.txt
<< EOT
43 Want to use a git working copy for the yosys source code?
44 Open "Git Bash" in this directory and run:
47 git clone https://github.com/YosysHQ/yosys.git yosys
49 git checkout -B master $(git rev-parse HEAD | cut -c1-10)
53 cat > "$vcxsrc"/readme-abc.txt
<< EOT
54 Yosys is using "ABC" for gate-level optimizations and technology
55 mapping. Download yosys-win32-mxebin-$yosysver.zip and copy the
56 following files from it into this directory:
62 sed -i 's/$/\r/; s/\r\r*/\r/g;' "$vcxsrc"/YosysVS
/YosysVS.vcxproj
"$vcxsrc"/readme-git.txt
"$vcxsrc"/readme-abc.txt