CFLAGS-utils := \
$(SSP_ALL_CFLAGS) \
+ -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
-I$(top_srcdir)ldso/include \
-DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
- -DUCLIBC_LDSO=$(UCLIBC_LDSO) \
+ -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \
-I$(top_srcdir)/$(KERNEL_HEADERS) \
-DNOT_IN_libc \
-B$(top_builddir)lib \
# Need CFLAGS-utils explicitly, because the source file is not located in utils
CFLAGS-iconv := $(CFLAGS-utils) \
$(CFLAGS-utils-shared) \
- -I$(top_srcdir)libc/misc/wchar \
- -DL_iconv_main \
+ -I$(top_srcdir)libc/misc/wchar
CFLAGS-locale := $(CFLAGS-utils)
-
+CFLAGS-getconf :=$(CFLAGS-utils) \
+ -DGETCONF_DIR='"$(CURDIR)"'
# "make hostutils" flags
-ifeq ($(LDSO_CACHE_SUPPORT),y)
-LDSO_CACHE_SUPPORT := -D__LDSO_CACHE_SUPPORT__=1
-endif
+UTILS_CONFIG_FLAGS-y :=
+UTILS_CONFIG_FLAGS-$(LDSO_CACHE_SUPPORT) += -D__LDSO_CACHE_SUPPORT__
+UTILS_CONFIG_FLAGS-$(LDSO_LDD_SUPPORT) += -D__LDSO_LDD_SUPPORT__
+UTILS_CONFIG_FLAGS-$(LDSO_STANDALONE_SUPPORT) += -D__LDSO_STANDALONE_SUPPORT__
BUILD_CFLAGS-utils := \
-DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
- -DUCLIBC_LDSO=$(UCLIBC_LDSO) \
- $(LDSO_CACHE_SUPPORT)
-BUILD_CFLAGS-ldconfig.host := $(BUILD_CFLAGS-utils) \
+ -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \
+ $(UTILS_CONFIG_FLAGS-y)
+BUILD_CFLAGS-ldconfig.host := \
-DBUILDING_LINKAGE \
+ -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
-I$(top_srcdir)ldso/include
-BUILD_CFLAGS-ldd.host := $(BUILD_CFLAGS-utils) \
+BUILD_CFLAGS-ldd.host := \
-DBUILDING_LINKAGE \
+ -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \
-I$(top_srcdir)ldso/include \
-include $(top_srcdir)include/elf.h
-BUILD_CFLAGS-locale.host := $(BUILD_CFLAGS-utils) \
+BUILD_CFLAGS-locale.host := \
-DNOT_IN_libc \
-I$(top_srcdir)utils/ \
-I.
-BUILD_CFLAGS-iconv.host := $(BUILD_CFLAGS-utils) \
+BUILD_CFLAGS-iconv.host := \
-include $(top_builddir)extra/locale/c8tables.h \
-I$(top_srcdir)libc/misc/wchar -DL_iconv_main
+BUILD_CFLAGS-getconf.host := \
+ -DGETCONF_DIR='"$(CURDIR)"'
# Rules
DEPS-ldconfig := $(utils_DIR)/chroot_realpath.c
DEPS-ldconfig.host := $(DEPS-ldconfig)
+utils_OBJ := getconf
ifeq ($(HAVE_SHARED),y)
utils_OBJ += ldconfig ldd
endif
# This installs both utils and hostutils, so doesn't depend on either.
utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ))
+ $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/getconf
ifeq ($(HAVE_SHARED),y)
$(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd
$(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig
objclean-y += CLEAN_utils
CLEAN_utils:
- $(do_rm) $(addprefix $(utils_OUT)/, ldconfig ldd iconv locale *.host)
+ $(do_rm) $(addprefix $(utils_OUT)/, getconf iconv ldconfig ldd locale *.host)
$(Q)# This is a hack..
$(Q)$(RM) $(utils_OUT)/.*.dep