From 3c3e592a1eba0c78072ad63ca30cffe991acc021 Mon Sep 17 00:00:00 2001 From: Mike Lowis Date: Mon, 2 May 2016 15:46:03 -0400 Subject: [PATCH] Added ECLEAN variable and updated rules files to take advantage of it --- Makefile | 20 +++++++++++--------- source/sh/Rules.mk | 1 + 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 06eb45cd..82c70620 100644 --- a/Makefile +++ b/Makefile @@ -19,16 +19,9 @@ BINDIR = $(BUILDDIR)/bin OBJDIR = $(BUILDDIR)/obj # targets -BINS = +BINS = ECLEAN = - -#------------------------------------------------------------------------------ -# Ensure The Build Dir Exists -#------------------------------------------------------------------------------ -$(BUILDDIR)/dummy: - mkdir -p $(BUILDDIR) $(BINDIR) $(OBJDIR) $(MKSH_OBJDIR) - touch $@ --include $(BUILDDIR)/dummy +DIRS = $(BUILDDIR) $(BINDIR) $(OBJDIR) #------------------------------------------------------------------------------ # Build Rules @@ -48,3 +41,12 @@ clean: # load user-specific settings if they exist -include config.mk + +#------------------------------------------------------------------------------ +# Ensure The Build Dir Exists +#------------------------------------------------------------------------------ +$(BUILDDIR)/dummy: + mkdir -p $(DIRS) + touch $@ +-include $(BUILDDIR)/dummy + diff --git a/source/sh/Rules.mk b/source/sh/Rules.mk index d959831c..d4649ac5 100644 --- a/source/sh/Rules.mk +++ b/source/sh/Rules.mk @@ -4,6 +4,7 @@ MKSH_OBJDIR = $(OBJDIR)/sh MKSH_CCCMD = $(CC) $(CFLAGS) -I$(MKSH_SUBDIR) $(MKSH_DEFINES) -c -o $@ $^ MKSH_LDCMD = $(CC) -o $@ $^ BINS += $(MKSH_BIN) +DIRS += $(MKSH_OBJDIR) ECLEAN += $(BINDIR)/$(MKSH_BIN) $(MKSH_OBJS) MKSH_OBJS = \ -- 2.54.0