From 69c79d8181e906ce0e07cbcd2c30f8ea3890fc03 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 6 Sep 2009 13:15:53 +0200 Subject: Initial dependency configuration --- README | 44 ++++++++++++++++++++ cli/build/cxx/configuration-dynamic.make | 15 +++++++ cli/build/cxx/gnu/configuration-dynamic.make | 8 ++++ .../import/libcutl/configuration-dynamic.make | 4 ++ libcutl/build/cxx/configuration-dynamic.make | 15 +++++++ libcutl/build/cxx/gnu/configuration-dynamic.make | 8 ++++ libcutl/build/ld/configuration-lib-dynamic.make | 3 ++ makefile | 48 ++++++++++++++++++++++ 8 files changed, 145 insertions(+) create mode 100644 README create mode 100644 cli/build/cxx/configuration-dynamic.make create mode 100644 cli/build/cxx/gnu/configuration-dynamic.make create mode 100644 cli/build/import/libcutl/configuration-dynamic.make create mode 100644 libcutl/build/cxx/configuration-dynamic.make create mode 100644 libcutl/build/cxx/gnu/configuration-dynamic.make create mode 100644 libcutl/build/ld/configuration-lib-dynamic.make create mode 100644 makefile diff --git a/README b/README new file mode 100644 index 0000000..1767614 --- /dev/null +++ b/README @@ -0,0 +1,44 @@ +This archive contains pre-configured CLI source code with all its +dependencies. It allows you to built CLI in non-interactive mode +(that is, without answering any questions). + +GNU make 3.81 or later is required to build CLI. Any fairly recent +GNU/Linux distribution should have it already installed (use +make --version to check). + +The build system supports the following standard variables: + +CXX (defaults to g++ if not set) +CPPFLAGS +CXXFLAGS +LDFALGS +LIBS + +For example: + +$ make CXX=g++-4.2 CXXFLAGS=-O3 + +After the build, the CLI compiler can be found in the cli/cli/ directory. + +If you would like to see the full compiler/linker/etc., command lines, +you can add verbose=1 to the command line, for example: + +$ make verbose=1 + +To build and run automated tests for the CLI compiler as well as all the +dependencies, run: + +$ make test + +The clean the object files, libraries, executable, etc., run: + +$ make clean + +You can also run make from various sub-directories in this package. For +example, to build and run automated tests only for the CLI compiler, we +can do the following: + +$ cd cli/tests +$ make test + +Send bug reports or any other feedback to boris@codesynthesis.com. diff --git a/cli/build/cxx/configuration-dynamic.make b/cli/build/cxx/configuration-dynamic.make new file mode 100644 index 0000000..fa9bd03 --- /dev/null +++ b/cli/build/cxx/configuration-dynamic.make @@ -0,0 +1,15 @@ +cxx_id := gnu +cxx_optimize := n +cxx_debug := n +cxx_rpath := n + +cxx_pp_extra_options := $(CPPFLAGS) +cxx_extra_options := $(CXXFLAGS) +cxx_ld_extra_options := $(LDFLAGS) +cxx_extra_libs := $(LIBS) + +r := $(shell echo $(LDFLAGS) | sed -e 's/-L *\([^ ]*\)/-L\1/g') +r := $(patsubst -L%,%,$(filter -L%,$(r))) +r := $(shell echo $(r) | sed -e 's/ /:/g') + +cxx_extra_lib_paths := $(r) diff --git a/cli/build/cxx/gnu/configuration-dynamic.make b/cli/build/cxx/gnu/configuration-dynamic.make new file mode 100644 index 0000000..b432d56 --- /dev/null +++ b/cli/build/cxx/gnu/configuration-dynamic.make @@ -0,0 +1,8 @@ +ifneq ($(CXX),) +cxx_gnu := $(CXX) +else +cxx_gnu := g++ +endif + +cxx_gnu_libraries := +cxx_gnu_optimization_options := diff --git a/cli/build/import/libcutl/configuration-dynamic.make b/cli/build/import/libcutl/configuration-dynamic.make new file mode 100644 index 0000000..f8b049e --- /dev/null +++ b/cli/build/import/libcutl/configuration-dynamic.make @@ -0,0 +1,4 @@ +libcutl_installed := n +src_root := $(abspath $(src_root)/../libcutl) +scf_root := $(src_root)/build +out_root := $(src_root) diff --git a/libcutl/build/cxx/configuration-dynamic.make b/libcutl/build/cxx/configuration-dynamic.make new file mode 100644 index 0000000..fa9bd03 --- /dev/null +++ b/libcutl/build/cxx/configuration-dynamic.make @@ -0,0 +1,15 @@ +cxx_id := gnu +cxx_optimize := n +cxx_debug := n +cxx_rpath := n + +cxx_pp_extra_options := $(CPPFLAGS) +cxx_extra_options := $(CXXFLAGS) +cxx_ld_extra_options := $(LDFLAGS) +cxx_extra_libs := $(LIBS) + +r := $(shell echo $(LDFLAGS) | sed -e 's/-L *\([^ ]*\)/-L\1/g') +r := $(patsubst -L%,%,$(filter -L%,$(r))) +r := $(shell echo $(r) | sed -e 's/ /:/g') + +cxx_extra_lib_paths := $(r) diff --git a/libcutl/build/cxx/gnu/configuration-dynamic.make b/libcutl/build/cxx/gnu/configuration-dynamic.make new file mode 100644 index 0000000..b432d56 --- /dev/null +++ b/libcutl/build/cxx/gnu/configuration-dynamic.make @@ -0,0 +1,8 @@ +ifneq ($(CXX),) +cxx_gnu := $(CXX) +else +cxx_gnu := g++ +endif + +cxx_gnu_libraries := +cxx_gnu_optimization_options := diff --git a/libcutl/build/ld/configuration-lib-dynamic.make b/libcutl/build/ld/configuration-lib-dynamic.make new file mode 100644 index 0000000..c2c560c --- /dev/null +++ b/libcutl/build/ld/configuration-lib-dynamic.make @@ -0,0 +1,3 @@ +ld_lib_type := archive +ld_lib_ar := ar +ld_lib_ranlib := ranlib diff --git a/makefile b/makefile new file mode 100644 index 0000000..b26128f --- /dev/null +++ b/makefile @@ -0,0 +1,48 @@ +# file : makefile +# author : Boris Kolpackov +# copyright : Copyright (c) 2009 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +include $(dir $(lastword $(MAKEFILE_LIST)))/build-0.3/bootstrap.make + +default := $(out_base)/ + +.PHONY: $(default) test install clean + +# Build. +# +$(default): $(out_base)/cli/cli/ + +# Test. +# +test: $(out_base)/libcutl/.test $(out_base)/cli/.test + +# Install. +# +install: + +# Clean. +# +clean: $(out_base)/libcutl/.clean $(out_base)/cli/.clean + +# Reset pattern-specific variables because GNU make will use the +# first match instead of the most specific match. Here out_root +# and out_base are the same. +# +$(out_root)/%: out_root := +$(out_root)/%: out_base := +$(out_root)/%: src_root := +$(out_root)/%: src_base := +$(out_root)/%: scf_root := +$(out_root)/%: dcf_root := +$(out_root)/%: project_name := + +src_root := $(src_base)/libcutl +scf_root := $(src_root)/build +out_root := $(src_root) +$(call import,$(src_base)/libcutl/makefile) + +src_root := $(src_base)/cli +scf_root := $(src_root)/build +out_root := $(src_root) +$(call import,$(src_base)/cli/makefile) -- cgit v1.1