From 1d3a5e65856859b783c50f17f0c5a4293212c760 Mon Sep 17 00:00:00 2001 From: Alexander Gorshenev Date: Wed, 24 May 2017 14:32:44 +0300 Subject: [PATCH] Don't use explicit file namesuffixes in build.sh scripts. --- samples/concurrent/build.sh | 6 +++--- samples/csvparser/build.sh | 4 ++-- samples/gitchurn/build.sh | 4 ++-- samples/gtk/build.sh | 5 ++--- samples/libcurl/build.sh | 4 ++-- samples/nonBlockingEchoServer/build.sh | 4 ++-- samples/opengl/build.sh | 4 ++-- samples/socket/build.sh | 4 ++-- samples/tensorflow/build.sh | 4 ++-- samples/tetris/build.sh | 4 ++-- 10 files changed, 21 insertions(+), 22 deletions(-) diff --git a/samples/concurrent/build.sh b/samples/concurrent/build.sh index 05b8a6378e1..9bf3dbfc95b 100755 --- a/samples/concurrent/build.sh +++ b/samples/concurrent/build.sh @@ -25,6 +25,6 @@ var=CLANG_${TARGET} CLANG=${!var} $CLANG -std=c++11 -c $DIR/MessageChannel.cpp -o $DIR/MessageChannel.bc -emit-llvm || exit 1 -cinterop -def $DIR/MessageChannel.def -copt "-I$DIR" -target $TARGET -o $DIR/MessageChannel.kt.bc || exit 1 -konanc $DIR/Concurrent.kt -library $DIR/MessageChannel.kt.bc \ - -nativelibrary $DIR/MessageChannel.bc -o Concurrent.kexe || exit 1 +cinterop -def $DIR/MessageChannel.def -copt "-I$DIR" -target $TARGET -o $DIR/MessageChannel || exit 1 +konanc $DIR/Concurrent.kt -library $DIR/MessageChannel \ + -nativelibrary $DIR/MessageChannel.bc -o Concurrent || exit 1 diff --git a/samples/csvparser/build.sh b/samples/csvparser/build.sh index 5922d14c1da..7c9d550acab 100755 --- a/samples/csvparser/build.sh +++ b/samples/csvparser/build.sh @@ -18,5 +18,5 @@ LINKER_ARGS=${!var} var=COMPILER_ARGS_${TARGET} COMPILER_ARGS=${!var} # add -opt for an optimized build. -cinterop -def $DIR/stdio.def -copt "$CFLAGS" -target $TARGET -o stdio.kt.bc || exit 1 -konanc $COMPILER_ARGS -target $TARGET $DIR/CsvParser.kt -library stdio.kt.bc -o CsvParser.kexe || exit 1 +cinterop -def $DIR/stdio.def -copt "$CFLAGS" -target $TARGET -o stdio || exit 1 +konanc $COMPILER_ARGS -target $TARGET $DIR/CsvParser.kt -library stdio -o CsvParser || exit 1 diff --git a/samples/gitchurn/build.sh b/samples/gitchurn/build.sh index 4aebf21c0fd..d6c78a07e12 100755 --- a/samples/gitchurn/build.sh +++ b/samples/gitchurn/build.sh @@ -26,5 +26,5 @@ LINKER_ARGS=${!var} var=COMPILER_ARGS_${TARGET} COMPILER_ARGS=${!var} # add -opt for an optimized build. -cinterop -copt $CFLAGS -def $DIR/libgit2.def -target $TARGET -o libgit2.kt.bc || exit 1 -konanc -target $TARGET src -library libgit2.kt.bc -linkerArgs "$LINKER_ARGS" -o GitChurn.kexe || exit 1 +cinterop -copt $CFLAGS -def $DIR/libgit2.def -target $TARGET -o libgit2 || exit 1 +konanc -target $TARGET src -library libgit2 -linkerArgs "$LINKER_ARGS" -o GitChurn || exit 1 diff --git a/samples/gtk/build.sh b/samples/gtk/build.sh index 4113fc961c1..492bcf1d7d0 100755 --- a/samples/gtk/build.sh +++ b/samples/gtk/build.sh @@ -29,8 +29,7 @@ if [ ! -f $DIR/gtk3.bc ]; then cinterop -J-Xmx8g -copt $IPREFIX/atk-1.0 -copt $IPREFIX/gdk-pixbuf-2.0 -copt $IPREFIX/cairo -copt $IPREFIX/pango-1.0 \ -copt -I/opt/local/lib/glib-2.0/include -copt -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -copt -I/usr/local/lib/glib-2.0/include \ -copt $IPREFIX/gtk-3.0 -copt $IPREFIX/glib-2.0 -def $DIR/gtk3.def \ - -target $TARGET -o $DIR/gtk3.bc || exit 1 + -target $TARGET -o $DIR/gtk3 || exit 1 fi -konanc -target $TARGET $DIR/src -library $DIR/gtk3.bc -linkerArgs "$LINKER_ARGS" -o $DIR/Gtk3Demo.kexe || exit 1 - +konanc -target $TARGET $DIR/src -library $DIR/gtk3 -linkerArgs "$LINKER_ARGS" -o $DIR/Gtk3Demo || exit 1 diff --git a/samples/libcurl/build.sh b/samples/libcurl/build.sh index acd5a115dc3..d3a2e00d2e7 100755 --- a/samples/libcurl/build.sh +++ b/samples/libcurl/build.sh @@ -23,5 +23,5 @@ LINKER_ARGS=${!var} var=COMPILER_ARGS_${TARGET} COMPILER_ARGS=${!var} # add -opt for an optimized build. -cinterop -copt "$CFLAGS" -copt -I. -copt -I/usr/include -def $DIR/libcurl.def -target $TARGET -o libcurl.bc || exit 1 -konanc -target $TARGET src -library libcurl.bc -linkerArgs "$LINKER_ARGS" -o Curl.kexe || exit 1 +cinterop -copt "$CFLAGS" -copt -I. -copt -I/usr/include -def $DIR/libcurl.def -target $TARGET -o libcurl || exit 1 +konanc -target $TARGET src -library libcurl -linkerArgs "$LINKER_ARGS" -o Curl || exit 1 diff --git a/samples/nonBlockingEchoServer/build.sh b/samples/nonBlockingEchoServer/build.sh index 4962195956d..bb5f0e1052b 100755 --- a/samples/nonBlockingEchoServer/build.sh +++ b/samples/nonBlockingEchoServer/build.sh @@ -18,5 +18,5 @@ LINKER_ARGS=${!var} var=COMPILER_ARGS_${TARGET} COMPILER_ARGS=${!var} # add -opt for an optimized build. -cinterop -def $DIR/sockets.def -copt "$CFLAGS" -target $TARGET -o sockets.kt.bc || exit 1 -konanc $COMPILER_ARGS -target $TARGET $DIR/EchoServer.kt -library sockets.kt.bc -o EchoServer.kexe || exit 1 +cinterop -def $DIR/sockets.def -copt "$CFLAGS" -target $TARGET -o sockets || exit 1 +konanc $COMPILER_ARGS -target $TARGET $DIR/EchoServer.kt -library sockets -o EchoServer || exit 1 diff --git a/samples/opengl/build.sh b/samples/opengl/build.sh index 5ce3238908d..bfa14a16f5a 100755 --- a/samples/opengl/build.sh +++ b/samples/opengl/build.sh @@ -21,5 +21,5 @@ LINKER_ARGS=${!var} var=COMPILER_ARGS_${TARGET} COMPILER_ARGS=${!var} # add -opt for an optimized build. -cinterop -def $DIR/opengl.def -target $TARGET -o opengl.kt.bc || exit 1 -konanc -target $TARGET $DIR/OpenGlTeapot.kt -library opengl.kt.bc -linkerArgs "$LINKER_ARGS" -o OpenGlTeapot.kexe || exit 1 +cinterop -def $DIR/opengl.def -target $TARGET -o opengl || exit 1 +konanc -target $TARGET $DIR/OpenGlTeapot.kt -library opengl -linkerArgs "$LINKER_ARGS" -o OpenGlTeapot || exit 1 diff --git a/samples/socket/build.sh b/samples/socket/build.sh index 4962195956d..bb5f0e1052b 100755 --- a/samples/socket/build.sh +++ b/samples/socket/build.sh @@ -18,5 +18,5 @@ LINKER_ARGS=${!var} var=COMPILER_ARGS_${TARGET} COMPILER_ARGS=${!var} # add -opt for an optimized build. -cinterop -def $DIR/sockets.def -copt "$CFLAGS" -target $TARGET -o sockets.kt.bc || exit 1 -konanc $COMPILER_ARGS -target $TARGET $DIR/EchoServer.kt -library sockets.kt.bc -o EchoServer.kexe || exit 1 +cinterop -def $DIR/sockets.def -copt "$CFLAGS" -target $TARGET -o sockets || exit 1 +konanc $COMPILER_ARGS -target $TARGET $DIR/EchoServer.kt -library sockets -o EchoServer || exit 1 diff --git a/samples/tensorflow/build.sh b/samples/tensorflow/build.sh index fcf0a41171e..334545d25a2 100755 --- a/samples/tensorflow/build.sh +++ b/samples/tensorflow/build.sh @@ -31,8 +31,8 @@ if [ ! -d $TF_TARGET_DIRECTORY/include/tensorflow ]; then tar -C $TF_TARGET_DIRECTORY -xz fi -cinterop -def $DIR/tensorflow.def -copt "$CFLAGS" -target $TARGET -o tensorflow.kt.bc || exit 1 -konanc $COMPILER_ARGS -target $TARGET $DIR/HelloTensorflow.kt -library tensorflow.kt.bc -o HelloTensorflow.kexe \ +cinterop -def $DIR/tensorflow.def -copt "$CFLAGS" -target $TARGET -o tensorflow || exit 1 +konanc $COMPILER_ARGS -target $TARGET $DIR/HelloTensorflow.kt -library tensorflow -o HelloTensorflow \ -linkerArgs "-L$TF_TARGET_DIRECTORY/lib -ltensorflow" || exit 1 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." diff --git a/samples/tetris/build.sh b/samples/tetris/build.sh index cacc31da7e9..e94d1d27874 100755 --- a/samples/tetris/build.sh +++ b/samples/tetris/build.sh @@ -42,6 +42,6 @@ LINKER_ARGS=${!var} var=COMPILER_ARGS_${TARGET} COMPILER_ARGS=${!var} # add -opt for an optimized build. -cinterop -def $DIR/sdl.def -copt "$CFLAGS" -target $TARGET -o sdl.kt.bc || exit 1 -konanc $COMPILER_ARGS -target $TARGET $DIR/Tetris.kt -library sdl.kt.bc -linkerArgs "$LINKER_ARGS" -o Tetris.kexe || exit 1 +cinterop -def $DIR/sdl.def -copt "$CFLAGS" -target $TARGET -o sdl || exit 1 +konanc $COMPILER_ARGS -target $TARGET $DIR/Tetris.kt -library sdl -linkerArgs "$LINKER_ARGS" -o Tetris || exit 1 #strip Tetris.kexe