+ifeq ($$($(1)_HOSTED),1)
+ #On Darwin architecture the assembly doesn't link correctly if these flags are set.
+ ifeq ($(shell uname | grep -c "Darwin"),1)
+ LIST_FLAGS := ""
+ MAP_FLAGS := ""
+ LDFLAGS := ""
+ endif
+ #use hosted specific map flags
+ $(1)_MAP_FLAGS = $$(MAP_FLAGS_HOST)
+
+ #Handle library creation
+ ifeq ($$($(1)_MAKELIB),1)
+ $$(OUTDIR)/$(1).tgt : $$(OUTDIR)/$(1).a
+ else
+ #Otherwise in hosted application we need only executable file.
+ $$(OUTDIR)/$(1).tgt : $$(OUTDIR)/$(1)
+ endif
+else
+ #use embedded specific map flags
+ $(1)_MAP_FLAGS = $$(MAP_FLAGS_EMB)
+ #In embedded we need s19, hex and bin
+ $$(OUTDIR)/$(1).tgt : $$(OUTDIR)/$(1).s19 $$(OUTDIR)/$(1).hex $$(OUTDIR)/$(1).bin
+endif
+
+$(1)_LDFLAGS += $$($(1)_MAP_FLAGS)
+
+# In embedded systems the target CPU is needed,
+# but there are different options on how to pass
+# it to the compiler.