summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hope <michael.hope@linaro.org>2012-03-27 13:39:04 +1300
committerRusty Russell <rusty.russell@linaro.org>2012-03-28 16:28:50 +1030
commit4edbdcd24e89867227eab432d74df93539917cc9 (patch)
tree2c90347a7f5815948267cd9968972a525d2f7cef
parent365621de183b2d5739b58f4ee0a78ef87fffcdf2 (diff)
boot-wrapper: tidy the Makefile to help with packaging.
Add and modify Makefile rules so that it can be used in a Debian package. Add an explicit 'distclean' target. Add a 'semi' target that only builds the semihosting binary. Add stub commands to 'all' and 'semi' so the call doesn't fall through to the default kernel rule. Update 'clean' to also clean the semihosting files. Signed-off-by: Michael Hope <michael.hope@linaro.org> Signed-off-by: Rusty Russell <rusty.russell@linaro.org>
-rw-r--r--Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index ebcbce5..584b404 100644
--- a/Makefile
+++ b/Makefile
@@ -28,10 +28,18 @@ LD = $(CROSS_COMPILE)ld
# These are needed by the underlying kernel make
export CROSS_COMPILE ARCH
+# Build all wrappers
all: $(IMAGE) $(SEMIIMG)
+ true
-clean:
- rm -f $(IMAGE) boot.o model.lds monitor.o uImage
+# 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
$(KERNEL): $(KERNEL_SRC)/arch/arm/boot/uImage
cp $< $@
@@ -62,6 +70,7 @@ $(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.
%: force
$(MAKE) -C $(KERNEL_SRC) $@