From eefb242a129510654b235b5008716888d2993fbc Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sun, 18 Jan 2009 23:07:26 +0100 Subject: [PATCH] Fixed selection of linker command --- snippets/Makefile.rules.test | 2 +- snippets/cprog.omk | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/snippets/Makefile.rules.test b/snippets/Makefile.rules.test index 0a14ffd..1f819a0 100644 --- a/snippets/Makefile.rules.test +++ b/snippets/Makefile.rules.test @@ -114,7 +114,7 @@ idl_src_cmd = $(IDL_COMPILER) $(IDL_FLAGS) $($(1)_IDLFLAGS) $$< # TODO: Implement CMETRIC -_linker = $(if $(call c++sources,$($(1)_SOURCES)),$(CXX),$(CC)) +_linker = $(if $(call c++sources,$($(1)_SOURCES) $($(1)_GEN_SOURCES)),$(CXX),$(CC)) _map_file = $(USER_OBJS_DIR)/$(1).exe.map _dep_file = $(USER_OBJS_DIR)/$(1).exe.d program_cmd = set -e; \ diff --git a/snippets/cprog.omk b/snippets/cprog.omk index 6630152..29420db 100644 --- a/snippets/cprog.omk +++ b/snippets/cprog.omk @@ -1,10 +1,10 @@ -############## -# C programs # -############## +################## +# C/C++ programs # +################## c++ext = cc C cxx cpp -c++sources = $(foreach ext,$(c++ext),$(filter %.$(ext),$(1))) +c++sources = $(strip $(foreach ext,$(c++ext),$(filter %.$(ext),$(1)))) ### # template_variables - variables common to program, libraries, ... -- 2.39.2