Skip to content

Commit 40550da

Browse files
committed
libsparse: add Makefile
Signed-off-by: Jo-Philipp Wich <[email protected]>
1 parent e512570 commit 40550da

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

libsparse/Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
CC ?= gcc
2+
AR ?= ar
3+
4+
CFLAGS += -Iinclude
5+
6+
OBJ := \
7+
backed_block.o \
8+
output_file.o \
9+
sparse.o \
10+
sparse_crc32.o \
11+
sparse_err.o \
12+
sparse_read.o
13+
14+
%.o: %.c
15+
$(CC) $(CFLAGS) -c -o $@ $^
16+
17+
libsparse.a: $(OBJ)
18+
$(AR) rcs $@ $^
19+
20+
clean:
21+
rm -f $(OBJ) libsparse.a

0 commit comments

Comments
 (0)