mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 08:55:11 +01:00
Have build-example run 'out of the box'
This commit is contained in:
1 parent
fd43e777bc
commit
fce793776c
1 file changed
+7
-3
+7
-3
@@ -24,9 +24,13 @@ for f in example/*; do
|
|||||||
g++ -O3 $f/*.cc -o $f/a.out
|
g++ -O3 $f/*.cc -o $f/a.out
|
||||||
elif [ "$f" = "example/library" ]; then
|
elif [ "$f" = "example/library" ]; then
|
||||||
# example/library is unusual in that it uses separately compiled libraries
|
# example/library is unusual in that it uses separately compiled libraries
|
||||||
# (built by "wuffs genlib" above) instead of directly #include'ing Wuffs'
|
# (built by "wuffs genlib", e.g. by running build-all.sh) instead of
|
||||||
# .c files.
|
# directly #include'ing Wuffs' .c files.
|
||||||
gcc -O3 -static -I.. $f/*.c gen/lib/c/gcc-static/libwuffs.a -o $f/a.out
|
if [ -e gen/lib/c/gcc-static/libwuffs.a ]; then
|
||||||
|
gcc -O3 -static -I.. $f/*.c gen/lib/c/gcc-static/libwuffs.a -o $f/a.out
|
||||||
|
else
|
||||||
|
echo " Skipping example/library; run \"wuffs genlib\" first"
|
||||||
|
fi
|
||||||
elif [ -e $f/*.c ]; then
|
elif [ -e $f/*.c ]; then
|
||||||
gcc -O3 $f/*.c -o $f/a.out
|
gcc -O3 $f/*.c -o $f/a.out
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in new issue
Block a user