lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | |
| 2 | include $(COMMON_BASE_MK) |
| 3 | |
| 4 | NAME=zlib |
| 5 | SRC_DIR=zlib-1.2.11 |
| 6 | INSTALL_DIR=$(LIB_DIR)/$(NAME)/install |
| 7 | BUILD_DIR=build |
| 8 | GEN_MAKEFILE=$(BUILD_DIR)/Makefile |
| 9 | |
| 10 | #CONFIG_OPTS = --target=arm-linux --host=arm-linux |
| 11 | #CONFIG_OPTS = --static |
| 12 | |
| 13 | all: $(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 | |
| 21 | clean: |
| 22 | -rm -fr $(BUILD_DIR) $(INSTALL_DIR) |
| 23 | |
| 24 | romfs: |
| 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 | |