summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-12-18 11:25:31 -0500
committermidipix <writeonce@midipix.org>2016-12-18 11:51:58 -0500
commit4aca9c921bf9aea09d8e94436b63b7ac7b409c87 (patch)
tree0b39c6d06b351a2fa535090639b9269ba462b23e
parentbdbebd080887287e8703b0e63fe8de9712d3f6fb (diff)
downloadntcon-4aca9c921bf9aea09d8e94436b63b7ac7b409c87.tar.bz2
ntcon-4aca9c921bf9aea09d8e94436b63b7ac7b409c87.tar.xz
project: clbuild-bat: added link target (shared-lib/default-app) support.
-rwxr-xr-xproject/clbuild.sh10
-rw-r--r--project/extras.mk3
2 files changed, 10 insertions, 3 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' \
diff --git a/project/extras.mk b/project/extras.mk
index 3ae7508..1a41f19 100644
--- a/project/extras.mk
+++ b/project/extras.mk
@@ -22,4 +22,5 @@ clbuild-bat:
--project-dir=$(PROJECT_DIR) \
--sysroot=$(CFLAGS_SYSROOT) \
--version-header=ntcon_version.h \
- --version-macro=NTCON_GIT_VERSION
+ --version-macro=NTCON_GIT_VERSION \
+ --link-target=shared-lib