summaryrefslogtreecommitdiffhomepage
path: root/project/clbuild.sh
diff options
context:
space:
mode:
Diffstat (limited to 'project/clbuild.sh')
-rwxr-xr-xproject/clbuild.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/project/clbuild.sh b/project/clbuild.sh
index 1e6a229..3af367f 100755
--- a/project/clbuild.sh
+++ b/project/clbuild.sh
@@ -13,6 +13,7 @@ mb_project_dir=
mb_sysroot=
version_header=
version_macro=
+link_target=
# one: args
for arg ; do
@@ -40,6 +41,9 @@ for arg ; do
--version-macro=*)
version_macro='-D'${arg#*=}'=\\\"unknown\\\"'
;;
+ --link-target=*)
+ link_target=${arg#*=}
+ ;;
*)
error_msg ${arg#}: "unsupported config argument."
exit 2
@@ -171,11 +175,13 @@ echo '@echo clbuild: successfully created: static archive.'
echo '@echo.'
echo
-# eight: link shared library
-make LDFLAGS_IMPLIB= LDFLAGS_SONAME= shared-lib \
+# eight: link
+make LDFLAGS_IMPLIB= LDFLAGS_SONAME= $link_target \
| grep -v 'make\[1\]:' \
+ | grep -v 'rm -f app\.tag' \
| sed \
-e 's@'"$mb_cc"' -shared @link /dll /nologo @' \
+ -e 's@'"$mb_cc"' @link /nologo @' \
-e 's@-o @/out:@g' \
-e 's@ -L@ /libpath:@g' \
-e 's,-static -l\([^ ]\+\), %sysroot%/lib/lib\1.a,g' \