aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChristian Muller <christian.muller@linaro.org>2014-04-14 15:09:20 -0700
committerZoran Markovic <zoran.markovic@linaro.org>2014-04-14 15:11:59 -0700
commitf59a60e20a050473bf00cfa9d28cb1d591c2c913 (patch)
tree154d73949f16078f22ac3544de1c1814512102b0 /Makefile
parent34f7b9b6eff40a3eadea36e5b47841c7967460d2 (diff)
idlestat: Add Makefile CROSS_COMPILE support
Launchpad Bug #1306587: Makefile doesn't use CROSS_COMPILE flag. Add the CROSS_COMPILE flag support to allow cross compile and build of idlestat for other targets. Signed-off-by: Christian Muller <christian.muller@linaro.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 5838e0f..f74b48c 100644
--- a/Makefile
+++ b/Makefile
@@ -22,14 +22,17 @@
# Zoran Markovic <zoran.markovic@linaro.org>
#
CFLAGS?=-g -Wall
-CC?=gcc
+CC=gcc
OBJS = idlestat.o topology.o trace.o utils.o
default: idlestat
+%.o: %.c
+ $(CROSS_COMPILE)$(CC) -c -o $@ $< $(CFLAGS)
+
idlestat: $(OBJS)
- $(CC) ${CFLAGS} $(OBJS) -o $@
+ $(CROSS_COMPILE)$(CC) $(CFLAGS) $(OBJS) -o $@
clean:
rm -f $(OBJS) idlestat