1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
include $(TOPDIR)/rules.mk
include $(TOPDIR)/toolchain/eglibc/Makefile.inc
PKG_DESCR:= embedded GNU C library
PKG_SECTION:= base
NO_DISTFILES:= 1
PKG_OPTS:= noremove
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,EGLIBC,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
$(eval $(call PKG_template,EGLIBC_DEV,$(PKG_NAME)-dev,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
do-extract:
# do nothing, eglibc is already build in toolchain directory
do-install:
${INSTALL_DIR} $(IDIR_EGLIBC)/lib $(IDIR_EGLIBC)/etc
# install /etc/localtime from host system (FIXME)
${CP} /etc/localtime $(IDIR_EGLIBC)/etc
ifeq ($(ADK_SSP),y)
$(CP) $(STAGING_DIR)/lib/libssp.so* $(IDIR_EGLIBC)/lib/
endif
$(CP) $(STAGING_DIR)/lib/libgcc_s.so.* $(IDIR_EGLIBC)/lib/
-for file in libc ld libcrypt libdl libm libresolv librt libutil libnss_compat libnss_dns libnss_files; do \
$(CP) $(STAGING_DIR)/lib/$$file.so.* $(IDIR_EGLIBC)/lib/; \
$(CP) $(STAGING_DIR)/lib/$$file-$(PKG_VERSION).so $(IDIR_EGLIBC)/lib/; \
done
# create ld.so link for x86 linker and gcc
cd $(IDIR_EGLIBC)/lib && ln -sf ld-$(PKG_VERSION).so ld-linux.so.2
cd $(IDIR_EGLIBC)/lib && ln -sf libc.so.6 libc.so
cd $(IDIR_EGLIBC)/lib && ln -sf libgcc_s.so.1 libgcc_s.so
# header package
${INSTALL_DIR} $(IDIR_EGLIBC_DEV)/usr/include/{sys,bits,gnu,linux,asm,asm-generic}
for file in \
regex errno limits alloca stdint locale ctype \
stdlib string sgidefs fcntl \
libintl sched pthread wchar _G_config getopt endian \
features libio stdio error signal time unistd \
;do \
${CP} $(STAGING_DIR)/usr/include/$$file.h \
$(IDIR_EGLIBC_DEV)/usr/include; \
done
${CP} $(STAGING_DIR)/usr/include/asm/*.h $(IDIR_EGLIBC_DEV)/usr/include/asm
${CP} $(STAGING_DIR)/usr/include/asm-generic/*.h $(IDIR_EGLIBC_DEV)/usr/include/asm-generic
${CP} $(STAGING_DIR)/usr/include/sys/*.h $(IDIR_EGLIBC_DEV)/usr/include/sys
${CP} $(STAGING_DIR)/usr/include/bits/*.h $(IDIR_EGLIBC_DEV)/usr/include/bits
${CP} $(STAGING_DIR)/usr/include/gnu/*.h $(IDIR_EGLIBC_DEV)/usr/include/gnu
${CP} $(STAGING_DIR)/usr/include/linux/*.h $(IDIR_EGLIBC_DEV)/usr/include/linux
include ${TOPDIR}/mk/pkg-bottom.mk
|