-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuild.sh
executable file
·151 lines (146 loc) · 3.1 KB
/
Build.sh
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
cd graphviz
emcc \
-Oz \
-Ilib/cgraph \
lib/cgraph/io.c \
lib/cgraph/mem.c \
lib/cgraph/node.c \
lib/cgraph/obj.c \
lib/cgraph/pend.c \
lib/cgraph/rec.c \
lib/cgraph/refstr.c \
lib/cgraph/scan.c \
lib/cgraph/subg.c \
lib/cgraph/utils.c \
lib/cgraph/write.c \
lib/cgraph/agerror.c \
lib/cgraph/apply.c \
lib/cgraph/attr.c \
lib/cgraph/edge.c \
lib/cgraph/flatten.c \
lib/cgraph/grammar.c \
lib/cgraph/graph.c \
lib/cgraph/id.c \
lib/cgraph/imap.c \
-Ilib/cdt \
lib/cdt/dtextract.c \
lib/cdt/dtflatten.c \
lib/cdt/dthash.c \
lib/cdt/dtlist.c \
lib/cdt/dtmethod.c \
lib/cdt/dtopen.c \
lib/cdt/dtrenew.c \
lib/cdt/dtrestore.c \
lib/cdt/dtsize.c \
lib/cdt/dtstat.c \
lib/cdt/dtstrhash.c \
lib/cdt/dttree.c \
lib/cdt/dtview.c \
lib/cdt/dtwalk.c \
lib/cdt/dtclose.c \
lib/cdt/dtdisc.c \
-Ilib/gvc \
lib/gvc/gvjobs.c \
lib/gvc/gvlayout.c \
lib/gvc/gvloadimage.c \
lib/gvc/gvplugin.c \
lib/gvc/gvrender.c \
lib/gvc/gvtextlayout.c \
lib/gvc/gvtool_tred.c \
lib/gvc/gvusershape.c \
lib/gvc/gvc.c \
lib/gvc/gvconfig.c \
lib/gvc/gvcontext.c \
lib/gvc/gvdevice.c \
lib/gvc/gvevent.c \
-Ilib/common \
lib/common/xml.c \
lib/common/args.c \
lib/common/arrows.c \
lib/common/colxlate.c \
lib/common/ellipse.c \
lib/common/emit.c \
lib/common/geom.c \
lib/common/globals.c \
lib/common/htmllex.c \
lib/common/htmlparse.c \
lib/common/htmltable.c \
lib/common/input.c \
lib/common/intset.c \
lib/common/labels.c \
lib/common/memory.c \
lib/common/ns.c \
lib/common/output.c \
lib/common/pointset.c \
lib/common/postproc.c \
lib/common/psusershape.c \
lib/common/routespl.c \
lib/common/shapes.c \
lib/common/splines.c \
lib/common/taper.c \
lib/common/textspan.c \
lib/common/textspan_lut.c \
lib/common/timing.c \
lib/common/utils.c \
lib/xdot/xdot.c \
lib/label/xlabels.c \
lib/label/rectangle.c \
lib/label/split.q.c \
lib/label/index.c \
lib/label/node.c \
lib/pathplan/shortest.c \
lib/pathplan/util.c \
lib/pathplan/route.c \
lib/pathplan/solvers.c \
lib/dotgen/compound.c \
lib/dotgen/conc.c \
lib/dotgen/decomp.c \
lib/dotgen/dotinit.c \
lib/dotgen/dotsplines.c \
lib/dotgen/fastgr.c \
lib/dotgen/flat.c \
lib/dotgen/mincross.c \
lib/dotgen/position.c \
lib/dotgen/rank.c \
lib/dotgen/sameport.c \
lib/dotgen/acyclic.c \
lib/dotgen/aspect.c \
lib/dotgen/class1.c \
lib/dotgen/class2.c \
lib/dotgen/cluster.c \
plugin/dot_layout/gvplugin_dot_layout.c \
plugin/dot_layout/gvlayout_dot_layout.c \
lib/pack/pack.c \
lib/pack/ccomps.c \
plugin/core/gvrender_core_json.c \
plugin/core/gvrender_core_svg.c \
`#ORTHO` \
lib/ortho/trapezoid.c \
lib/ortho/fPQ.c \
lib/ortho/maze.c \
lib/ortho/ortho.c \
lib/ortho/partition.c \
lib/ortho/rawgraph.c \
lib/ortho/sgraph.c \
-I../extra/ \
../extra/typst_plugin.c \
../extra/Builtins.c \
../expat/expat/lib/xmltok_impl.c \
../expat/expat/lib/xmltok_ns.c \
../expat/expat/lib/xmlparse.c \
../expat/expat/lib/xmlrole.c \
../expat/expat/lib/xmltok.c \
-Ilib \
-Ilib/label \
-Ilib/pathplan \
-lm \
--target=wasm32-unknown-unknown \
-s ERROR_ON_UNDEFINED_SYMBOLS=0 \
-o dot.wasm \
-s STANDALONE_WASM=1 \
-s EXPORTED_FUNCTIONS=["_render"] \
--no-entry \
cd ..
wasm2wat ./graphviz/dot.wasm > Pre-patched-dot.wat
./Patch.sh
wat2wasm dot.wat > dot.wasm