Skip to contentSkip to conversation

compress: Add makefile for building under standard linux

PATCH Applied Richard Fitzgerald 1 participant 2 messages Feb 10, 2013 – Feb 22, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 12/14 compress: Add makefile for building under standard linux

makefile.linux new file +35 -0
new file mode 100644
index 0000000..60d6c04
@@ -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,[email protected] -o [email protected] ${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
Signature · 1 line
1.7.2.5
#1 lore raw
---
 makefile.linux |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)
 create mode 100644 makefile.linux
makefile.linux new file +35 -0
new file mode 100644
index 0000000..60d6c04
@@ -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,[email protected] -o [email protected] ${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
Signature · 1 line
1.7.2.5