diff options
author | Jörg Frings-Fürst <jff@merkur> | 2014-05-18 16:08:14 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <jff@merkur> | 2014-05-18 16:08:14 +0200 |
commit | a15cf65c44d5c224169c32ef5495b68c758134b7 (patch) | |
tree | 3419f58fc8e1b315ba8171910ee044c5d467c162 /build-0.3/c/gnu/c-o.make |
Imported Upstream version 3.3.0.2upstream/3.3.0.2
Diffstat (limited to 'build-0.3/c/gnu/c-o.make')
-rw-r--r-- | build-0.3/c/gnu/c-o.make | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/build-0.3/c/gnu/c-o.make b/build-0.3/c/gnu/c-o.make new file mode 100644 index 0000000..9f5ecdd --- /dev/null +++ b/build-0.3/c/gnu/c-o.make @@ -0,0 +1,42 @@ +# file : build/c/gnu/c-o.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-once,$(bld_root)/c/cpp-options.make,$(out_base)) +$(call include,$(bld_root)/c/gnu/configuration.make) + +$(out_base)/%.o: c := $(c_gnu) +$(out_base)/%.o: c_options := $(c_gnu_optimization_options) $(c_gnu_debugging_options) + +#@@ wrong prefix +# +$(out_base)/%.o: expand-cpp-options-impl = \ +$(if $1,$(shell sed -e 's%include: \(.*\)%\1%' -e t -e d $1)) + +$(out_base)/%.o: expand-cpp-options = \ +$(call expand-cpp-options-impl,$(filter %.cpp-options,$1)) + +ifeq ($(out_base),$(src_base)) +$(out_base)/%.o: $(src_base)/%.$(c_s_suffix) +else +$(out_base)/%.o: $(src_base)/%.$(c_s_suffix) | $$(dir $$@). +endif + $(call message,c $<,$(c) \ +$(cpp_options) $(call expand-cpp-options,$^) $(c_pp_extra_options) $(c_options) \ +$(c_pic_options) $(subst y,-fexceptions,$(filter y,$(c_exceptions))) $(c_extra_options) -o $@ -c $<) + + +ifneq ($(out_base),$(src_base)) + +$(out_base)/%.o: $(out_base)/%.$(c_s_suffix) | $$(dir $$@). + $(call message,c $<,$(c) \ +$(cpp_options) $(call expand-cpp-options,$^) $(c_pp_extra_options) $(c_options) \ +$(c_pic_options) $(subst y,-fexceptions,$(filter y,$(c_exceptions))) $(c_extra_options) -o $@ -c $<) + +endif + +.PHONY: $(out_base)/%.o.$(c_s_suffix).clean + +$(out_base)/%.o.$(c_s_suffix).clean: + $(call message,rm $$1,rm -f $$1,$(basename $(basename $@))) |