xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 1 | |
| 2 | include $(COMMON_BASE_MK) |
| 3 | |
| 4 | NAME=libpng |
| 5 | SRC_DIR=libpng-1.6.37 |
| 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 += --enable-static |
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 12 | CONFIG_OPTS += --disable-shared |
xf.li | e31de8b | 2023-12-26 23:38:58 -0800 | [diff] [blame^] | 13 | |
xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame] | 14 | export ZLIBINC=$(LIB_DIR)/zlib/install/include |
| 15 | export ZLIBLIB=$(LIB_DIR)/zlib/install/lib |
| 16 | export CFLAGS += -I$(ZLIBINC) |
| 17 | export CPPFLAGS += -I$(ZLIBINC) |
| 18 | export LDFLAGS += -L$(ZLIBLIB) |
| 19 | |
| 20 | all: $(GEN_MAKEFILE) |
| 21 | make -C build all |
| 22 | make -C build install |
| 23 | |
| 24 | $(GEN_MAKEFILE): |
| 25 | mkdir -p $(BUILD_DIR) |
| 26 | cd $(BUILD_DIR); ../$(SRC_DIR)/configure --prefix=$(INSTALL_DIR) $(CONFIG_OPTS) |
| 27 | |
| 28 | clean: |
| 29 | -rm -fr $(BUILD_DIR) $(INSTALL_DIR) |
| 30 | |
| 31 | romfs: |
| 32 | cd $(INSTALL_DIR)/lib; \ |
| 33 | for i in *.so*; do \ |
| 34 | if [ -L $$i ]; then \ |
| 35 | $(ROMFSINST) -s `find $$i -printf %l` /lib/$$i; \ |
| 36 | elif [ -f $$i ]; then \ |
| 37 | $(ROMFSINST) /lib/$$i; \ |
| 38 | fi; \ |
| 39 | done |
| 40 | |