aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2013-12-19 12:14:43 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-11-28 18:05:39 +0000
commit03cd8f95445b7d7fd0457c8ee4693db4f29c1838 (patch)
treeb0271778fb1c15fb8381df05a73f2c53f0d21aa4
parent6a7d33d8f8c46711dfc9129d3384c3c5fa16049f (diff)
Makefile: Add "dump" target to aid debugging
This will dump any risu.bin files to the risu.asm files which are so useful for working through stuff. Of course you can run an individual make target by running: make simd_copy.risu.asm Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
-rw-r--r--.gitignore1
-rw-r--r--Makefile9
-rwxr-xr-xconfigure3
3 files changed, 13 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index ec6bc1f..fc84419 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
# Ignore binaries and any lurking coredumps
*.o
*.bin
+*.risu.asm
risu
core
config.h
diff --git a/Makefile b/Makefile
index 2290bbd..bfa8cac 100644
--- a/Makefile
+++ b/Makefile
@@ -20,13 +20,22 @@ SRCS=risu.c comms.c risu_$(ARCH).c risu_reginfo_$(ARCH).c
HDRS=risu.h
BINS=test_$(ARCH).bin
+# For dumping test patterns
+RISU_BINS=$(wildcard *.risu.bin)
+RISU_ASMS=$(patsubst %.bin,%.asm,$(RISU_BINS))
+
OBJS=$(SRCS:.c=.o)
all: $(PROG) $(BINS)
+dump: $(RISU_ASMS)
+
$(PROG): $(OBJS)
$(CC) $(STATIC) $(CFLAGS) -o $@ $^
+%.risu.asm: %.risu.bin
+ ${OBJDUMP} -b binary -m $(ARCH) -D $^ > $@
+
%.o: %.c $(HDRS)
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
diff --git a/configure b/configure
index aadbb62..748b48a 100755
--- a/configure
+++ b/configure
@@ -37,6 +37,7 @@ generate_makefilein() {
echo "CC:=${CC}" >> $m
echo "AS:=${AS}" >> $m
echo "OBJCOPY:=${OBJCOPY}" >> $m
+ echo "OBJDUMP:=${OBJDUMP}" >> $m
echo "STATIC:=${STATIC}" >> $m
echo "...done"
@@ -64,6 +65,7 @@ Some influential environment variables:
AS assembler command
OBJCOPY object copy utility command
+ OBJDUMP object dump utility command
EOF
}
@@ -86,6 +88,7 @@ done
CC="${CC-${CROSS_PREFIX}gcc}"
AS="${AS-${CROSS_PREFIX}as}"
OBJCOPY="${OBJCOPY-${CROSS_PREFIX}objcopy}"
+OBJDUMP="${OBJDUMP-${CROSS_PREFIX}objdump}"
if test "x${ARCH}" = "x"; then
guess_arch