# last included to catch all the objects added by others (locales/threads)
include $(top_srcdir)libc/Makefile.in
+conf := $(top_builddir)extra/config/conf
+mconf := $(top_builddir)extra/config/mconf
+
ifeq ($(HAVE_DOT_CONFIG),y)
# If the .config changes then we have to make sure that our includes are
# updated properly. This would normally work by saying that the headers
# have uClibc_config.h as prerequisite but since we _symlink_ the headers
# and do not (?) want to rely on 'make -L' we better update them right here,
# on spot to save us from alot of hazzle.
-$(top_builddir)include/bits/uClibc_config.h: $(top_builddir)extra/config/conf $(KCONFIG_CONFIG) $(top_srcdir)extra/scripts/conf-header.sh | $(top_builddir)include/bits $(top_builddir)include/config
+$(top_builddir)include/bits/uClibc_config.h: $(conf) $(KCONFIG_CONFIG) $(top_srcdir)extra/scripts/conf-header.sh | $(top_builddir)include/bits $(top_builddir)include/config
@$(disp_gen)
$(Q)@$< -s $(top_srcdir)extra/Configs/Config.in
$(Q)$(top_srcdir)extra/scripts/conf-header.sh $(KCONFIG_CONFIG) > $@
headers: $(top_builddir)include/bits/uClibc_config.h | subdirs
subdirs: $(addprefix $(top_builddir),$(subdirs))
pregen-headers: $(top_builddir)include/bits/sysnum.h $(pregen-headers-y)
-pregen: pregen-headers
+pregen: headers pregen-headers
$(Q)$(if $(UCLIBC_HAS_LOCALE),$(MAKE) -C extra/locale locale_headers)
$(top_builddir)include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh | $(top_builddir)include/bits
exit 1; \
fi
+.PHONY: $(LOCAL_INSTALL_PATH)
$(LOCAL_INSTALL_PATH):
$(Q)$(MAKE) PREFIX=$(shell pwd)/$(LOCAL_INSTALL_PATH) RUNTIME_PREFIX=/ \
DEVEL_PREFIX=/usr/ \
bits/kernel_types.h \
bits/syscalls.h \
bits/syscalls-common.h \
+ bits/uClibc_fpmax.h \
bits/uClibc_uintmaxtostr.h \
+ bits/uClibc_uwchar.h \
+ bits/uClibc_va_copy.h \
bits/sigcontextinfo.h \
bits/stackinfo.h \
tls.h \
HEADERS_RM-$(UCLIBC_HAS_FLOATS) += complex.h fpu_control.h ieee754.h \
math.h \
tgmath.h \
- bits/uClibc_fpmax.h \
bits/math*.h
HEADERS_RM-$(findstring y,$(UCLIBC_HAS_FTW)$(UCLIBC_HAS_NFTW)) += ftw.h
+HEADERS_RM-$(UCLIBC_HAS_FTS) += fts.h
HEADERS_RM-$(UCLIBC_HAS_GETTEXT_AWARENESS) += libintl.h
HEADERS_RM-$(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF) += printf.h
HEADERS_RM-$(UCLIBC_HAS_GLOB) += glob.h
HEADERS_RM-$(UCLIBC_HAS_WORDEXP) += wordexp.h
HEADERS_RM-$(UCLIBC_HAS_XATTR) += sys/xattr.h
HEADERS_RM-$(UCLIBC_HAS_XLOCALE) += xlocale.h
-HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC) += sys/fsuid.h sys/inotify.h sys/perm.h \
+HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC) += sys/eventfd.h sys/fsuid.h \
+ bits/inotify.h \
+ sys/inotify.h \
+ sys/kdaemon.h \
+ sys/perm.h \
sys/personality.h \
sys/prctl.h \
sys/reboot.h \
sys/swap.h \
sys/sysctl.h \
sys/sysinfo.h \
+ bits/timerfd.h \
+ sys/timerfd.h \
sys/vfs.h
HEADERS_RM-$(UCLIBC_SUPPORT_AI_ADDRCONFIG) += ifaddrs.h
HEADERS_RM-$(UCLIBC_SV4_DEPRECATED) += ustat.h sys/ustat.h bits/ustat.h
HEADERS_RM-$(UCLIBC_SUSV3_LEGACY) += sys/timeb.h regexp.h
HEADERS_RM-$(UCLIBC_SUSV4_LEGACY) += utime.h ucontext.h
+HEADERS_RM-$(UCLIBC_HAS_ADVANCED_REALTIME) += spawn.h
ifneq ($(findstring install,$(MAKECMDGOALS)),)
$(addprefix $(PREFIX)$(DEVEL_PREFIX),include $(MULTILIB_DIR)):
-e 's:$(SHARED_LIBNAME):$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(SHARED_LIBNAME):' \
-e 's:$(UCLIBC_LDSO):$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(UCLIBC_LDSO):' \
$(top_builddir)lib/libc.so > $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \
+ $(SED) -i -e 's://:/:g' $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \
fi
else
-$(INSTALL) -m 755 $(top_builddir)lib/libc.so $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
endif
ifeq ($(UCLIBC_HAS_BACKTRACE),y)
# Add the AS_NEEDED entry for libubacktrace.so
- if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(SHARED_MAJORNAME) ] ; then \
+ if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(SHARED_LIBNAME) ] ; then \
echo "GROUP ( $(UBACKTRACE_ASNEEDED) )" >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \
fi
endif
cp $(top_srcdir)extra/scripts/format.lds $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread.so; \
echo "GROUP ( $(RUNTIME_PREFIX)$(MULTILIB_DIR)/libpthread.so.$(ABI_VERSION) $(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread_nonshared.a )" \
>> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread.so; \
+ $(SED) -i -e 's://:/:g' $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread.so; \
fi
else
-$(INSTALL) -m 755 $(top_builddir)lib/libpthread.so $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
ifeq ($(HAVE_SHARED),y)
$(INSTALL) -m 755 $(top_builddir)lib/lib*-$(VERSION).so \
$(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)
- (cd $(top_builddir)lib && $(TAR) -cf - *.so.*) | $(TAR) -xf - -C $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)
+ (cd $(top_builddir)lib && $(TAR) --exclude=$(UCLIBC_LDSO_NAME).so.lds -cf - *.so.*) \
+ | $(TAR) -xf - -C $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)
@if [ -x $(top_builddir)lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so ] ; then \
set -e; \
$(SHELL_SET_X); \
endif
utils: | pregen
- $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils $@
+ $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" -C utils $@
# Installs helper applications, such as 'ldd' and 'ldconfig'
install_utils: utils
- $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install
+ $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" -C utils utils_install
endif # ifeq ($(HAVE_DOT_CONFIG),y)
hostutils: | pregen
- $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils $@
+ $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils $@
install_hostutils: hostutils
- $(Q)$(MAKE) CROSS="$(CROSS)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils utils_install
+ $(Q)$(MAKE) CROSS_COMPILE="$(CROSS_COMPILE)" CC="$(CC)" HOSTCC="$(HOSTCC)" DOTHOST=.host -C utils utils_install
$(addprefix $(top_builddir),include include/bits include/sys include/config lib extra/config/lxdialog extra/locale extra/scripts $(subdirs)):
$(do_mkdir)
# configuration
# ---------------------------------------------------------------------------
-$(top_builddir)extra/config/conf $(top_builddir)extra/config/mconf: | $(top_builddir)include/config $(top_builddir)extra/config/lxdialog
+$(conf) $(mconf): | $(top_builddir)include/config $(top_builddir)extra/config/lxdialog
$(Q)$(MAKE) -C extra/config $(@F)
-menuconfig: $(top_builddir)extra/config/mconf
- $(Q)$(top_builddir)extra/config/mconf extra/Configs/Config.in
+arch-defconfigs := $(notdir $(wildcard $(top_srcdir)extra/Configs/defconfigs/$(ARCH)/*_defconfig))
+
+menuconfig: $(mconf)
+ $(Q)$< extra/Configs/Config.in
-config: $(top_builddir)extra/config/conf
- $(Q)$(top_builddir)extra/config/conf extra/Configs/Config.in
+config: $(conf)
+ $(Q)$< extra/Configs/Config.in
-oldconfig: $(top_builddir)extra/config/conf
- $(Q)$(top_builddir)extra/config/conf -o extra/Configs/Config.in
+oldconfig: $(conf)
+ $(Q)$< -o extra/Configs/Config.in
-silentoldconfig: $(top_builddir)extra/config/conf
- $(Q)$(top_builddir)extra/config/conf -s extra/Configs/Config.in
+silentoldconfig: $(conf)
+ $(Q)$< -s extra/Configs/Config.in
-randconfig: $(top_builddir)extra/config/conf
- $(Q)$(top_builddir)extra/config/conf -r extra/Configs/Config.in
+randconfig: $(conf)
+ $(Q)$< -r extra/Configs/Config.in
-allyesconfig: $(top_builddir)extra/config/conf
- $(Q)$(top_builddir)extra/config/conf -y extra/Configs/Config.in
+allyesconfig: $(conf)
+ $(Q)$< -y extra/Configs/Config.in
$(SED) -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" \
-e "s/^DOASSERTS=.*/# DOASSERTS is not set/" \
-e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" \
-e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" \
-e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" \
$(KCONFIG_CONFIG)
- $(Q)$(top_builddir)extra/config/conf -o extra/Configs/Config.in
+ $(Q)$< -o extra/Configs/Config.in
-allnoconfig: $(top_builddir)extra/config/conf
- $(Q)$(top_builddir)extra/config/conf -n extra/Configs/Config.in
+allnoconfig: $(conf)
+ $(Q)$< -n extra/Configs/Config.in
-defconfig: $(top_builddir)extra/config/conf
- $(Q)$(top_builddir)extra/config/conf -d extra/Configs/Config.in \
- -D extra/Configs/defconfigs/$(ARCH)
+cmd_defconfig = $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ extra/Configs/Config.in
+defconfig: $(conf) ; $(cmd_defconfig)
+%_defconfig: $(conf) ; $(cmd_defconfig)
menuconfig-clean-y:
$(Q)$(MAKE) -C extra/config CLEAN_extra/config
+# The find here should continue to work as long as we are only symlinking
+# headers in to include/. I don't see this changing to anything else, so
+# it should be fine.
include_clean:
- $(Q)$(RM) $(top_builddir)include/fpu_control.h $(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h
- @set -e; \
- for i in `(cd libc/sysdeps/linux/common/sys; ls *.h)` ; do \
- $(RM) $(top_builddir)include/sys/$$i; \
- done; \
- if [ -d libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \
- for i in `(cd libc/sysdeps/linux/$(TARGET_ARCH)/sys; ls *.h)` ; do \
- $(RM) $(top_builddir)include/sys/$$i; \
- done; \
- fi
+ $(SECHO) " CLEAN include"
+ $(Q)$(RM) -r $(top_builddir)include/bits
+ $(Q)find $(top_builddir)include/ -type l -exec rm -f {} +
clean: include_clean
- $(Q)$(RM) -r $(top_builddir)lib $(top_builddir)include/bits
+ $(Q)$(RM) -r $(top_builddir)lib
@$(MAKE) -C utils CLEAN_utils
+$(MAKE) -s -C test clean
- @$(RM) $(top_builddir)include/linux $(top_builddir)include/asm*
$(Q)$(RM) $(top_builddir)extra/scripts/unifdef
$(Q)$(RM) -r $(LOCAL_INSTALL_PATH)