APPOBJ :=
#Dependencies which must be built before the executable
APPDEPS :=
+#Directories containing independent tools
+TOOLS := apc
##################################################
#Emscripten Info
##################################################
#cancel default %.o behavior for %.d dependency
%.o : %.c
+#construct list of make rules for tools
+ifdef TOOLS
+TOOLTARGS := $(foreach tool,$(TOOLS),$(tool)/$(tool))
+.phony: $(TOOLS)
+$(TOOLS): $(TOOLTARGS)
+
+T = $(notdir $@)
+$(TOOLTARGS): $(TOOLOBJ)
+ $($TCC) $($TFLG) $($TSRC:.c=.o) -o $@
+
+#Put our toolsrc on the ctarg list for generating deps
+CTARG := $(CTARG) $(TOOLOBJ)
+endif
+
#Generate and evaluate C dependencies
$(foreach base,$(basename $(sort $(strip $(CTARG)))),\
$(eval $(strip $(base)$(COBJSUF): $(shell $(subst $BASE,$(base),$(CDEPSCOMMAND)))) $(CDEPS)))