From 77eed5955d5e0a418f868e0620ac7eb76576f2aa Mon Sep 17 00:00:00 2001 From: ksg Date: Tue, 30 Aug 2016 11:43:51 -0700 Subject: [PATCH] Build System +Tool specific compilers and targets --- src/.make/buildtools.mk | 1 - src/Makefile | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/.make/buildtools.mk b/src/.make/buildtools.mk index d4cdc1d..feb2f5f 100644 --- a/src/.make/buildtools.mk +++ b/src/.make/buildtools.mk @@ -13,5 +13,4 @@ apcCL := -r /usr/local/the_march -o $(DISTDIR)/file.asspack TOOLSUP := $(shell echo '$(TOOLS)' | tr '[:lower:]' '[:upper:]') TOOLSRC := $(foreach tool,$(TOOLS),$($(tool)SRC)) -TOOLDEP := $(TOOLSRC:.c=.d) TOOLOBJ := $(TOOLSRC:.c=.o) diff --git a/src/Makefile b/src/Makefile index 89aba0e..64a42a1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -15,7 +15,7 @@ APPFLAGS := APPOBJ := #Dependencies which must be built before the executable APPDEPS := -#Directories containing independent tools +#Directories containing independent tools for GNU TOOLS := apc ################################################## #Emscripten Info @@ -77,9 +77,16 @@ TOOLTARGS := $(foreach tool,$(TOOLS),$(tool)/$(tool)) $(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 -- 2.18.0