summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-01-05 05:58:58 -0500
committermidipix <writeonce@midipix.org>2019-01-09 22:43:13 -0500
commit5f905a8bc922a9b9fc7ba35c0f996c87211cdbbc (patch)
tree73901aae8ef2fa0e1ebb38a5c560e96f5473d5de
parentdf49777b353e30e419c270a8aadcbfe79841d131 (diff)
downloadmmglue-5f905a8bc922a9b9fc7ba35c0f996c87211cdbbc.tar.bz2
mmglue-5f905a8bc922a9b9fc7ba35c0f996c87211cdbbc.tar.xz
project: added a custom config step, added cfgdefs_set_arch().
-rw-r--r--config.project2
-rw-r--r--project/config/cfgdefs.sh46
-rw-r--r--project/config/cfgdefs.usage0
3 files changed, 47 insertions, 1 deletions
diff --git a/config.project b/config.project
index e9a6c6c..051f38d 100644
--- a/config.project
+++ b/config.project
@@ -12,7 +12,7 @@ mb_disable_static=yes
mb_disable_shared=yes
# custom config step
-mb_use_custom_cfgdefs=no
+mb_use_custom_cfgdefs=yes
mb_use_custom_cfgtest=no
# pkgconfig
diff --git a/project/config/cfgdefs.sh b/project/config/cfgdefs.sh
new file mode 100644
index 0000000..eb04350
--- /dev/null
+++ b/project/config/cfgdefs.sh
@@ -0,0 +1,46 @@
+for arg ; do
+ case "$arg" in
+ *)
+ error_msg ${arg#}: "unsupported config argument."
+ exit 2
+ esac
+done
+
+cfgdefs_set_arch()
+{
+ if [ -n "$mb_arch" ]; then
+ return 0
+ fi
+
+ case "$mb_cchost" in
+ *-*-*-* )
+ mb_arch=${mb_cchost%-*-*-*}
+ ;;
+ *-*-* )
+ mb_arch=${mb_cchost%-*-*}
+ ;;
+ *-* )
+ mb_arch=${mb_cchost%-*-*-*}
+ ;;
+ * )
+ mb_arch='unknown'
+ ;;
+ esac
+
+ if [ "$mb_os" = 'midipix' ]; then
+ case "$mb_arch" in
+ x86_64 )
+ mb_arch='nt64'
+ ;;
+ i[3-6]86 )
+ mb_arch='nt32'
+ ;;
+ esac
+ fi
+}
+
+# arch
+cfgdefs_set_arch
+
+# all done
+return 0
diff --git a/project/config/cfgdefs.usage b/project/config/cfgdefs.usage
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/project/config/cfgdefs.usage