# 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; \
-##############
-# 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, ...