summaryrefslogtreecommitdiff
path: root/build-0.3/c
diff options
context:
space:
mode:
Diffstat (limited to 'build-0.3/c')
-rw-r--r--build-0.3/c/c-d.make3
-rw-r--r--build-0.3/c/c-o.make3
-rw-r--r--build-0.3/c/configuration-rules.make5
-rw-r--r--build-0.3/c/configuration-static.make3
-rw-r--r--build-0.3/c/configuration.make13
-rwxr-xr-xbuild-0.3/c/configure3
-rw-r--r--build-0.3/c/cpp-options.make3
-rw-r--r--build-0.3/c/generic/c-d.make3
-rw-r--r--build-0.3/c/generic/c-o.make3
-rw-r--r--build-0.3/c/generic/configuration-rules.make5
-rw-r--r--build-0.3/c/generic/configuration-sl-rules.make5
-rw-r--r--build-0.3/c/generic/configuration-sl.make3
-rw-r--r--build-0.3/c/generic/configuration.make3
-rwxr-xr-xbuild-0.3/c/generic/configure3
-rwxr-xr-xbuild-0.3/c/generic/configure-sl3
-rw-r--r--build-0.3/c/generic/o-e.make3
-rw-r--r--build-0.3/c/generic/o-l.make3
-rw-r--r--build-0.3/c/gnu/c-d.make3
-rw-r--r--build-0.3/c/gnu/c-o.make3
-rw-r--r--build-0.3/c/gnu/configuration-rules.make8
-rw-r--r--build-0.3/c/gnu/configuration-static.make3
-rw-r--r--build-0.3/c/gnu/configuration.make3
-rwxr-xr-xbuild-0.3/c/gnu/configure40
-rwxr-xr-xbuild-0.3/c/gnu/dep3
-rw-r--r--build-0.3/c/gnu/o-e.make3
-rw-r--r--build-0.3/c/gnu/o-l.make25
-rw-r--r--build-0.3/c/intel/c-d.make3
-rw-r--r--build-0.3/c/intel/c-o.make3
-rw-r--r--build-0.3/c/intel/configuration-rules.make8
-rw-r--r--build-0.3/c/intel/configuration-static.make3
-rw-r--r--build-0.3/c/intel/configuration.make3
-rwxr-xr-xbuild-0.3/c/intel/configure11
-rwxr-xr-xbuild-0.3/c/intel/dep3
-rw-r--r--build-0.3/c/intel/o-e.make3
-rw-r--r--build-0.3/c/intel/o-l.make3
-rw-r--r--build-0.3/c/o-e.make3
-rw-r--r--build-0.3/c/o-l.make3
37 files changed, 114 insertions, 90 deletions
diff --git a/build-0.3/c/c-d.make b/build-0.3/c/c-d.make
index 446d643..fdba684 100644
--- a/build-0.3/c/c-d.make
+++ b/build-0.3/c/c-d.make
@@ -1,6 +1,5 @@
# file : build/c/c-d.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include,$(bld_root)/c/configuration.make)
diff --git a/build-0.3/c/c-o.make b/build-0.3/c/c-o.make
index 0e6a532..d389fdd 100644
--- a/build-0.3/c/c-o.make
+++ b/build-0.3/c/c-o.make
@@ -1,6 +1,5 @@
# file : build/c/c-o.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include,$(bld_root)/c/configuration.make)
diff --git a/build-0.3/c/configuration-rules.make b/build-0.3/c/configuration-rules.make
index 836fa1d..5663065 100644
--- a/build-0.3/c/configuration-rules.make
+++ b/build-0.3/c/configuration-rules.make
@@ -1,6 +1,5 @@
# file : build/c/configuration-rules.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(dcf_root)/c/configuration-dynamic.make: | $(dcf_root)/c/.
@@ -12,7 +11,7 @@ $(dcf_root)/c/configuration-dynamic.make: | $(dcf_root)/c/.
ifndef %foreign%
-disfigure::
+$(dcf_root)/.disfigure::
$(call message,rm $(dcf_root)/c/configuration-dynamic.make,\
rm -f $(dcf_root)/c/configuration-dynamic.make)
diff --git a/build-0.3/c/configuration-static.make b/build-0.3/c/configuration-static.make
index d95ebfa..c226a36 100644
--- a/build-0.3/c/configuration-static.make
+++ b/build-0.3/c/configuration-static.make
@@ -1,6 +1,5 @@
# file : build/c/configuration-static.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
c_h_suffix := h
diff --git a/build-0.3/c/configuration.make b/build-0.3/c/configuration.make
index 97da2f0..e47731c 100644
--- a/build-0.3/c/configuration.make
+++ b/build-0.3/c/configuration.make
@@ -1,6 +1,5 @@
# file : build/c/configuration.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include-once,$(bld_root)/c/configuration-rules.make,$(dcf_root))
@@ -31,11 +30,11 @@ $(out_root)/%: c_optimize := $(c_optimize)
$(out_root)/%: c_debug := $(c_debug)
$(out_root)/%: c_rpath := $(c_rpath)
-$(out_root)/%: c_pp_extra_options := $(c_pp_extra_options)
-$(out_root)/%: c_extra_options := $(c_extra_options)
-$(out_root)/%: c_ld_extra_options := $(c_ld_extra_options)
-$(out_root)/%: c_extra_libs := $(c_extra_libs)
-$(out_root)/%: c_extra_lib_paths := $(c_extra_lib_paths)
+$(out_root)/%: c_pp_extra_options := $(c_pp_extra_options) $(c_pp_cmd_options)
+$(out_root)/%: c_extra_options := $(c_extra_options) $(c_cmd_options)
+$(out_root)/%: c_ld_extra_options := $(c_ld_extra_options) $(c_ld_cmd_options)
+$(out_root)/%: c_extra_libs := $(c_extra_libs) $(c_cmd_libs)
+$(out_root)/%: c_extra_lib_paths := $(c_extra_lib_paths) $(c_cmd_lib_paths)
else
diff --git a/build-0.3/c/configure b/build-0.3/c/configure
index 6281fa2..a294a0c 100755
--- a/build-0.3/c/configure
+++ b/build-0.3/c/configure
@@ -1,8 +1,7 @@
#! /usr/bin/env bash
# file : build/c/configure
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
# $1 out file
diff --git a/build-0.3/c/cpp-options.make b/build-0.3/c/cpp-options.make
index 8956d41..d6246a3 100644
--- a/build-0.3/c/cpp-options.make
+++ b/build-0.3/c/cpp-options.make
@@ -1,6 +1,5 @@
# file : build/c/cpp-options.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(out_base)/%.cpp-options: c-cpp-options-expand-impl = $(if $1,cat $1 >>$2)
diff --git a/build-0.3/c/generic/c-d.make b/build-0.3/c/generic/c-d.make
index 8f77d50..8933d7d 100644
--- a/build-0.3/c/generic/c-d.make
+++ b/build-0.3/c/generic/c-d.make
@@ -1,6 +1,5 @@
# file : build/c/generic/c-o.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include,$(bld_root)/c/generic/configuration.make)
diff --git a/build-0.3/c/generic/c-o.make b/build-0.3/c/generic/c-o.make
index 7b6e622..d340837 100644
--- a/build-0.3/c/generic/c-o.make
+++ b/build-0.3/c/generic/c-o.make
@@ -1,6 +1,5 @@
# file : build/c/generic/c-o.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include-once,$(bld_root)/c/cpp-options.make,$(out_base))
diff --git a/build-0.3/c/generic/configuration-rules.make b/build-0.3/c/generic/configuration-rules.make
index 5fa9117..05e7a42 100644
--- a/build-0.3/c/generic/configuration-rules.make
+++ b/build-0.3/c/generic/configuration-rules.make
@@ -1,6 +1,5 @@
# file : build/c/generic/configuration-rules.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(dcf_root)/c/generic/configuration-dynamic.make: | $(dcf_root)/c/generic/.
@@ -8,7 +7,7 @@ $(dcf_root)/c/generic/configuration-dynamic.make: | $(dcf_root)/c/generic/.
ifndef %foreign%
-disfigure::
+$(dcf_root)/.disfigure::
$(call message,rm $(dcf_root)/c/generic/configuration-dynamic.make,\
rm -f $(dcf_root)/c/generic/configuration-dynamic.make)
diff --git a/build-0.3/c/generic/configuration-sl-rules.make b/build-0.3/c/generic/configuration-sl-rules.make
index e685be6..147cb1d 100644
--- a/build-0.3/c/generic/configuration-sl-rules.make
+++ b/build-0.3/c/generic/configuration-sl-rules.make
@@ -1,6 +1,5 @@
# file : build/c/generic/configuration-sl-rules.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(dcf_root)/c/generic/configuration-sl-dynamic.make: | $(dcf_root)/c/generic/.
@@ -8,7 +7,7 @@ $(dcf_root)/c/generic/configuration-sl-dynamic.make: | $(dcf_root)/c/generic/.
ifndef %foreign%
-disfigure::
+$(dcf_root)/.disfigure::
$(call message,rm $(dcf_root)/c/generic/configuration-sl-dynamic.make,\
rm -f $(dcf_root)/c/generic/configuration-sl-dynamic.make)
diff --git a/build-0.3/c/generic/configuration-sl.make b/build-0.3/c/generic/configuration-sl.make
index b3a18a8..136186f 100644
--- a/build-0.3/c/generic/configuration-sl.make
+++ b/build-0.3/c/generic/configuration-sl.make
@@ -1,6 +1,5 @@
# file : build/c/generic/configuration-sl.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include-once,$(bld_root)/c/generic/configuration-sl-rules.make,$(dcf_root))
diff --git a/build-0.3/c/generic/configuration.make b/build-0.3/c/generic/configuration.make
index 95e79f8..1881c5c 100644
--- a/build-0.3/c/generic/configuration.make
+++ b/build-0.3/c/generic/configuration.make
@@ -1,6 +1,5 @@
# file : build/c/generic/configuration.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include-once,$(bld_root)/c/generic/configuration-rules.make,$(dcf_root))
diff --git a/build-0.3/c/generic/configure b/build-0.3/c/generic/configure
index 76be8df..dae8d72 100755
--- a/build-0.3/c/generic/configure
+++ b/build-0.3/c/generic/configure
@@ -1,8 +1,7 @@
#! /usr/bin/env bash
# file : build/c/generic/configure
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
# $1 out file
diff --git a/build-0.3/c/generic/configure-sl b/build-0.3/c/generic/configure-sl
index 5500e8b..10064cb 100755
--- a/build-0.3/c/generic/configure-sl
+++ b/build-0.3/c/generic/configure-sl
@@ -1,8 +1,7 @@
#! /usr/bin/env bash
# file : build/c/generic/configure-sl
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
# $1 out file
diff --git a/build-0.3/c/generic/o-e.make b/build-0.3/c/generic/o-e.make
index 4a88a0f..a607239 100644
--- a/build-0.3/c/generic/o-e.make
+++ b/build-0.3/c/generic/o-e.make
@@ -1,6 +1,5 @@
# file : build/c/generic/o-e.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include,$(bld_root)/c/generic/configuration.make)
diff --git a/build-0.3/c/generic/o-l.make b/build-0.3/c/generic/o-l.make
index cee21af..bdae9fc 100644
--- a/build-0.3/c/generic/o-l.make
+++ b/build-0.3/c/generic/o-l.make
@@ -1,6 +1,5 @@
# file : build/c/generic/o-l.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include,$(bld_root)/c/generic/configuration.make)
diff --git a/build-0.3/c/gnu/c-d.make b/build-0.3/c/gnu/c-d.make
index d7e6c57..bc7411f 100644
--- a/build-0.3/c/gnu/c-d.make
+++ b/build-0.3/c/gnu/c-d.make
@@ -1,6 +1,5 @@
# file : build/c/gnu/c-o.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include-once,$(bld_root)/c/cpp-options.make,$(out_base))
diff --git a/build-0.3/c/gnu/c-o.make b/build-0.3/c/gnu/c-o.make
index 9f5ecdd..46eb1da 100644
--- a/build-0.3/c/gnu/c-o.make
+++ b/build-0.3/c/gnu/c-o.make
@@ -1,6 +1,5 @@
# file : build/c/gnu/c-o.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include-once,$(bld_root)/c/cpp-options.make,$(out_base))
diff --git a/build-0.3/c/gnu/configuration-rules.make b/build-0.3/c/gnu/configuration-rules.make
index 478db2d..cb25dfe 100644
--- a/build-0.3/c/gnu/configuration-rules.make
+++ b/build-0.3/c/gnu/configuration-rules.make
@@ -1,14 +1,14 @@
# file : build/c/gnu/configuration-rules.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(dcf_root)/c/gnu/configuration-dynamic.make: | $(dcf_root)/c/gnu/.
- $(call message,,$(bld_root)/c/gnu/configure $@ $(c_optimize))
+ $(call message,,$(bld_root)/c/gnu/configure $@ $(c_optimize) \
+"$(c_extra_options)" "$(c_ld_extra_options)")
ifndef %foreign%
-disfigure::
+$(dcf_root)/.disfigure::
$(call message,rm $(dcf_root)/c/gnu/configuration-dynamic.make,\
rm -f $(dcf_root)/c/gnu/configuration-dynamic.make)
diff --git a/build-0.3/c/gnu/configuration-static.make b/build-0.3/c/gnu/configuration-static.make
index eb00863..e9be2b9 100644
--- a/build-0.3/c/gnu/configuration-static.make
+++ b/build-0.3/c/gnu/configuration-static.make
@@ -1,4 +1,3 @@
# file : build/c/gnu/configuration-static.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
diff --git a/build-0.3/c/gnu/configuration.make b/build-0.3/c/gnu/configuration.make
index c2e4a32..32aaf97 100644
--- a/build-0.3/c/gnu/configuration.make
+++ b/build-0.3/c/gnu/configuration.make
@@ -1,6 +1,5 @@
# file : build/c/gnu/configuration.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include-once,$(bld_root)/c/gnu/configuration-rules.make,$(dcf_root))
diff --git a/build-0.3/c/gnu/configure b/build-0.3/c/gnu/configure
index 5695ba4..713f091 100755
--- a/build-0.3/c/gnu/configure
+++ b/build-0.3/c/gnu/configure
@@ -1,12 +1,13 @@
#! /usr/bin/env bash
# file : build/c/gnu/configure
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
# $1 out file
# $2 optimize (y/n)
+# $3 c_extra_options
+# $4 c_ld_extra_options
#
# bld_root - build root
# project_name - project name
@@ -27,8 +28,32 @@ $echo "'/usr/local/bin/gcc' or 'distcc gcc'."
$echo
c_gnu=`read_path --command gcc`
-c_gnu_libraries=`$c_gnu -print-search-dirs | sed -e 's/libraries: =//p' -e d`
+# Pass c_extra_options and c_ld_extra_options since those can affect the
+# search paths (e.g., -m32) and target.
+#
+c_gnu_libraries=`$c_gnu $3 $4 -print-search-dirs | sed -e 's/libraries: =//p' -e d`
+
+c_gnu_target=`$c_gnu $3 $4 -dumpmachine`
+c_gnu_target=`$bld_root/system/config.sub "$c_gnu_target"`
+
+if [ $? != 0 ]; then
+ $echo "unable to canonicalize target system '$c_gnu_target'"
+ exit 1
+fi
+
+c_gnu_target_cpu=`echo $c_gnu_target | cut -f 1 -d -`
+c_gnu_target_mf=`echo $c_gnu_target | cut -f 2 -d -`
+c_gnu_target_kernel=`echo $c_gnu_target | cut -f 3 -d -`
+c_gnu_target_os=`echo $c_gnu_target | cut -f 4 -d -`
+
+if [ -z "$c_gnu_target_os" ]; then
+
+ # Old format: cpu-mf-os
+ #
+ c_gnu_target_os=$c_gnu_target_kernel
+ c_gnu_target_kernel=
+fi
optimization=
@@ -50,6 +75,11 @@ if [ "$2" == "y" ]; then
fi
-echo "c_gnu := $c_gnu" > $1
-echo "c_gnu_libraries := $c_gnu_libraries" >> $1
+echo "c_gnu := $c_gnu" > $1
+echo "c_gnu_libraries := $c_gnu_libraries" >> $1
echo "c_gnu_optimization_options := $optimization" >> $1
+echo "c_gnu_target := $c_gnu_target" >> $1
+echo "c_gnu_target_cpu := $c_gnu_target_cpu" >> $1
+echo "c_gnu_target_mf := $c_gnu_target_mf" >> $1
+echo "c_gnu_target_kernel := $c_gnu_target_kernel" >> $1
+echo "c_gnu_target_os := $c_gnu_target_os" >> $1
diff --git a/build-0.3/c/gnu/dep b/build-0.3/c/gnu/dep
index 1286ce2..ecafcb1 100755
--- a/build-0.3/c/gnu/dep
+++ b/build-0.3/c/gnu/dep
@@ -1,8 +1,7 @@
#! /usr/bin/env bash
# file : build/c/gnu/dep
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
# Post-process generated dependency information.
diff --git a/build-0.3/c/gnu/o-e.make b/build-0.3/c/gnu/o-e.make
index a1da582..a54a9f3 100644
--- a/build-0.3/c/gnu/o-e.make
+++ b/build-0.3/c/gnu/o-e.make
@@ -1,6 +1,5 @@
# file : build/c/gnu/o-e.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include,$(bld_root)/c/gnu/configuration.make)
diff --git a/build-0.3/c/gnu/o-l.make b/build-0.3/c/gnu/o-l.make
index 5e66650..5c93f0a 100644
--- a/build-0.3/c/gnu/o-l.make
+++ b/build-0.3/c/gnu/o-l.make
@@ -1,6 +1,5 @@
# file : build/c/gnu/o-l.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include,$(bld_root)/c/gnu/configuration.make)
@@ -42,9 +41,13 @@ $(out_base)/%.l.o.clean:
else
+mingw := $(if $(filter $(c_gnu_target_os),mingw32 mingw64),y,n)
+
$(out_base)/%.l: ld := $(c_gnu)
$(out_base)/%.l: ld_options := $(c_gnu_optimization_options) $(c_gnu_debugging_options)
+ifeq ($(mingw),n)
$(out_base)/%.l: c_pic_options := -fPIC
+endif
$(out_base)/%.l: comma_ := ,
$(out_base)/%.l: expand-l = $(if $(subst n,,$(c_rpath)),\
@@ -56,6 +59,9 @@ $(out_base)/%.l:
else
$(out_base)/%.l: | $$(dir $$@).
endif
+ifeq ($(mingw),n)
+# Standard version.
+#
$(call message,ld $@,$(ld) -shared \
$(c_extra_options) $(ld_options) $(c_ld_extra_options) \
-o $(@D)/lib$(basename $(@F)).so -Wl$(comma_)-soname=lib$(basename $(@F)).so \
@@ -63,9 +69,24 @@ $(foreach f,$^,$(if $(patsubst %.l,,$f),$f,$(call expand-l,$f))) $(c_extra_libs)
$(call message,,echo "$(@D)/lib$(basename $(@F)).so" >$@)
$(call message,,echo "rpath:$(@D)" >>$@)
$(call message,,echo "$(patsubst %.l,`cat %.l`,$(filter %.a %.so %.l,$^))" | xargs -n 1 echo >>$@)
+else
+# MinGW version.
+#
+ $(call message,ld $@,$(ld) -shared \
+$(c_extra_options) $(ld_options) $(c_ld_extra_options) \
+-o $(@D)/$(basename $(@F)).dll -Wl$(comma_)--out-implib$(comma_)$(@D)/lib$(basename $(@F)).a \
+$(foreach f,$^,$(if $(patsubst %.l,,$f),$f,$(call expand-l,$f))) $(c_extra_libs))
+ $(call message,,echo "$(@D)/lib$(basename $(@F)).a" >$@)
+ $(call message,,echo "rpath:$(@D)" >>$@)
+ $(call message,,echo "$(patsubst %.l,`cat %.l`,$(filter %.a %.l,$^))" | xargs -n 1 echo >>$@)
+endif
$(out_base)/%.l.o.clean:
+ifeq ($(mingw),n)
$(call message,rm $$1,rm -f $$1 $(@D)/$(patsubst %.l.o.clean,lib%.so,$(@F)),$(basename $(basename $@)))
+else
+ $(call message,rm $$1,rm -f $$1 $(@D)/$(patsubst %.l.o.clean,%.dll,$(@F)) $(@D)/$(patsubst %.l.o.clean,lib%.a,$(@F)),$(basename $(basename $@)))
+endif
endif
endif
diff --git a/build-0.3/c/intel/c-d.make b/build-0.3/c/intel/c-d.make
index aa6a559..b4d6c80 100644
--- a/build-0.3/c/intel/c-d.make
+++ b/build-0.3/c/intel/c-d.make
@@ -1,6 +1,5 @@
# file : build/c/intel/c-o.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include-once,$(bld_root)/c/cpp-options.make,$(out_base))
diff --git a/build-0.3/c/intel/c-o.make b/build-0.3/c/intel/c-o.make
index 3e359aa..e925b50 100644
--- a/build-0.3/c/intel/c-o.make
+++ b/build-0.3/c/intel/c-o.make
@@ -1,6 +1,5 @@
# file : build/c/intel/c-o.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include-once,$(bld_root)/c/cpp-options.make,$(out_base))
diff --git a/build-0.3/c/intel/configuration-rules.make b/build-0.3/c/intel/configuration-rules.make
index e464e00..0132981 100644
--- a/build-0.3/c/intel/configuration-rules.make
+++ b/build-0.3/c/intel/configuration-rules.make
@@ -1,14 +1,14 @@
# file : build/c/intel/configuration-rules.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(dcf_root)/c/intel/configuration-dynamic.make: | $(dcf_root)/c/intel/.
- $(call message,,$(bld_root)/c/intel/configure $@ $(c_optimize))
+ $(call message,,$(bld_root)/c/intel/configure $@ $(c_optimize) \
+"$(c_extra_options)" "$(c_ld_extra_options)")
ifndef %foreign%
-disfigure::
+$(dcf_root)/.disfigure::
$(call message,rm $(dcf_root)/c/intel/configuration-dynamic.make,\
rm -f $(dcf_root)/c/intel/configuration-dynamic.make)
diff --git a/build-0.3/c/intel/configuration-static.make b/build-0.3/c/intel/configuration-static.make
index 29f44b1..c3e2d05 100644
--- a/build-0.3/c/intel/configuration-static.make
+++ b/build-0.3/c/intel/configuration-static.make
@@ -1,4 +1,3 @@
# file : build/c/intel/configuration-static.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
diff --git a/build-0.3/c/intel/configuration.make b/build-0.3/c/intel/configuration.make
index 5e3e38f..4e0ec1e 100644
--- a/build-0.3/c/intel/configuration.make
+++ b/build-0.3/c/intel/configuration.make
@@ -1,6 +1,5 @@
# file : build/c/intel/configuration.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include-once,$(bld_root)/c/intel/configuration-rules.make,$(dcf_root))
diff --git a/build-0.3/c/intel/configure b/build-0.3/c/intel/configure
index 0d1382d..e829cea 100755
--- a/build-0.3/c/intel/configure
+++ b/build-0.3/c/intel/configure
@@ -1,12 +1,13 @@
#! /usr/bin/env bash
# file : build/c/intel/configure
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
# $1 out file
# $2 optimize (y/n)
+# $3 c_extra_options
+# $4 c_ld_extra_options
#
# bld_root - build root
# project_name - project name
@@ -27,7 +28,11 @@ $echo "'/opt/intel_cc_80/bin/icc'."
$echo
c_intel=`read_path --command icc`
-c_intel_libraries=`$c_intel -print-search-dirs | sed -e 's/libraries: =//p' -e d`
+
+# Pass c_extra_options and c_ld_extra_options since those can affect the
+# search paths (e.g., -m32) and target.
+#
+c_intel_libraries=`$c_intel $3 $4 -print-search-dirs | sed -e 's/libraries: =//p' -e d`
# Intel optimizes by default.
#
diff --git a/build-0.3/c/intel/dep b/build-0.3/c/intel/dep
index 70f3b79..ead761f 100755
--- a/build-0.3/c/intel/dep
+++ b/build-0.3/c/intel/dep
@@ -1,8 +1,7 @@
#! /usr/bin/env bash
# file : build/c/intel/dep
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
# Post-process generated dependency information.
diff --git a/build-0.3/c/intel/o-e.make b/build-0.3/c/intel/o-e.make
index 7442637..0661ccc 100644
--- a/build-0.3/c/intel/o-e.make
+++ b/build-0.3/c/intel/o-e.make
@@ -1,6 +1,5 @@
# file : build/c/intel/o-e.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include,$(bld_root)/c/intel/configuration.make)
diff --git a/build-0.3/c/intel/o-l.make b/build-0.3/c/intel/o-l.make
index 818a4ca..0ad3085 100644
--- a/build-0.3/c/intel/o-l.make
+++ b/build-0.3/c/intel/o-l.make
@@ -1,6 +1,5 @@
# file : build/c/intel/o-l.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include,$(bld_root)/c/intel/configuration.make)
diff --git a/build-0.3/c/o-e.make b/build-0.3/c/o-e.make
index 10469a4..95f0757 100644
--- a/build-0.3/c/o-e.make
+++ b/build-0.3/c/o-e.make
@@ -1,6 +1,5 @@
# file : build/c/o-e.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include,$(bld_root)/c/configuration.make)
diff --git a/build-0.3/c/o-l.make b/build-0.3/c/o-l.make
index 5ee8a0f..7f64067 100644
--- a/build-0.3/c/o-l.make
+++ b/build-0.3/c/o-l.make
@@ -1,6 +1,5 @@
# file : build/c/o-l.make
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC
# license : GNU GPL v2; see accompanying LICENSE file
$(call include,$(bld_root)/ld/configuration-lib.make)