aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/bootstrap.make3
-rw-r--r--build/configuration-rules.make18
-rw-r--r--build/configuration.make22
-rw-r--r--build/configure26
4 files changed, 69 insertions, 0 deletions
diff --git a/build/bootstrap.make b/build/bootstrap.make
index 26b7eeb..00d384d 100644
--- a/build/bootstrap.make
+++ b/build/bootstrap.make
@@ -16,6 +16,9 @@ ifeq ($(patsubst %build/bootstrap.make,,$(lastword $(MAKEFILE_LIST))),)
include $(build)/bootstrap.make
endif
+# Configuration
+#
+$(call include,$(scf_root)/configuration.make)
# Aliases
#
diff --git a/build/configuration-rules.make b/build/configuration-rules.make
new file mode 100644
index 0000000..a198679
--- /dev/null
+++ b/build/configuration-rules.make
@@ -0,0 +1,18 @@
+# file : build/configuration-rules.make
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
+# license : GNU GPL v2; see accompanying LICENSE file
+
+$(dcf_root)/configuration-dynamic.make: | $(dcf_root)/.
+ $(call message,,$(scf_root)/configure $@)
+
+ifndef %foreign%
+
+disfigure::
+ $(call message,rm $$1,rm -f $$1,$(dcf_root)/configuration-dynamic.make)
+
+endif
+
+ifeq ($(.DEFAULT_GOAL),$(dcf_root)/configuration-dynamic.make)
+.DEFAULT_GOAL :=
+endif
diff --git a/build/configuration.make b/build/configuration.make
new file mode 100644
index 0000000..0919150
--- /dev/null
+++ b/build/configuration.make
@@ -0,0 +1,22 @@
+# file : build/configuration.make
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
+# license : GNU GPL v2; see accompanying LICENSE file
+
+$(call include-once,$(scf_root)/configuration-rules.make,$(dcf_root))
+
+# Dynamic configuration.
+#
+libodb_threads :=
+
+$(call -include,$(dcf_root)/configuration-dynamic.make)
+
+ifdef libodb_threads
+
+$(out_root)/%: libodb_threads := $(libodb_threads)
+
+else
+
+.NOTPARALLEL:
+
+endif
diff --git a/build/configure b/build/configure
new file mode 100644
index 0000000..5816683
--- /dev/null
+++ b/build/configure
@@ -0,0 +1,26 @@
+#! /usr/bin/env bash
+
+# file : build/configure
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
+# license : GNU GPL v2; see accompanying LICENSE file
+
+# $1 out file
+#
+# bld_root - build root
+# project_name - project name
+#
+
+source $bld_root/dialog.bash
+
+$echo
+$echo "Please select the threading implementation:"
+$echo
+$echo "(1) POSIX"
+$echo "(2) Win32"
+$echo "(3) None"
+$echo
+
+threads=`read_option "posix win32 none" "posix"`
+
+echo "libodb_threads := $threads" >$1