TOOLSUP := $(shell echo '$(TOOLS)' | tr '[:lower:]' '[:upper:]')
TOOLSRC := $(foreach tool,$(TOOLS),$($(tool)SRC))
-TOOLDEP := $(TOOLSRC:.c=.d)
TOOLOBJ := $(TOOLSRC:.c=.o)
APPOBJ :=
#Dependencies which must be built before the executable
APPDEPS :=
-#Directories containing independent tools
+#Directories containing independent tools for GNU
TOOLS := apc
##################################################
#Emscripten Info
$(TOOLS): $(TOOLTARGS)
T = $(notdir $@)
+B = $(basename $T)
$(TOOLTARGS): $(TOOLOBJ)
$($TCC) $($TFLG) $($TSRC:.c=.o) -o $@
+#Tools only work on whatever system they're designed for
+#(typically GNU), so their creation rules are dependent
+#on each tool (define in .make/.buildtools.mk)
+$(foreach tool,$(TOOLS),$(tool)/%.o): %.c
+ $($BCC) $(BFLG) $< -c -o $@
+
#Put our toolsrc on the ctarg list for generating deps
CTARG := $(CTARG) $(TOOLOBJ)
endif