Minor build script tweaks
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ for SAMPLE_DIR in *; do
|
|||||||
date
|
date
|
||||||
echo "Building a sample: $SAMPLE_DIR."
|
echo "Building a sample: $SAMPLE_DIR."
|
||||||
if ! isExcluded "$SAMPLE_DIR"; then
|
if ! isExcluded "$SAMPLE_DIR"; then
|
||||||
(cd "$SAMPLE_DIR" && . build.sh && cd $OLD_PWD) || (echo "Cannot build a sample: $SAMPLE_DIR. See log for details." && exit 1)
|
bash "$SAMPLE_DIR/$BUILD_SCRIPT" || (echo "Cannot build a sample: $SAMPLE_DIR. See log for details." && exit 1)
|
||||||
else
|
else
|
||||||
echo "The sample excluded."
|
echo "The sample excluded."
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
|
||||||
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
|
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||||
PATH=$DIR/../../dist/bin:$DIR/../../bin:$PATH
|
PATH=$DIR/../../dist/bin:$DIR/../../bin:$PATH
|
||||||
|
|
||||||
|
|||||||
@@ -27,4 +27,4 @@ cinterop -def $DIR/src/main/c_interop/stdio.def -compilerOpts "$CFLAGS" -target
|
|||||||
konanc $COMPILER_ARGS -target $TARGET $DIR/src/main/kotlin/CsvParser.kt -library $DIR/build/c_interop/stdio \
|
konanc $COMPILER_ARGS -target $TARGET $DIR/src/main/kotlin/CsvParser.kt -library $DIR/build/c_interop/stdio \
|
||||||
-o $DIR/build/bin/CsvParser || exit 1
|
-o $DIR/build/bin/CsvParser || exit 1
|
||||||
|
|
||||||
echo "Artifact path is ./build/bin/CsvParser.kexe"
|
echo "Artifact path is $DIR/build/bin/CsvParser.kexe"
|
||||||
|
|||||||
@@ -32,4 +32,4 @@ cinterop -compilerOpts $CFLAGS -def $DIR/src/main/c_interop/libgit2.def -target
|
|||||||
konanc -target $TARGET $DIR/src/main/kotlin -library $DIR/build/c_interop/libgit2 -linkerOpts "$LINKER_ARGS" \
|
konanc -target $TARGET $DIR/src/main/kotlin -library $DIR/build/c_interop/libgit2 -linkerOpts "$LINKER_ARGS" \
|
||||||
-o $DIR/build/bin/GitChurn || exit 1
|
-o $DIR/build/bin/GitChurn || exit 1
|
||||||
|
|
||||||
echo "Artifact path is ./build/bin/GitChurn.kexe"
|
echo "Artifact path is $DIR/build/bin/GitChurn.kexe"
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ cinterop -J-Xmx8g -copt $IPREFIX/atk-1.0 -compilerOpts $IPREFIX/gdk-pixbuf-2.0 -
|
|||||||
-copt $IPREFIX/gtk-3.0 -copt $IPREFIX/glib-2.0 -def $DIR/src/main/c_interop/gtk3.def \
|
-copt $IPREFIX/gtk-3.0 -copt $IPREFIX/glib-2.0 -def $DIR/src/main/c_interop/gtk3.def \
|
||||||
-target $TARGET -o $DIR/build/c_interop/gtk3 || exit 1
|
-target $TARGET -o $DIR/build/c_interop/gtk3 || exit 1
|
||||||
|
|
||||||
konanc -target $TARGET $DIR/src/main/kotlin -library $DIR/build/c_interop/gtk3.bc -linkerOpts "$LINKER_ARGS" \
|
konanc -target $TARGET $DIR/src/main/kotlin -library $DIR/build/c_interop/gtk3 -linkerOpts "$LINKER_ARGS" \
|
||||||
-o $DIR/build/bin/Gtk3Demo || exit 1
|
-o $DIR/build/bin/Gtk3Demo || exit 1
|
||||||
|
|
||||||
echo "Artifact path is ./build/bin/Gtk3Demo.kexe"
|
echo "Artifact path is $DIR/build/bin/Gtk3Demo.kexe"
|
||||||
|
|||||||
@@ -32,4 +32,4 @@ cinterop -compilerOpts "$CFLAGS" -compilerOpts -I$DIR -compilerOpts -I/usr/inclu
|
|||||||
konanc -target $TARGET $DIR/src/main/kotlin -library $DIR/build/c_interop/libcurl -linkerOpts "$LINKER_ARGS" \
|
konanc -target $TARGET $DIR/src/main/kotlin -library $DIR/build/c_interop/libcurl -linkerOpts "$LINKER_ARGS" \
|
||||||
-o $DIR/build/bin/Curl || exit 1
|
-o $DIR/build/bin/Curl || exit 1
|
||||||
|
|
||||||
echo "Artifact path is ./build/bin/Curl.kexe"
|
echo "Artifact path is $DIR/build/bin/Curl.kexe"
|
||||||
|
|||||||
@@ -27,4 +27,4 @@ cinterop -def $DIR/src/main/c_interop/sockets.def -copt "$CFLAGS" -target $TARGE
|
|||||||
konanc $COMPILER_ARGS -target $TARGET $DIR/src/main/kotlin/EchoServer.kt \
|
konanc $COMPILER_ARGS -target $TARGET $DIR/src/main/kotlin/EchoServer.kt \
|
||||||
-library $DIR/build/c_interop/sockets -o $DIR/build/bin/EchoServer || exit 1
|
-library $DIR/build/c_interop/sockets -o $DIR/build/bin/EchoServer || exit 1
|
||||||
|
|
||||||
echo "Artifact path is ./build/bin/EchoServer.kexe"
|
echo "Artifact path is $DIR/build/bin/EchoServer.kexe"
|
||||||
|
|||||||
@@ -30,4 +30,4 @@ cinterop -def $DIR/src/main/c_interop/opengl.def -target $TARGET \
|
|||||||
konanc -target $TARGET $DIR/src/main/kotlin/OpenGlTeapot.kt -library $DIR/build/c_interop/opengl \
|
konanc -target $TARGET $DIR/src/main/kotlin/OpenGlTeapot.kt -library $DIR/build/c_interop/opengl \
|
||||||
-linkerOpts "$LINKER_ARGS" -o $DIR/build/bin/OpenGlTeapot || exit 1
|
-linkerOpts "$LINKER_ARGS" -o $DIR/build/bin/OpenGlTeapot || exit 1
|
||||||
|
|
||||||
echo "Artifact path is ./build/bin/OpenGlTeapot.kexe"
|
echo "Artifact path is $DIR/build/bin/OpenGlTeapot.kexe"
|
||||||
|
|||||||
@@ -28,4 +28,4 @@ konanc $COMPILER_ARGS -target $TARGET $DIR/src/main/kotlin/EchoServer.kt \
|
|||||||
-library $DIR/build/c_interop/sockets \
|
-library $DIR/build/c_interop/sockets \
|
||||||
-o $DIR/build/bin/EchoServer || exit 1
|
-o $DIR/build/bin/EchoServer || exit 1
|
||||||
|
|
||||||
echo "Artifact path is ./build/bin/EchoServer.kexe"
|
echo "Artifact path is $DIR/build/bin/EchoServer.kexe"
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
./downloadTensorflow.sh
|
|
||||||
|
|
||||||
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
|
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||||
PATH=$DIR/../../dist/bin:$DIR/../../bin:$PATH
|
PATH=$DIR/../../dist/bin:$DIR/../../bin:$PATH
|
||||||
|
|
||||||
|
$DIR/downloadTensorflow.sh
|
||||||
|
|
||||||
TF_TARGET_DIRECTORY="$HOME/.konan/third-party/tensorflow"
|
TF_TARGET_DIRECTORY="$HOME/.konan/third-party/tensorflow"
|
||||||
TF_TYPE="cpu" # Change to "gpu" for GPU support
|
TF_TYPE="cpu" # Change to "gpu" for GPU support
|
||||||
|
|
||||||
@@ -39,4 +39,4 @@ konanc $COMPILER_ARGS -target $TARGET $DIR/src/main/kotlin/HelloTensorflow.kt \
|
|||||||
|
|
||||||
echo "Note: You may need to specify LD_LIBRARY_PATH or DYLD_LIBRARY_PATH env variables to $TF_TARGET_DIRECTORY/lib if the TensorFlow dynamic library cannot be found."
|
echo "Note: You may need to specify LD_LIBRARY_PATH or DYLD_LIBRARY_PATH env variables to $TF_TARGET_DIRECTORY/lib if the TensorFlow dynamic library cannot be found."
|
||||||
|
|
||||||
echo "Artifact path is ./build/bin/HelloTensorflow.kexe"
|
echo "Artifact path is $DIR/build/bin/HelloTensorflow.kexe"
|
||||||
|
|||||||
@@ -53,4 +53,4 @@ konanc $COMPILER_ARGS -target $TARGET $DIR/src/main/kotlin/Tetris.kt \
|
|||||||
|
|
||||||
cp -R $DIR/src/main/resources/ $DIR/build/bin/
|
cp -R $DIR/src/main/resources/ $DIR/build/bin/
|
||||||
|
|
||||||
echo "Artifact path is ./build/bin/Tetris.kexe"
|
echo "Artifact path is $DIR/build/bin/Tetris.kexe"
|
||||||
|
|||||||
Reference in New Issue
Block a user