3 include $(TOPDIR
)/rules.mk
8 PKG_MD5SUM
:=ebf58e04d72eab5c131c2c9118737024
10 PKG_SOURCE_URL
:=http
://cxx.uclibc.org
/src
/
11 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).tbz2
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)
16 IPKG_LIBCXX
:=$(PACKAGE_DIR
)/$(PKG_NAME
)_
$(PKG_VERSION
)-$(PKG_RELEASE
)_
$(ARCH
).ipk
17 IDIR_LIBCXX
:=$(PKG_BUILD_DIR
)/ipkg
/$(PKG_NAME
)
18 INFO_LIBCXX
:=$(IPKG_STATE_DIR
)/info/$(PKG_NAME
).list
20 UCLIBC_TARGET_ARCH
:=$(shell echo
$(ARCH
) | sed
-e s
'/-.*//' \
22 -e
's/sparc.*/sparc/' \
25 -e
's/ppc/powerpc/g' \
26 -e
's/v850.*/v850/g' \
28 -e
's/sh[234].*/sh/' \
30 -e
's/mipsel.*/mips/' \
35 $(DL_DIR
)/$(PKG_SOURCE
):
36 $(SCRIPT_DIR
)/download.pl
$(DL_DIR
) $(PKG_SOURCE
) $(PKG_MD5SUM
) $(PKG_SOURCE_URL
)
38 $(PKG_BUILD_DIR
)/.prepared
: $(DL_DIR
)/$(PKG_SOURCE
)
39 $(PKG_CAT
) $(DL_DIR
)/$(PKG_SOURCE
) |
tar -C
$(BUILD_DIR
) $(TAR_OPTIONS
) -
40 $(PATCH
) $(PKG_BUILD_DIR
) .
/patches
41 touch
$(PKG_BUILD_DIR
)/.prepared
43 $(PKG_BUILD_DIR
)/.config
: $(PKG_BUILD_DIR
)/.prepared
44 cp .
/uclibc
++.config
$(PKG_BUILD_DIR
)/.config
45 $(SED
) 's,^.*TARGET_ARCH.*,TARGET_ARCH="$(UCLIBC_TARGET_ARCH)",g' $(PKG_BUILD_DIR
)/.config
46 $(SED
) 's,^.*ARCH_CFLAGS.*,ARCH_CFLAGS="-mno-split-addresses $(TARGET_CFLAGS)",g' $(PKG_BUILD_DIR
)/.config
49 $(PKG_BUILD_DIR
)/.built
: $(PKG_BUILD_DIR
)/.config
50 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
51 $(TARGET_CONFIGURE_OPTS
)
52 touch
$(PKG_BUILD_DIR
)/.built
54 $(STAGING_DIR
)/lib
/libuClibc
++.so
: $(PKG_BUILD_DIR
)/.built
55 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
56 DESTDIR
="$(STAGING_DIR)" \
59 $(IPKG_LIBCXX
): $(STAGING_DIR
)/lib
/libuClibc
++.so
60 $(SCRIPT_DIR
)/make-ipkg-dir.sh
$(IDIR_LIBCXX
) .
/$(PKG_NAME
).control
$(PKG_VERSION
)-$(PKG_RELEASE
) $(ARCH
)
61 mkdir
-p
$(IDIR_LIBCXX
)/usr
/lib
62 cp
-fpR
$(STAGING_DIR
)/lib
/libuClibc
++.so
* $(IDIR_LIBCXX
)/usr
/lib
/
63 $(STRIP
) $(IDIR_LIBCXX
)/usr
/lib
/*.so
*
64 mkdir
-p
$(PACKAGE_DIR
)
65 $(IPKG_BUILD
) $(IDIR_LIBCXX
) $(PACKAGE_DIR
)
67 $(INFO_LIBCXX
): $(IPKG_LIBCXX
)
68 $(IPKG
) install $(IPKG_LIBCXX
)
70 source
: $(DL_DIR
)/$(PKG_SOURCE
)
71 prepare
: $(PKG_BUILD_DIR
)/.prepared
72 compile
: $(IPKG_LIBCXX
)
73 install: $(INFO_LIBCXX
)
76 rm -rf
$(PKG_BUILD_DIR
) $(IPKG_LIBCXX
)
77 rm -f
$(STAGING_DIR
)/lib
/libuClibc
++.so
*