From f5c21f2b2c6481ff7d879a976296142cbbd56b77 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 4 Apr 2015 22:49:53 +0200 Subject: [PATCH] Add toplevel Makefile Signed-off-by: Jo-Philipp Wich --- Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..17b5d88 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +CC ?= gcc +CFLAGS += -Iinclude -Ilibsparse/include + +OBJ := \ + allocate.o \ + canned_fs_config.o \ + contents.o \ + crc16.o \ + ext4fixup.o \ + ext4_sb.o \ + ext4_utils.o \ + extent.o \ + indirect.o \ + make_ext4fs_main.o \ + make_ext4fs.o \ + sha1.o \ + uuid.o \ + wipe.o + +%.o: %.c + $(CC) $(CFLAGS) -c -o $@ $^ + +make_ext4fs: $(OBJ) libsparse/libsparse.a + $(CC) -o $@ $^ -lz + +libsparse/libsparse.a: + $(MAKE) -C libsparse/ libsparse.a + +clean: + $(MAKE) -C libsparse/ clean + rm -f $(OBJ) make_ext4fs -- 2.11.0