summaryrefslogtreecommitdiff
path: root/aliases/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'aliases/Makefile')
-rw-r--r--aliases/Makefile65
1 files changed, 12 insertions, 53 deletions
diff --git a/aliases/Makefile b/aliases/Makefile
index e5bef95..2251de2 100644
--- a/aliases/Makefile
+++ b/aliases/Makefile
@@ -1,66 +1,25 @@
-# Child makefile fragment
-#
-# Toolchain is provided by top-level makefile
-#
-# Variables provided by top-level makefile
-#
-# COMPONENT The name of the component
-# EXPORT The location of the export directory
-# TOP The location of the source tree root
-# RELEASEDIR The place to put release objects
-# DEBUGDIR The place to put debug objects
-#
-# do_include Canned command sequence to include a child makefile
-#
-# Variables provided by parent makefile:
-#
-# DIR The name of the directory we're in, relative to $(TOP)
-#
-# Variables we can manipulate:
-#
-# ITEMS_CLEAN The list of items to remove for "make clean"
-# ITEMS_DISTCLEAN The list of items to remove for "make distclean"
-# TARGET_TESTS The list of target names to run for "make test"
-#
-# SOURCES The list of sources to build for $(COMPONENT)
-#
-# Plus anything from the toolchain
+makealiases_SRCS := makealiases.c
-# Push parent directory onto the directory stack
-sp := $(sp).x
-dirstack_$(sp) := $(d)
-d := $(DIR)
+aliases_DATA := aliases-top character-sets aliases-bottom
-# Extend toolchain settings
-CFLAGS := $(CFLAGS) -I$(TOP)/src -I$(d)
+aliases := $(CURDIR)/riscos/!Boot/Resources/!Unicode/Files/Aliases
-SRCS_$(d) := makealiases.c
+makealiases := $(addprefix $(BUILDDIR)/$(DIR), makealiases)
-DATA_$(d) := aliases-top character-sets aliases-bottom
-
-ALIASES := $(TOP)/riscos/!Boot/Resources/!Unicode/Files/Aliases
-
-MAKEALIASES := $(addprefix $(d), makealiases)
-
-# Items for top-level makefile to use
-ITEMS_CLEAN := $(ITEMS_CLEAN) $(MAKEALIASES)
-
-ITEMS_DISTCLEAN := $(ITEMS_DISTCLEAN) $(ALIASES)
+DISTCLEAN_ITEMS := $(DISTCLEAN_ITEMS) $(aliases)
.PHONY: aliases
# Target for building aliases file
-aliases: $(MAKEALIASES) $(addprefix $(d)data/, $(DATA_$(d)))
- @$(MAKEALIASES) $(wordlist 2,$(words $^),$^) $(ALIASES)
+aliases: $(makealiases) $(addprefix $(DIR)data/, $(aliases_DATA))
+ @$(makealiases) $(wordlist 2,$(words $^),$^) $(aliases)
# Target for building makealiases binary
-$(MAKEALIASES): $(addprefix $(d), $(SRCS_$(d)))
+$(makealiases): $(addprefix $(DIR), $(makealiases_SRCS))
@$(HOST_CC) $(HOST_CCFLAGS) -o $@ $^
-# Now include any children we may have
-MAKE_INCLUDES := $(wildcard $(d)*/Makefile)
-$(eval $(foreach INC, $(MAKE_INCLUDES), $(call do_include,$(INC))))
+ifeq ($(MAKECMDGOALS),riscos-dist)
+ POST_TARGETS := $(POST_TARGETS) aliases
+endif
-# Finally, pop off the directory stack
-d := $(dirstack_$(sp))
-sp := $(basename $(sp))
+include build/makefiles/Makefile.subdir