summaryrefslogtreecommitdiff
path: root/build-0.3/cxx/gnu/o-e.make
diff options
context:
space:
mode:
authorJörg Frings-Fürst <jff@merkur>2014-05-18 16:08:14 +0200
committerJörg Frings-Fürst <jff@merkur>2014-05-18 16:08:14 +0200
commita15cf65c44d5c224169c32ef5495b68c758134b7 (patch)
tree3419f58fc8e1b315ba8171910ee044c5d467c162 /build-0.3/cxx/gnu/o-e.make
Imported Upstream version 3.3.0.2upstream/3.3.0.2
Diffstat (limited to 'build-0.3/cxx/gnu/o-e.make')
-rw-r--r--build-0.3/cxx/gnu/o-e.make39
1 files changed, 39 insertions, 0 deletions
diff --git a/build-0.3/cxx/gnu/o-e.make b/build-0.3/cxx/gnu/o-e.make
new file mode 100644
index 0000000..8c233bd
--- /dev/null
+++ b/build-0.3/cxx/gnu/o-e.make
@@ -0,0 +1,39 @@
+# file : build/cxx/gnu/o-e.make
+# author : Boris Kolpackov <boris@codesynthesis.com>
+# copyright : Copyright (c) 2004-2010 Code Synthesis Tools CC
+# license : GNU GPL v2; see accompanying LICENSE file
+
+$(call include,$(bld_root)/cxx/gnu/configuration.make)
+
+#@@ should it be lib%.so?
+#
+ifneq ($(cxx_extra_lib_paths),)
+vpath %.so $(cxx_extra_lib_paths)
+vpath %.a $(cxx_extra_lib_paths)
+endif
+
+ifneq ($(cxx_gnu_libraries),)
+vpath %.so $(cxx_gnu_libraries)
+vpath %.a $(cxx_gnu_libraries)
+endif
+
+$(out_base)/%: ld := $(cxx_gnu)
+$(out_base)/%: ld_options := $(cxx_gnu_optimization_options) $(cxx_gnu_debugging_options) $(cxx_ld_extra_options)
+
+$(out_base)/%: expand-l = $(if $(subst n,,$(cxx_rpath)),\
+$(shell sed -e 's%^rpath:\(.*\)%-Wl,-rpath,\1%' $1),\
+$(shell sed -e 's%^rpath:\(.*\)%%' $1))
+
+ifeq ($(out_base),$(src_base))
+$(out_base)/%: $(out_base)/%.o
+else
+$(out_base)/%: $(out_base)/%.o | $$(dir $$@).
+endif
+ $(call message,ld $@,$(ld) \
+$(cxx_extra_options) $(ld_options) $(cxx_ld_extra_options) -o $@ \
+$(foreach f,$^,$(if $(patsubst %.l,,$f),$f,$(call expand-l,$f))) $(cxx_extra_libs))
+
+.PHONY: $(out_base)/%.o.clean
+
+$(out_base)/%.o.clean:
+ $(call message,rm $(basename $(basename $@)),rm -f $(basename $@) $(basename $(basename $@)))