blob: 66345eb7b2b62930fcec7341bf5dfd4fe0b24c7e [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001
2include $(COMMON_BASE_MK)
3
4NAME=expat
5SRC_DIR=expat-2.1.0
6SRC_TAR=expat-2.1.0.tar.gz
7INSTALL_DIR=$(LIB_DIR)/$(NAME)/install
8BUILD_DIR=build
9GEN_MAKEFILE=$(SRC_DIR)/Makefile
10
11CONFIG_OPTS = --target=arm-buildroot-linux --host=arm-buildroot-linux --build=x86_64-unknown-linux-gnu
12#CONFIG_OPTS += --exec-prefix=$(INSTALL_DIR)/usr
13#CONFIG_OPTS += --sysconfdir=$(INSTALL_DIR)/etc
14#CONFIG_OPTS += --localstatedir=/var
15#CONFIG_OPTS += --program-prefix=
16CONFIG_OPTS += --disable-gtk-doc
17CONFIG_OPTS += --disable-gtk-doc-html
18CONFIG_OPTS += --disable-doc
19CONFIG_OPTS += --disable-docs
20CONFIG_OPTS += --disable-documentation
21CONFIG_OPTS += --with-xmlto=no
22CONFIG_OPTS += --with-fop=no
23CONFIG_OPTS += --disable-dependency-tracking
24CONFIG_OPTS += --enable-ipv6
25CONFIG_OPTS += --disable-nls
26CONFIG_OPTS += --enable-static
27CONFIG_OPTS += --enable-shared
28
29
30export ac_cv_have_abstract_sockets=yes
31
32export CFLAGS :=
33export LDFLAGS :=
34
35all: $(GEN_MAKEFILE)
36 make -C $(SRC_DIR) all
37 make -C $(SRC_DIR) install
38
39$(GEN_MAKEFILE):
40 mkdir -p $(BUILD_DIR)
41 sha256sum -c $(NAME).sig
42 tar xf $(TOPDIR_AP)/downloads/$(SRC_TAR)
43 cd $(SRC_DIR); ./configure --prefix=$(INSTALL_DIR) $(CONFIG_OPTS)
44
45clean:
46 -make -C $(SRC_DIR) distclean
47 -rm -fr $(BUILD_DIR) $(INSTALL_DIR) $(SRC_DIR)
48
49romfs:
50 cd $(INSTALL_DIR)/lib; \
51 for i in *.so*; do \
52 if [ -L $$i ]; then \
53 $(ROMFSINST) -s `find $$i -printf %l` /lib/$$i; \
54 elif [ -f $$i ]; then \
55 $(ROMFSINST) /lib/$$i; \
56 fi; \
57 done
58
59populate_sdk:
60 cp -afvp $(INSTALL_DIR)/include/* $(CROSS_COMPILE_SYSROOT)/usr/include/
61 cp -afvp $(INSTALL_DIR)/lib/* $(CROSS_COMPILE_SYSROOT)/usr/lib/
62 cp -afvp $(INSTALL_DIR)/bin/* $(CROSS_COMPILE_SYSROOT)/usr/bin/
63