toolchain: The glorious return of glibc, ver 2.21
[openwrt/openwrt.git] / toolchain / glibc / headers / Makefile
1 PATH_PREFIX:=..
2 VARIANT:=headers
3
4 include ../common.mk
5
6 define Host/Compile
7
8 endef
9
10 define Host/Install
11 $(call Host/SetToolchainInfo)
12 mkdir -p $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/{include,lib}
13 $(MAKE) -C $(CUR_BUILD_DIR) \
14 BUILD_CFLAGS="$(HOST_CFLAGS)" \
15 install_root="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev" \
16 install-bootstrap-headers=yes \
17 install-headers
18 $(MAKE) -C $(CUR_BUILD_DIR) \
19 csu/subdir_lib
20 ( cd $(CUR_BUILD_DIR); \
21 $(CP) csu/crt1.o csu/crti.o csu/crtn.o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/lib/ \
22 )
23 $(TARGET_CC) -nostdlib -nostartfiles -shared -x c /dev/null \
24 -o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/lib/libc.so
25 endef
26
27 $(eval $(call HostBuild))