-.SECONDEXPANSION:
-apc-d apc: $$($$@SRC) | $(hGEN)
- $(strip $(LDCMD))
-
-%-d.o: CFLAGS+= -Og -ggdb
-%.o %-d.o: %.c $$(call cGENDEP,$$(dir $$@)%.c)
- $(strip $(CCMD))
+ifeq (,$(filter clean,$(MAKECMDGOALS)))
+# Deps should be generated for each source file, when not cleaning
+cGENDEP = $(if $(wildcard $1),$(subst $(dir $1),,$(filter-out $1 \ %:,$(shell $(CC) -MM -MG $1))),\
+$(info [<$1>: no deps - file not found]))
+# S2S will print the command necessary to create a file when called
+S2S = $(if $(filter $2,$(call NEWER,$2,$3)),$(eval 4 := t),$(eval 4 :=))
+S2S += $(if $4,$(info $(call $1,$2,$3)))
+ifeq (,$(filter n,$(MAKEFLAGS)))
+# Unless we're in -n mode, S2S should also invoke the command on the shell
+S2S += $(if $4,$(shell $(call $1,$2,$3)))
+endif
+endif