1 #############################################################
5 #############################################################
8 LIBXML2_SOURCE
=libxml2-sources-
$(LIBXML2_VERSION
).
tar.gz
9 LIBXML2_SITE
=ftp
://xmlsoft.org
/libxml2
10 LIBXML2_DIR
=$(BUILD_DIR
)/libxml2-
$(LIBXML2_VERSION
)
13 $(DL_DIR
)/$(LIBXML2_SOURCE
):
14 $(WGET
) -P
$(DL_DIR
) $(LIBXML2_SITE
)/$(LIBXML2_SOURCE
)
16 $(LIBXML2_DIR
)/.unpacked
: $(DL_DIR
)/$(LIBXML2_SOURCE
)
17 $(LIBXML2_CAT
) $(DL_DIR
)/$(LIBXML2_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
18 touch
$(LIBXML2_DIR
)/.unpacked
20 $(LIBXML2_DIR
)/.configured
: $(LIBXML2_DIR
)/.unpacked
21 (cd
$(LIBXML2_DIR
); rm -rf config.cache
; \
22 $(TARGET_CONFIGURE_OPTS
) \
23 $(TARGET_CONFIGURE_ARGS
) \
25 --target
=$(GNU_TARGET_NAME
) \
26 --host
=$(GNU_TARGET_NAME
) \
27 --build
=$(GNU_HOST_NAME
) \
32 --libexecdir
=/usr
/lib \
34 --datadir=/usr
/share \
35 --localstatedir
=/var \
38 --includedir=/usr
/include \
48 touch
$(LIBXML2_DIR
)/.configured
50 $(STAGING_DIR
)/usr
/lib
/libxml2.so
: $(LIBXML2_DIR
)/.configured
51 $(MAKE
) CC
=$(TARGET_CC
) -C
$(LIBXML2_DIR
)
52 $(MAKE
) DESTDIR
=$(STAGING_DIR
) -C
$(LIBXML2_DIR
) install
53 rm -f
$(STAGING_DIR
)/usr
/lib
/libxml2.la
54 $(SED
) 's:prefix=/usr:prefix=$(STAGING_DIR)/usr:' \
55 -e
's:includedir=/usr/include:includedir=$(STAGING_DIR)/usr/include:' \
56 $(STAGING_DIR
)/usr
/bin
/xml2-config
58 $(TARGET_DIR
)/usr
/lib
/libxml2.so
: $(STAGING_DIR
)/usr
/lib
/libxml2.so
59 mkdir
-p
$(TARGET_DIR
)/usr
/include $(TARGET_DIR
)/usr
/lib
60 cp
-dpf
$(STAGING_DIR
)/usr
/lib
/libxml2.so
* $(TARGET_DIR
)/usr
/lib
/
61 $(STRIPCMD
) $(STRIP_STRIP_UNNEEDED
) $(TARGET_DIR
)/usr
/lib
/libxml2.so
*
63 $(TARGET_DIR
)/usr
/lib
/libxml2.a
: $(STAGING_DIR
)/usr
/lib
/libxml2.so
64 cp
-dpf
$(STAGING_DIR
)/usr
/lib
/libxml2.
*a
$(TARGET_DIR
)/usr
/lib
/
66 libxml2
: uclibc
$(TARGET_DIR
)/usr
/lib
/libxml2.so libxml2-headers
68 $(STAGING_DIR
)/usr
/include/libxml2
: $(TARGET_DIR
)/usr
/lib
/libxml2.so
69 cp
-af
$(LIBXML2_DIR
)/include/libxml
$(STAGING_DIR
)/usr
/include/libxml2
72 $(TARGET_DIR
)/usr
/include/libxml2
: libxml2-headers
73 cp
-af
$(LIBXML2_DIR
)/usr
/include/libxml2
$(TARGET_DIR
)/usr
/include/libxml2
76 $(TARGET_DIR
)/usr
/include/libxml
: libxml2-headers
77 ln
-s libxml2
/libxml
$(LIBXML2_DIR
)/usr
/include/libxml
80 libxml2-headers
: $(STAGING_DIR
)/usr
/include/libxml2
82 libxml2-target-headers
: $(TARGET_DIR
)/usr
/include/libxml2 \
83 $(TARGET_DIR
)/usr
/include/libxml2 \
84 $(TARGET_DIR
)/usr
/lib
/libxml2.a
86 libxml2-source
: $(DL_DIR
)/$(LIBXML2_SOURCE
)
89 @if
[ -d
$(LIBXML2_DIR
)/Makefile
]; then \
90 -$(MAKE
) -C
$(LIBXML2_DIR
) clean; \
92 rm -f
$(STAGING_DIR
)/usr
/lib
/libxml2.
*
93 rm -f
$(TARGET_DIR
)/usr
/lib
/libxml2.
*
99 .PHONY
: libxml2-headers libxml2-target-headers
100 #############################################################
102 # Toplevel Makefile options
104 #############################################################
105 ifeq ($(BR2_PACKAGE_LIBXML2
),y
)
108 ifeq ($(BR2_PACKAGE_LIBXML2_TARGET_HEADERS
),y
)
109 TARGETS
+=libxml2-target-headers