summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2012-04-04 17:34:48 +0100
committerPeter Maydell <peter.maydell@linaro.org>2012-04-04 17:43:18 +0100
commitc84293886a55963fe3fe2341d9daa4abe46742b9 (patch)
tree878b2af6a6e69a6c89767f43535a67ec2d4fb437
parent4edbdcd24e89867227eab432d74df93539917cc9 (diff)
Makefile: Use .PHONY target, not dummy commands; tidy clean listHEADmaster
There's no need to use a dummy 'true' command to suppress the default 'try kernel makefile' target for targets with no actual rules -- you can just list as in .PHONY instead. Tidy the list of files to remove on clean to remove a duplicate and use $(KERNEL) instead of uImage. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--Makefile11
1 files changed, 5 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 584b404..310b2dd 100644
--- a/Makefile
+++ b/Makefile
@@ -30,16 +30,14 @@ export CROSS_COMPILE ARCH
# Build all wrappers
all: $(IMAGE) $(SEMIIMG)
- true
# Build just the semihosting wrapper
semi: $(SEMIIMG)
- true
clean distclean:
rm -f $(IMAGE) $(SEMIIMG) \
- boot.o model.lds monitor.o uImage \
- bootsemi.o monitor.o modelsemi.lds
+ boot.o model.lds monitor.o $(KERNEL) \
+ bootsemi.o modelsemi.lds
$(KERNEL): $(KERNEL_SRC)/arch/arm/boot/uImage
cp $< $@
@@ -70,7 +68,8 @@ $(KERNEL_SRC)/arch/arm/boot/uImage: force
# Pass any target we don't know about through to the kernel makefile.
# This is a convenience rule so we can say 'make menuconfig' etc here.
-# Note that any rules in this file must have a command.
+# Note that any rules in this file must have a command or be marked as
+# .PHONY.
%: force
$(MAKE) -C $(KERNEL_SRC) $@
@@ -78,4 +77,4 @@ force: ;
Makefile: ;
-.PHONY: all clean config.mk config-default.mk
+.PHONY: all semi clean distclean config.mk config-default.mk