diff options
Diffstat (limited to 'build-0.3/ld')
-rw-r--r-- | build-0.3/ld/configuration-lib-rules.make | 15 | ||||
-rw-r--r-- | build-0.3/ld/configuration-lib-static.make | 9 | ||||
-rw-r--r-- | build-0.3/ld/configuration-lib.make | 41 | ||||
-rwxr-xr-x | build-0.3/ld/configure-lib | 50 |
4 files changed, 115 insertions, 0 deletions
diff --git a/build-0.3/ld/configuration-lib-rules.make b/build-0.3/ld/configuration-lib-rules.make new file mode 100644 index 0000000..0c1a8e9 --- /dev/null +++ b/build-0.3/ld/configuration-lib-rules.make @@ -0,0 +1,15 @@ +# file : build/ld/configuration-lib-rules.make +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +$(dcf_root)/ld/configuration-lib-dynamic.make: | $(dcf_root)/ld/. + $(call message,,$(bld_root)/ld/configure-lib $@) + + +ifndef %foreign% + +$(dcf_root)/.disfigure:: + $(call message,rm $(dcf_root)/ld/configuration-lib-dynamic.make,\ +rm -f $(dcf_root)/ld/configuration-lib-dynamic.make) + +endif diff --git a/build-0.3/ld/configuration-lib-static.make b/build-0.3/ld/configuration-lib-static.make new file mode 100644 index 0000000..60eebd5 --- /dev/null +++ b/build-0.3/ld/configuration-lib-static.make @@ -0,0 +1,9 @@ +# file : build/ld/configuration-lib-static.make +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +#@@ Need to use these variables where I hardcoded those values. +# +ld_lib_prefix := lib +ld_lib_archive_suffix := .a +ld_lib_shared_suffix := .so diff --git a/build-0.3/ld/configuration-lib.make b/build-0.3/ld/configuration-lib.make new file mode 100644 index 0000000..5395d64 --- /dev/null +++ b/build-0.3/ld/configuration-lib.make @@ -0,0 +1,41 @@ +# file : build/ld/configuration-lib.make +# copyright : Copyright (c) 2004-2012 Code Synthesis Tools CC +# license : GNU GPL v2; see accompanying LICENSE file + +$(call include-once,$(bld_root)/ld/configuration-lib-rules.make,$(dcf_root)) + +# Static configuration. +# +$(call include,$(bld_root)/ld/configuration-lib-static.make) + +ifneq ($(bld_root),$(scf_root)) +$(call -include,$(scf_root)/ld/configuration-lib-static.make) +endif + +# Dynamic configuration. +# +ld_lib_type := + +$(call -include,$(dcf_root)/ld/configuration-lib-dynamic.make) + +ifdef ld_lib_type + +ifeq ($(ld_lib_type),archive) + +ld_lib_suffix := $(ld_lib_archive_suffix) + +else + +ld_lib_suffix := $(ld_lib_shared_suffix) + +endif + +$(out_root)/%: ld_lib_type := $(ld_lib_type) +$(out_root)/%: ld_lib_prefix := $(ld_lib_prefix) +$(out_root)/%: ld_lib_suffix := $(ld_lib_suffix) + +else + +.NOTPARALLEL: + +endif diff --git a/build-0.3/ld/configure-lib b/build-0.3/ld/configure-lib new file mode 100755 index 0000000..5243357 --- /dev/null +++ b/build-0.3/ld/configure-lib @@ -0,0 +1,50 @@ +#! /usr/bin/env bash + +# file : build/ld/configure-lib +# copyright : Copyright (c) 2004-2012 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 +$echo "configuring '$project_name'" +$echo +$echo + +$echo +$echo "Please select the default library type:" +$echo +$echo "(1) archive" +$echo "(2) shared object" +$echo + +type=`read_option "archive shared" "shared"` + +if [ "$type" == "archive" ]; then + + $echo + $echo "Please enter the archiver (ar) binary you would like to use." + $echo + + ar=`read_path --command ar` + + $echo + $echo "Please enter the indexer (ranlib) binary you would like to use." + $echo + + ranlib=`read_path --command ranlib` +fi + +echo "ld_lib_type := $type" > $1 + +if [ "$type" == "archive" ]; then + echo "ld_lib_ar := $ar" >> $1 + echo "ld_lib_ranlib := $ranlib" >> $1 +fi |