[alsa-devel] [PATCH TINYCOMPRESS 12/14] compress: Add makefile for building under standard linux

Richard Fitzgerald rf at opensource.wolfsonmicro.com
Sun Feb 10 01:21:01 CET 2013


Signed-off-by: Richard Fitzgerald <rf at opensource.wolfsonmicro.com>

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