aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>2012-05-31 15:06:54 +0100
committerDimitris Papastamos <dp@opensource.wolfsonmicro.com>2012-10-24 10:42:41 +0100
commit1d934cfd511ef34cc687416812382f4657b936ab (patch)
treedb2aa3b908d64b44fbcc013366d07a01f9df6dc7
parentf51c05bfaa7b98be049bb9e08c98b94346802a10 (diff)
tinyalsa: Add a CROSS_COMPILE variable in the Makefile
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
-rw-r--r--Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 0341500..8122157 100644
--- a/Makefile
+++ b/Makefile
@@ -2,24 +2,25 @@ CFLAGS = -c -fPIC
INC = include
OBJECTS = mixer.o pcm.o
LIB = libtinyalsa.so
+CROSS_COMPILE =
all: $(LIB) tinyplay tinycap tinymix
tinyplay: $(LIB) tinyplay.o
- gcc tinyplay.o -L. -ltinyalsa -o tinyplay
+ $(CROSS_COMPILE)gcc tinyplay.o -L. -ltinyalsa -o tinyplay
tinycap: $(LIB) tinycap.o
- gcc tinycap.o -L. -ltinyalsa -o tinycap
+ $(CROSS_COMPILE)gcc tinycap.o -L. -ltinyalsa -o tinycap
tinymix: $(LIB) tinymix.o
- gcc tinymix.o -L. -ltinyalsa -o tinymix
+ $(CROSS_COMPILE)gcc tinymix.o -L. -ltinyalsa -o tinymix
$(LIB): $(OBJECTS)
- gcc -shared $(OBJECTS) -o $(LIB)
+ $(CROSS_COMPILE)gcc -shared $(OBJECTS) -o $(LIB)
.c.o:
- gcc $(CFLAGS) $< -I$(INC)
-
+ $(CROSS_COMPILE)gcc $(CFLAGS) $< -I$(INC)
+
clean:
-rm $(LIB) $(OBJECTS) tinyplay.o tinyplay tinycap.o tinycap \
tinymix.o tinymix