libsparse: add Makefile
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 4 Apr 2015 20:48:01 +0000 (22:48 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 4 Apr 2015 20:48:01 +0000 (22:48 +0200)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
libsparse/Makefile [new file with mode: 0644]

diff --git a/libsparse/Makefile b/libsparse/Makefile
new file mode 100644 (file)
index 0000000..2fd4c30
--- /dev/null
@@ -0,0 +1,21 @@
+CC ?= gcc
+AR ?= ar
+
+CFLAGS += -Iinclude
+
+OBJ := \
+               backed_block.o \
+               output_file.o \
+               sparse.o \
+               sparse_crc32.o \
+               sparse_err.o \
+               sparse_read.o
+
+%.o: %.c
+               $(CC) $(CFLAGS) -c -o $@ $^
+
+libsparse.a: $(OBJ)
+               $(AR) rcs $@ $^
+
+clean:
+               rm -f $(OBJ) libsparse.a