Skip to content

Commit f5c21f2

Browse files
committed
Add toplevel Makefile
Signed-off-by: Jo-Philipp Wich <[email protected]>
1 parent 40550da commit f5c21f2

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

Makefile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
CC ?= gcc
2+
CFLAGS += -Iinclude -Ilibsparse/include
3+
4+
OBJ := \
5+
allocate.o \
6+
canned_fs_config.o \
7+
contents.o \
8+
crc16.o \
9+
ext4fixup.o \
10+
ext4_sb.o \
11+
ext4_utils.o \
12+
extent.o \
13+
indirect.o \
14+
make_ext4fs_main.o \
15+
make_ext4fs.o \
16+
sha1.o \
17+
uuid.o \
18+
wipe.o
19+
20+
%.o: %.c
21+
$(CC) $(CFLAGS) -c -o $@ $^
22+
23+
make_ext4fs: $(OBJ) libsparse/libsparse.a
24+
$(CC) -o $@ $^ -lz
25+
26+
libsparse/libsparse.a:
27+
$(MAKE) -C libsparse/ libsparse.a
28+
29+
clean:
30+
$(MAKE) -C libsparse/ clean
31+
rm -f $(OBJ) make_ext4fs

0 commit comments

Comments
 (0)