blob: 7f55e8737a52a991dd9fa06119989cb1b26aa7da [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001
2include $(COMMON_BASE_MK)
3
4NAME=libpng
5SRC_DIR=libpng-1.6.37
6INSTALL_DIR=$(LIB_DIR)/$(NAME)/install
7BUILD_DIR=build
8GEN_MAKEFILE=$(BUILD_DIR)/Makefile
9
10CONFIG_OPTS = --target=arm-linux --host=arm-linux
11CONFIG_OPTS += --enable-static
xf.li6c8fc1e2023-08-12 00:11:09 -070012CONFIG_OPTS += --disable-shared
xf.lie31de8b2023-12-26 23:38:58 -080013
xf.li6c8fc1e2023-08-12 00:11:09 -070014export ZLIBINC=$(LIB_DIR)/zlib/install/include
15export ZLIBLIB=$(LIB_DIR)/zlib/install/lib
16export CFLAGS += -I$(ZLIBINC)
17export CPPFLAGS += -I$(ZLIBINC)
18export LDFLAGS += -L$(ZLIBLIB)
19
20all: $(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
28clean:
29 -rm -fr $(BUILD_DIR) $(INSTALL_DIR)
30
31romfs:
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