summaryrefslogtreecommitdiff
path: root/package/uclibc-ng/Makefile
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-07-05 13:20:32 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-07-05 13:21:38 +0200
commit13987e7baab1da72f4187ef90229a8ab45f58e01 (patch)
tree22091ab06506d8f967a2c5ee635fe8ea4761f783 /package/uclibc-ng/Makefile
parent5ce7c00aadc63e34d8629b36b8c7cf3c9ee0c380 (diff)
add support for uClibc-ng in parallel to uClibc.
This helps to find any regressions made in uClibc-ng.
Diffstat (limited to 'package/uclibc-ng/Makefile')
-rw-r--r--package/uclibc-ng/Makefile77
1 files changed, 77 insertions, 0 deletions
diff --git a/package/uclibc-ng/Makefile b/package/uclibc-ng/Makefile
new file mode 100644
index 000000000..1c58a8e52
--- /dev/null
+++ b/package/uclibc-ng/Makefile
@@ -0,0 +1,77 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+include $(ADK_TOPDIR)/mk/kernel-ver.mk
+include $(ADK_TOPDIR)/mk/kernel-vars.mk
+include $(ADK_TOPDIR)/toolchain/uclibc-ng/Makefile.inc
+
+PKG_NAME:= uClibc-ng
+PKG_DESCR:= embedded c library
+PKG_SECTION:= base/libs
+PKG_OPTS:= noremove nostaging noscripts
+PKG_VERSION:= 1.0.0
+
+PKG_SUBPKGS:= UCLIBC_NG UCLIBC_NG_DEV
+PKGSD_UCLIBC_NG_DEV:= development files for uclibc-ng
+PKGSC_UCLIBC_NG_DEV:= devel
+
+NO_DISTFILES:= 1
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,UCLIBC_NG,uclibc-ng,$(GIT_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+$(eval $(call PKG_template,UCLIBC_NG_DEV,uclibc-ng-dev,$(GIT_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_UCLIBC_NG_DEV},${PKGSC_UCLIBC_NG_DEV},${PKG_OPTS}))
+
+CONFIG_STYLE:= manual
+BUILD_STYLE:= manual
+INSTALL_STYLE:= manual
+
+do-install:
+ ${INSTALL_DIR} $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH) $(IDIR_UCLIBC_NG)/etc
+ test -z $(ADK_RUNTIME_TIMEZONE) || \
+ grep $(ADK_RUNTIME_TIMEZONE) ./files/tz.lst | \
+ cut -f 2 > $(IDIR_UCLIBC_NG)/etc/TZ
+ifneq ($(ADK_TARGET_USE_STATIC_LIBS),y)
+ $(CP) $(STAGING_TARGET_DIR)/lib/libc.so.* $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH)
+ $(CP) $(STAGING_TARGET_DIR)/lib/libuClibc-$(PKG_VERSION).so \
+ $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH)
+ $(CP) $(STAGING_TARGET_DIR)/lib/ld*-uClibc-$(PKG_VERSION).so \
+ $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH)
+ $(CP) $(STAGING_TARGET_DIR)/lib/ld*-uClibc.so.* $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH)
+ # backward compatible symlink
+ test ! -f $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH)/ld-uClibc.so.1 || \
+ cd $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH) && ln -sf ld-uClibc.so.1 ld-uClibc.so.0
+ test ! -f $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH)/ld64-uClibc.so.1 || \
+ cd $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH) && ln -sf ld64-uClibc.so.1 ld64-uClibc.so.0
+ -for file in libcrypt libdl libm libresolv libutil; do \
+ $(CP) $(STAGING_TARGET_DIR)/lib/$$file.so* $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH); \
+ $(CP) $(STAGING_TARGET_DIR)/lib/$$file-$(PKG_VERSION).so \
+ $(IDIR_UCLIBC_NG)/$(ADK_TARGET_LIBC_PATH); \
+ done
+endif
+
+uclibc-ng-dev-install:
+ ${INSTALL_DIR} ${IDIR_UCLIBC_NG_DEV}/usr/lib ${IDIR_UCLIBC_NG_DEV}/$(ADK_TARGET_LIBC_PATH)
+ ${CP} ${STAGING_TARGET_DIR}/usr/lib/libc.so ${IDIR_UCLIBC_NG_DEV}/usr/lib
+ ${CP} ${STAGING_TARGET_DIR}/usr/lib/uclibc-ng_nonshared.a ${IDIR_UCLIBC_NG_DEV}/usr/lib
+ ${CP} ${STAGING_TARGET_DIR}/usr/lib/crt*.o ${IDIR_UCLIBC_NG_DEV}/usr/lib
+ for file in libcrypt libdl libm libresolv libutil; do \
+ cd $(IDIR_UCLIBC_NG_DEV)/$(ADK_TARGET_LIBC_PATH); ln -sf $$file-$(GIT_VERSION).so $$file.so; \
+ done
+ ${KERNEL_MAKE_ENV} \
+ $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-linux-$(KERNEL_VERSION)-$(KERNEL_RELEASE)/linux-$(KERNEL_VERSION) \
+ $(KERNEL_MAKE_OPTS) \
+ INSTALL_HDR_PATH=$(IDIR_UCLIBC_NG_DEV)/usr \
+ headers_install
+ $(MAKE) -C $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/${PKG_NAME}-${PKG_VERSION} \
+ PREFIX=$(IDIR_UCLIBC_NG_DEV)/ \
+ DEVEL_PREFIX=/usr/ \
+ RUNTIME_PREFIX=$(IDIR_UCLIBC_NG_DEV)/ \
+ HOSTCC="$(CC_FOR_BUILD)" \
+ CPU_CFLAGS="$(TARGET_CFLAGS)" \
+ install_headers
+ @find $(IDIR_UCLIBC_NG_DEV) -name .install -exec rm {} \;
+ @find $(IDIR_UCLIBC_NG_DEV) -name ..install.cmd -exec rm {} \;
+
+include ${ADK_TOPDIR}/mk/pkg-bottom.mk