blob: a448737bff9ee80c04322fced0d22bd4e64aa52b [file] [log] [blame]
yuezonghe824eb0c2024-06-27 02:32:26 -07001
2include $(COMMON_BASE_MK)
3
4NAME=zlib
5SRC_DIR=zlib-1.2.11
6INSTALL_DIR=$(LIB_DIR)/$(NAME)/install
7BUILD_DIR=build
8GEN_MAKEFILE=$(BUILD_DIR)/Makefile
9
10#CONFIG_OPTS = --target=arm-linux --host=arm-linux
11#CONFIG_OPTS = --static
12
13all: $(GEN_MAKEFILE)
14 make -C build all
15 make -C build install
16
17$(GEN_MAKEFILE):
18 mkdir -p $(BUILD_DIR)
19 cd $(BUILD_DIR); ../$(SRC_DIR)/configure --prefix=$(INSTALL_DIR) $(CONFIG_OPTS)
20
21clean:
22 -rm -fr $(BUILD_DIR) $(INSTALL_DIR)
23
24romfs:
25 cd $(INSTALL_DIR)/lib; \
26 for i in *.so*; do \
27 if [ -L $$i ]; then \
28 $(ROMFSINST) -s `find $$i -printf %l` /lib/$$i; \
29 elif [ -f $$i ]; then \
30 $(ROMFSINST) /lib/$$i; \
31 fi; \
32 done
33