mirror of
https://git.openwrt.org/project/make_ext4fs.git
synced 2024-11-21 14:50:41 -05:00
Add option to link zlib statically
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
7c15bef6c7
commit
98e3d5c1ce
8
Makefile
8
Makefile
@ -1,6 +1,12 @@
|
|||||||
CC ?= gcc
|
CC ?= gcc
|
||||||
CFLAGS += -Iinclude -Ilibsparse/include
|
CFLAGS += -Iinclude -Ilibsparse/include
|
||||||
|
|
||||||
|
ifeq ($(STATIC),1)
|
||||||
|
ZLIB := -Wl,-Bstatic -lz -Wl,-Bdynamic
|
||||||
|
else
|
||||||
|
ZLIB := -lz
|
||||||
|
endif
|
||||||
|
|
||||||
OBJ := \
|
OBJ := \
|
||||||
allocate.o \
|
allocate.o \
|
||||||
canned_fs_config.o \
|
canned_fs_config.o \
|
||||||
@ -21,7 +27,7 @@ OBJ := \
|
|||||||
$(CC) $(CFLAGS) -c -o $@ $^
|
$(CC) $(CFLAGS) -c -o $@ $^
|
||||||
|
|
||||||
make_ext4fs: $(OBJ) libsparse/libsparse.a
|
make_ext4fs: $(OBJ) libsparse/libsparse.a
|
||||||
$(CC) -o $@ $^ -lz
|
$(CC) -o $@ $^ $(ZLIB)
|
||||||
|
|
||||||
libsparse/libsparse.a:
|
libsparse/libsparse.a:
|
||||||
$(MAKE) -C libsparse/ libsparse.a
|
$(MAKE) -C libsparse/ libsparse.a
|
||||||
|
Loading…
Reference in New Issue
Block a user