[alsa-devel] [PATCH TINYCOMPRESS 12/14 v2] compress: Add makefile for building under standard linux
Richard Fitzgerald
rf at opensource.wolfsonmicro.com
Fri Feb 22 17:09:07 CET 2013
---
makefile.linux | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
create mode 100644 makefile.linux
diff --git a/makefile.linux b/makefile.linux
new file mode 100644
index 0000000..60d6c04
--- /dev/null
+++ b/makefile.linux
@@ -0,0 +1,35 @@
+LIB = libtinycompress
+BIN = cplay
+VER = 0.1
+LIBSRC = compress.c
+SRC = cplay.c
+LIBOBJ = ${LIBSRC:.c=.o}
+OBJ = ${SRC:.c=.o}
+
+CC = gcc
+CROSS_COMPILE =
+
+CFLAGS += -std=c99 -Wall -Wextra -Wunused -DVERSION=\"${VER}\" -I./include
+LDFLAGS += -L. -ltinycompress
+LIBLDFLAGS = -lasound
+
+all: libtinycompress cplay
+
+$(LIB): ${LIBOBJ}
+ @echo " LD "$@
+ @${CROSS_COMPILE}${CC} ${CFLAGS} -shared -Wl,-soname,$@.so -o $@.so ${LIBOBJ} ${LIBLDFLAGS}
+
+$(BIN): ${OBJ} ${LIB}
+ @echo " LD "$@
+ @${CROSS_COMPILE}${CC} ${CFLAGS} -o $@ ${OBJ} ${LDFLAGS}
+
+
+%.o: %.c
+ @echo " CC "$<
+ @${CROSS_COMPILE}${CC} ${CFLAGS} -c -fPIC -o $@ $<
+
+clean:
+ @rm -rf ${BIN} ${OBJ} ${LIB}.so ${LIBOBJ}
+
+
+.PHONY: all clean
--
1.7.2.5
More information about the Alsa-devel
mailing list