ifeq ($(HAVE_DOT_CONFIG),y)
-all: pregen libs
+all: pregen libs startfiles
libs: pregen
# In this section, we need .config
endif # ifeq ($(HAVE_DOT_CONFIG),y)
+include $(top_srcdir)extra/locale/Makefile.in
include $(top_srcdir)ldso/Makefile.in
include $(top_srcdir)libcrypt/Makefile.in
include $(top_srcdir)libintl/Makefile.in
include $(top_srcdir)libpthread/Makefile.in
include $(top_srcdir)librt/Makefile.in
include $(top_srcdir)libubacktrace/Makefile.in
-include $(top_srcdir)extra/locale/Makefile.in
# 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
+nconf := $(top_builddir)extra/config/nconf
ifeq ($(HAVE_DOT_CONFIG),y)
# If the .config changes then we have to make sure that our includes are
# 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: $(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
@$(disp_gen)
- $(Q)$< -s $(top_srcdir)extra/Configs/Config.in
- $(Q)$(top_srcdir)extra/scripts/conf-header.sh $(KCONFIG_CONFIG) > $@
+ $(Q)$< -s $(Kconfig)
+ $(Q)$(top_srcdir)extra/scripts/conf-header.sh $(KCONFIG_CONFIG) > $@.tmp
$(Q)$(MAKE) headers-y
+ $(Q)mv $@.tmp $@
# The above doesn't work for threads, though. Just using check-symlinks for now.
# XXX: FIXME: this is ugly
$(top_builddir)include/config/linuxthreads/old.h $(top_builddir)include/config/linuxthreads/new.h:
@true
+$(top_builddir)include/generated/unifdef_config.h: $(top_builddir)include/bits/uClibc_config.h | $(top_builddir)include/generated
+ @$(disp_gen)
+ $(Q)$(SED) -e '1,3d' $^ > $@
+
# For the moment, we have to keep re-running this target
# because the fix includes scripts rely on pre-processers
# in order to generate the headers correctly :(. That
$(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/sys/$(@F) $@
endif
-$(target-headers-sysdep) $(pregen-headers-y): | $(top_builddir)include/bits $(top_builddir)include/sys
+$(target-headers-sysdep) $(pregen-headers-y): | $(top_builddir)include/bits $(top_builddir)include/sys $(top_builddir)include/bits/sysnum.h
HEADERCLEAN_common:
$(do_rm) $(ALL_HEADERS_COMMON)
headers_clean-y += HEADERCLEAN_common
+HEADERCLEAN_config:
+ $(do_rm) -r $(addprefix $(top_builddir)include/,config generated)
+menuconfig-clean-y: HEADERCLEAN_config
# The headers. Arch specific headers are specified via ARCH_HEADERS in
# libc/sysdeps/linux/$(TARGET_ARCH)/Makefile.arch which appends those via
headers-y += $(target-headers-sysdep)
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: headers pregen-headers
$(Q)$(if $(UCLIBC_HAS_LOCALE),$(MAKE) -C extra/locale locale_headers)
+subdirs: $(addprefix $(top_builddir),$(subdirs))
+
+$(pregen-headers-y): $(headers_dep)
+pregen: headers $(pregen-headers-y) $(headers_dep)
+
$(top_builddir)include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh | $(top_builddir)include/bits
@$(disp_gen)
$(Q)set -e; \
RUNTIME_PREFIX_LIB_FROM_DEVEL_PREFIX_LIB=$(shell $(top_srcdir)extra/scripts/relative_path.sh $(DEVEL_PREFIX)$(MULTILIB_DIR) $(RUNTIME_PREFIX)$(MULTILIB_DIR))
-startfiles: $(crt-y)
-
$(top_builddir)extra/scripts/unifdef: |$(top_builddir)extra/scripts
$(top_builddir)extra/scripts/unifdef: $(top_srcdir)extra/scripts/unifdef.c
$(hcompile.u)
# a "y" here means the feature is enabled and so we should *not* rm it.
# if the option expands to nothing though, we can punt the headers.
HEADERS_RM- := \
+ config \
+ generated \
internal \
cancel.h \
dl-osinfo.h \
bits/uClibc_va_copy.h \
bits/sigcontextinfo.h \
bits/stackinfo.h \
+ atomic.h \
+ bits/atomic.h \
tls.h \
rpc/des_crypt.h \
rpc/key_prot.h \
HEADERS_RM-$(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF) += printf.h
HEADERS_RM-$(UCLIBC_HAS_GLOB) += glob.h
HEADERS_RM-$(UCLIBC_HAS_GNU_ERROR) += error.h
-HEADERS_RM-$(UCLIBC_HAS_GNU_GETOPT)$(UCLIBC_HAS_GETOPT_LONG) += getopt.h
+HEADERS_RM-$(UCLIBC_HAS_GETOPT_LONG) += getopt.h
HEADERS_RM-$(UCLIBC_HAS_IPV6) += netinet/ip6.h netinet/icmp6.h
HEADERS_RM-$(UCLIBC_HAS_BACKTRACE) += execinfo.h
HEADERS_RM-$(UCLIBC_HAS_LOCALE) += iconv.h bits/uClibc_ctype.h
bits/initspin.h
HEADERS_RM-$(UCLIBC_HAS_THREADS_NATIVE) += atomic.h bits/atomic.h
HEADERS_RM-$(UCLIBC_HAS_OBSTACK) += obstack.h
+HEADERS_RM-$(UCLIBC_HAS_UTMP) += bits/utmp.h utmp.h
HEADERS_RM-$(UCLIBC_HAS_UTMPX) += bits/utmpx.h utmpx.h
HEADERS_RM-$(UCLIBC_HAS_WCHAR) += wchar.h wctype.h
HEADERS_RM-$(UCLIBC_HAS_WORDEXP) += wordexp.h
sys/perm.h \
sys/personality.h \
sys/prctl.h \
+ sys/random.h \
sys/reboot.h \
sys/sendfile.h \
bits/signalfd.h \
$(do_mkdir)
endif
endif
-install_headers: headers $(top_builddir)extra/scripts/unifdef | $(PREFIX)$(DEVEL_PREFIX)include
+
+
+install_headers: headers $(top_builddir)extra/scripts/unifdef $(top_builddir)include/generated/unifdef_config.h | $(PREFIX)$(DEVEL_PREFIX)include
@$(call disp_install,"include -> $(PREFIX)$(DEVEL_PREFIX)include")
$(Q)top_builddir=$(top_builddir) \
$(top_srcdir)extra/scripts/install_headers.sh \
endif
echo "$(UBACKTRACE_ASNEEDED)" >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so
ifeq ($(UCLIBC_HAS_THREADS),y)
-ifneq ($(LINUXTHREADS_OLD),y)
+ifneq ($(UCLIBC_HAS_LINUXTHREADS),y)
ifeq ($(HARDWIRED_ABSPATH),y)
if [ -f $(top_builddir)lib/libpthread.so -a -f $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)/libpthread.so.$(ABI_VERSION) ] ; then \
$(RM) $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libpthread.so; \
install_hostutils: hostutils
$(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)):
+$(addprefix $(top_builddir),include include/bits include/sys include/config include/generated lib extra/config/lxdialog extra/locale extra/scripts $(subdirs)):
$(do_mkdir)
# configuration
# ---------------------------------------------------------------------------
-$(conf) $(mconf): | $(top_builddir)include/config $(top_builddir)extra/config/lxdialog
+$(conf) $(mconf) $(nconf): | $(top_builddir)include/config $(top_builddir)include/generated $(top_builddir)extra/config/lxdialog
$(Q)$(MAKE) -C extra/config $(@F)
arch-defconfigs := $(notdir $(wildcard $(top_srcdir)extra/Configs/defconfigs/$(ARCH)/*_defconfig))
menuconfig: $(mconf)
- $(Q)$< extra/Configs/Config.in
-
+ $(Q)$< $(Kconfig)
config: $(conf)
- $(Q)$< extra/Configs/Config.in
-
-oldconfig: $(conf)
- $(Q)$< -o extra/Configs/Config.in
+ $(Q)$< $(Kconfig)
+nconfig: $(nconf)
+ $(Q)$< $(Kconfig)
+oldaskconfig: $(conf)
+ $(Q)$< -a $(Kconfig)
silentoldconfig: $(conf)
- $(Q)$< -s extra/Configs/Config.in
-
-randconfig: $(conf)
- $(Q)$< -r extra/Configs/Config.in
-
+ $(Q)$< -s $(Kconfig)
+oldconfig: $(conf)
+ $(Q)$< -o $(Kconfig)
+allnoconfig: $(conf)
+ $(Q)$< -n $(Kconfig)
allyesconfig: $(conf)
- $(Q)$< -y extra/Configs/Config.in
+ $(Q)$< -y $(Kconfig)
$(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)$< -o extra/Configs/Config.in
-
-allnoconfig: $(conf)
- $(Q)$< -n extra/Configs/Config.in
+ $(Q)$< -o $(Kconfig)
+alldefconfig: $(conf)
+ $(Q)$< -A $(Kconfig)
+randconfig: $(conf)
+ $(Q)$< -r $(Kconfig)
-cmd_defconfig = $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ extra/Configs/Config.in
+cmd_defconfig = $(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ $(Kconfig)
defconfig: $(conf) ; $(cmd_defconfig)
%_defconfig: $(conf) ; $(cmd_defconfig)
+savedefconfig: $(conf)
+ $(Q)$< -S defconfig $(Kconfig)
+listnewconfig: $(conf)
+ $(Q)$< -l $(Kconfig)
+olddefconfig: $(conf)
+ $(Q)$< -d $(Kconfig)
+
menuconfig-clean-y:
$(Q)$(MAKE) -C extra/config CLEAN_extra/config
test check: test_compile
$(Q)$(MAKE) -C test \
- KCONFIG_CONFIG=$(__ABS_KCONFIG_CONFIG) \
$(if $(O),top_builddir=$(O)/)
test_compile: $(LOCAL_INSTALL_PATH)
$(Q)$(MAKE) -C test compile \
- KCONFIG_CONFIG=$(__ABS_KCONFIG_CONFIG) \
+ $(if $(O),top_builddir=$(O)/)
+
+test_gen: $(LOCAL_INSTALL_PATH)
+ $(Q)$(MAKE) -C test gen \
$(if $(O),top_builddir=$(O)/)