This repository has been archived on 2024-11-01. You can view files and clone it, but cannot push or open issues or pull requests.
make_ext4fs_old/Makefile
Jo-Philipp Wich 98e3d5c1ce Add option to link zlib statically
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
2015-09-14 16:59:23 +02:00

38 lines
608 B
Makefile

CC ?= gcc
CFLAGS += -Iinclude -Ilibsparse/include
ifeq ($(STATIC),1)
ZLIB := -Wl,-Bstatic -lz -Wl,-Bdynamic
else
ZLIB := -lz
endif
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 $@ $^ $(ZLIB)
libsparse/libsparse.a:
$(MAKE) -C libsparse/ libsparse.a
clean:
$(MAKE) -C libsparse/ clean
rm -f $(OBJ) make_ext4fs