diff options
Diffstat (limited to 'libc/misc')
-rw-r--r-- | libc/misc/assert/Makefile.in | 6 | ||||
-rw-r--r-- | libc/misc/ctype/Makefile.in | 22 | ||||
-rw-r--r-- | libc/misc/dirent/Makefile.in | 16 | ||||
-rw-r--r-- | libc/misc/error/Makefile.in | 14 | ||||
-rw-r--r-- | libc/misc/file/Makefile.in | 10 | ||||
-rw-r--r-- | libc/misc/fnmatch/Makefile.in | 10 | ||||
-rw-r--r-- | libc/misc/fts/Makefile.in | 6 | ||||
-rw-r--r-- | libc/misc/ftw/Makefile.in | 10 | ||||
-rw-r--r-- | libc/misc/glob/Makefile.in | 18 | ||||
-rw-r--r-- | libc/misc/gnu/Makefile.in | 7 | ||||
-rw-r--r-- | libc/misc/internals/Makefile.in | 6 | ||||
-rw-r--r-- | libc/misc/locale/Makefile.in | 15 | ||||
-rw-r--r-- | libc/misc/mntent/Makefile.in | 6 | ||||
-rw-r--r-- | libc/misc/regex/Makefile.in | 11 | ||||
-rw-r--r-- | libc/misc/search/Makefile.in | 14 | ||||
-rw-r--r-- | libc/misc/statfs/Makefile.in | 15 | ||||
-rw-r--r-- | libc/misc/syslog/Makefile.in | 6 | ||||
-rw-r--r-- | libc/misc/sysvipc/Makefile.in | 12 | ||||
-rw-r--r-- | libc/misc/time/Makefile.in | 29 | ||||
-rw-r--r-- | libc/misc/ttyent/Makefile.in | 6 | ||||
-rw-r--r-- | libc/misc/utmp/Makefile.in | 11 | ||||
-rw-r--r-- | libc/misc/wchar/Makefile.in | 10 | ||||
-rw-r--r-- | libc/misc/wctype/Makefile.in | 14 | ||||
-rw-r--r-- | libc/misc/wordexp/Makefile.in | 6 |
24 files changed, 115 insertions, 165 deletions
diff --git a/libc/misc/assert/Makefile.in b/libc/misc/assert/Makefile.in index a49e00d2e..aba8a3b8d 100644 --- a/libc/misc/assert/Makefile.in +++ b/libc/misc/assert/Makefile.in @@ -7,13 +7,13 @@ subdirs += libc/misc/assert -CSRC := __assert.c +CSRC-y := __assert.c MISC_ASSERT_DIR := $(top_srcdir)libc/misc/assert MISC_ASSERT_OUT := $(top_builddir)libc/misc/assert -MISC_ASSERT_SRC := $(MISC_ASSERT_DIR)/__assert.c -MISC_ASSERT_OBJ := $(MISC_ASSERT_OUT)/__assert.o +MISC_ASSERT_SRC := $(patsubst %.c,$(MISC_ASSERT_DIR)/%.c,$(CSRC-y)) +MISC_ASSERT_OBJ := $(patsubst %.c,$(MISC_ASSERT_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_ASSERT_OBJ) diff --git a/libc/misc/ctype/Makefile.in b/libc/misc/ctype/Makefile.in index 125d91699..0ebaec285 100644 --- a/libc/misc/ctype/Makefile.in +++ b/libc/misc/ctype/Makefile.in @@ -8,31 +8,25 @@ subdirs += libc/misc/ctype # multi source ctype.c -COM_SRC := \ +COM_SRC-y := \ isalnum.c isalpha.c iscntrl.c isdigit.c \ isgraph.c islower.c isprint.c ispunct.c isspace.c \ isupper.c isxdigit.c tolower.c toupper.c \ isblank.c -ifeq ($(UCLIBC_SUSV4_LEGACY),y) -COM_SRC += isascii.c toascii.c -endif -CSRC := $(COM_SRC) +COM_SRC-$(UCLIBC_SUSV4_LEGACY) += isascii.c toascii.c +CSRC-y := $(COM_SRC-y) -ifeq ($(UCLIBC_HAS_CTYPE_TABLES),y) -CSRC += __C_ctype_b.c __C_ctype_tolower.c __C_ctype_toupper.c \ +CSRC-$(UCLIBC_HAS_CTYPE_TABLES) += \ + __C_ctype_b.c __C_ctype_tolower.c __C_ctype_toupper.c \ __ctype_b_loc.c __ctype_tolower_loc.c __ctype_toupper_loc.c \ __ctype_assert.c isctype.c -endif - -ifeq ($(UCLIBC_HAS_XLOCALE),y) -CSRC += $(patsubst %.c,%_l.c,$(COM_SRC)) -endif +CSRC-$(UCLIBC_HAS_XLOCALE) += $(patsubst %.c,%_l.c,$(COM_SRC-y)) MISC_CTYPE_DIR := $(top_srcdir)libc/misc/ctype MISC_CTYPE_OUT := $(top_builddir)libc/misc/ctype -MISC_CTYPE_SRC := $(patsubst %.c,$(MISC_CTYPE_DIR)/%.c,$(CSRC)) -MISC_CTYPE_OBJ := $(patsubst %.c,$(MISC_CTYPE_OUT)/%.o,$(CSRC)) +MISC_CTYPE_SRC := $(patsubst %.c,$(MISC_CTYPE_DIR)/%.c,$(CSRC-y)) +MISC_CTYPE_OBJ := $(patsubst %.c,$(MISC_CTYPE_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_CTYPE_OBJ) diff --git a/libc/misc/dirent/Makefile.in b/libc/misc/dirent/Makefile.in index d42dfeb1e..5cae8d44d 100644 --- a/libc/misc/dirent/Makefile.in +++ b/libc/misc/dirent/Makefile.in @@ -7,18 +7,18 @@ subdirs += libc/misc/dirent -CSRC := alphasort.c closedir.c dirfd.c opendir.c readdir.c rewinddir.c \ - scandir.c seekdir.c telldir.c readdir_r.c versionsort.c - -ifeq ($(UCLIBC_HAS_LFS),y) -CSRC += readdir64.c alphasort64.c scandir64.c readdir64_r.c versionsort64.c -endif +CSRC := alphasort.c readdir.c scandir.c versionsort.c +CSRC_R := readdir_r.c +CSRC-y := closedir.c dirfd.c opendir.c rewinddir.c seekdir.c telldir.c $(CSRC) \ + $(CSRC_R) +CSRC-$(UCLIBC_HAS_LFS) += $(patsubst %.c,%64.c,$(CSRC)) +CSRC-$(UCLIBC_HAS_LFS) += $(patsubst %_r.c,%64_r.c,$(CSRC_R)) MISC_DIRENT_DIR := $(top_srcdir)libc/misc/dirent MISC_DIRENT_OUT := $(top_builddir)libc/misc/dirent -MISC_DIRENT_SRC := $(patsubst %.c,$(MISC_DIRENT_DIR)/%.c,$(CSRC)) -MISC_DIRENT_OBJ := $(patsubst %.c,$(MISC_DIRENT_OUT)/%.o,$(CSRC)) +MISC_DIRENT_SRC := $(patsubst %.c,$(MISC_DIRENT_DIR)/%.c,$(CSRC-y)) +MISC_DIRENT_OBJ := $(patsubst %.c,$(MISC_DIRENT_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_DIRENT_OBJ) diff --git a/libc/misc/error/Makefile.in b/libc/misc/error/Makefile.in index b76a0dfff..fa959c131 100644 --- a/libc/misc/error/Makefile.in +++ b/libc/misc/error/Makefile.in @@ -7,19 +7,15 @@ subdirs += libc/misc/error -CSRC := -ifeq ($(UCLIBC_HAS_BSD_ERR),y) -CSRC += err.c -endif -ifeq ($(UCLIBC_HAS_GNU_ERROR),y) -CSRC += error.c -endif +CSRC-y := +CSRC-$(UCLIBC_HAS_BSD_ERR) += err.c +CSRC-$(UCLIBC_HAS_GNU_ERROR) += error.c MISC_ERROR_DIR := $(top_srcdir)libc/misc/error MISC_ERROR_OUT := $(top_builddir)libc/misc/error -MISC_ERROR_SRC := $(patsubst %.c,$(MISC_ERROR_DIR)/%.c,$(CSRC)) -MISC_ERROR_OBJ := $(patsubst %.c,$(MISC_ERROR_OUT)/%.o,$(CSRC)) +MISC_ERROR_SRC := $(patsubst %.c,$(MISC_ERROR_DIR)/%.c,$(CSRC-y)) +MISC_ERROR_OBJ := $(patsubst %.c,$(MISC_ERROR_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_ERROR_OBJ) diff --git a/libc/misc/file/Makefile.in b/libc/misc/file/Makefile.in index ace9db060..b94efa67f 100644 --- a/libc/misc/file/Makefile.in +++ b/libc/misc/file/Makefile.in @@ -10,12 +10,12 @@ subdirs += libc/misc/file MISC_FILE_DIR := $(top_srcdir)libc/misc/file MISC_FILE_OUT := $(top_builddir)libc/misc/file -MISC_FILE_SRC := $(wildcard $(MISC_FILE_DIR)/*.c) -ifneq ($(UCLIBC_HAS_LFS),y) -MISC_FILE_SRC := $(filter-out $(MISC_FILE_DIR)/lockf64.c,$(MISC_FILE_SRC)) -endif -MISC_FILE_OBJ := $(patsubst $(MISC_FILE_DIR)/%.c,$(MISC_FILE_OUT)/%.o,$(MISC_FILE_SRC)) +CSRC-y := $(wildcard $(MISC_FILE_DIR)/*.c) +CSRC_LFS := $(wildcard $(MISC_FILE_DIR)/*64.c) +CSRC-y := $(filter-out $(CSRC_LFS),$(CSRC-y)) +CSRC-$(UCLIBC_HAS_LFS) += $(CSRC_LFS) +MISC_FILE_OBJ := $(patsubst $(MISC_FILE_DIR)/%.c,$(MISC_FILE_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_FILE_OBJ) libc-nomulti-$(UCLIBC_HAS_LFS) += $(MISC_FILE_OUT)/lockf64.o diff --git a/libc/misc/fnmatch/Makefile.in b/libc/misc/fnmatch/Makefile.in index 2557b5aa7..ab43e00f1 100644 --- a/libc/misc/fnmatch/Makefile.in +++ b/libc/misc/fnmatch/Makefile.in @@ -7,17 +7,13 @@ subdirs += libc/misc/fnmatch -ifeq ($(UCLIBC_HAS_FNMATCH_OLD),y) -CSRC := fnmatch_old.c -else -CSRC := fnmatch.c -endif +CSRC-y := $(if $(UCLIBC_HAS_FNMATCH_OLD),fnmatch_old.c,fnmatch.c) MISC_FNMATCH_DIR := $(top_srcdir)libc/misc/fnmatch MISC_FNMATCH_OUT := $(top_builddir)libc/misc/fnmatch -MISC_FNMATCH_SRC := $(patsubst %.c,$(MISC_FNMATCH_DIR)/%.c,$(CSRC)) -MISC_FNMATCH_OBJ := $(patsubst %.c,$(MISC_FNMATCH_OUT)/%.o,$(CSRC)) +MISC_FNMATCH_SRC := $(patsubst %.c,$(MISC_FNMATCH_DIR)/%.c,$(CSRC-y)) +MISC_FNMATCH_OBJ := $(patsubst %.c,$(MISC_FNMATCH_OUT)/%.o,$(CSRC-y)) libc-$(UCLIBC_HAS_FNMATCH) += $(MISC_FNMATCH_OBJ) diff --git a/libc/misc/fts/Makefile.in b/libc/misc/fts/Makefile.in index a1d0efa32..aa87d993a 100644 --- a/libc/misc/fts/Makefile.in +++ b/libc/misc/fts/Makefile.in @@ -7,13 +7,13 @@ # subdirs += libc/misc/fts -CSRC := fts.c +CSRC-y := fts.c MISC_FTS_DIR := $(top_srcdir)libc/misc/fts MISC_FTS_OUT := $(top_builddir)libc/misc/fts -MISC_FTS_SRC := $(patsubst %.c,$(MISC_FTS_DIR)/%.c,$(CSRC)) -MISC_FTS_OBJ := $(patsubst %.c,$(MISC_FTS_OUT)/%.o,$(CSRC)) +MISC_FTS_SRC := $(patsubst %.c,$(MISC_FTS_DIR)/%.c,$(CSRC-y)) +MISC_FTS_OBJ := $(patsubst %.c,$(MISC_FTS_OUT)/%.o,$(CSRC-y)) libc-$(UCLIBC_HAS_FTS) += $(MISC_FTS_OBJ) diff --git a/libc/misc/ftw/Makefile.in b/libc/misc/ftw/Makefile.in index 2edd81959..084a73009 100644 --- a/libc/misc/ftw/Makefile.in +++ b/libc/misc/ftw/Makefile.in @@ -7,16 +7,14 @@ subdirs += libc/misc/ftw -CSRC := ftw.c -ifeq ($(UCLIBC_HAS_LFS),y) -CSRC += ftw64.c -endif +CSRC-y := ftw.c +CSRC-$(UCLIBC_HAS_LFS) += ftw64.c MISC_FTW_DIR := $(top_srcdir)libc/misc/ftw MISC_FTW_OUT := $(top_builddir)libc/misc/ftw -MISC_FTW_SRC := $(patsubst %.c,$(MISC_FTW_DIR)/%.c,$(CSRC)) -MISC_FTW_OBJ := $(patsubst %.c,$(MISC_FTW_OUT)/%.o,$(CSRC)) +MISC_FTW_SRC := $(patsubst %.c,$(MISC_FTW_DIR)/%.c,$(CSRC-y)) +MISC_FTW_OBJ := $(patsubst %.c,$(MISC_FTW_OUT)/%.o,$(CSRC-y)) libc-$(findstring y,$(UCLIBC_HAS_FTW)$(UCLIBC_HAS_NFTW)) += $(MISC_FTW_OBJ) diff --git a/libc/misc/glob/Makefile.in b/libc/misc/glob/Makefile.in index 03bfcca36..c89d2b08d 100644 --- a/libc/misc/glob/Makefile.in +++ b/libc/misc/glob/Makefile.in @@ -7,23 +7,15 @@ subdirs += libc/misc/glob -ifeq ($(UCLIBC_HAS_GNU_GLOB),y) -CSRC := glob.c -ifeq ($(UCLIBC_HAS_LFS),y) -CSRC += glob64.c -endif -else -CSRC := glob-susv3.c -ifeq ($(UCLIBC_HAS_LFS),y) -CSRC += glob64-susv3.c -endif -endif +VARIANT := $(if $(UCLIBC_HAS_GNU_GLOB),,-susv3) +CSRC-y := glob$(VARIANT).c +CSRC-$(UCLIBC_HAS_LFS) += glob64$(VARIANT).c MISC_GLOB_DIR := $(top_srcdir)libc/misc/glob MISC_GLOB_OUT := $(top_builddir)libc/misc/glob -MISC_GLOB_SRC := $(patsubst %.c,$(MISC_GLOB_DIR)/%.c,$(CSRC)) -MISC_GLOB_OBJ := $(patsubst %.c,$(MISC_GLOB_OUT)/%.o,$(CSRC)) +MISC_GLOB_SRC := $(patsubst %.c,$(MISC_GLOB_DIR)/%.c,$(CSRC-y)) +MISC_GLOB_OBJ := $(patsubst %.c,$(MISC_GLOB_OUT)/%.o,$(CSRC-y)) libc-$(UCLIBC_HAS_GLOB) += $(MISC_GLOB_OBJ) diff --git a/libc/misc/gnu/Makefile.in b/libc/misc/gnu/Makefile.in index 3990e4e8b..579cb01bc 100644 --- a/libc/misc/gnu/Makefile.in +++ b/libc/misc/gnu/Makefile.in @@ -7,13 +7,14 @@ subdirs += libc/misc/gnu -CSRC := obstack.c +$(warning XXX: add UCLIBC_HAS_OBSTACK) +CSRC-y := obstack.c MISC_GNU_DIR := $(top_srcdir)libc/misc/gnu MISC_GNU_OUT := $(top_builddir)libc/misc/gnu -MISC_GNU_SRC := $(MISC_GNU_DIR)/obstack.c -MISC_GNU_OBJ := $(MISC_GNU_OUT)/obstack.o +MISC_GNU_SRC := $(patsubst %.c,$(MISC_GNU_DIR)/%.c,$(CSRC-y)) +MISC_GNU_OBJ := $(patsubst %.c,$(MISC_GNU_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_GNU_OBJ) diff --git a/libc/misc/internals/Makefile.in b/libc/misc/internals/Makefile.in index 2123bbb76..ae094ee23 100644 --- a/libc/misc/internals/Makefile.in +++ b/libc/misc/internals/Makefile.in @@ -7,14 +7,14 @@ subdirs += libc/misc/internals -CSRC := tempname.c errno.c h_errno.c __errno_location.c __h_errno_location.c \ +CSRC-y := tempname.c errno.c h_errno.c __errno_location.c __h_errno_location.c \ parse_config.c MISC_INTERNALS_DIR := $(top_srcdir)libc/misc/internals MISC_INTERNALS_OUT := $(top_builddir)libc/misc/internals -MISC_INTERNALS_SRC := $(patsubst %.c,$(MISC_INTERNALS_DIR)/%.c,$(CSRC)) -MISC_INTERNALS_OBJ := $(patsubst %.c,$(MISC_INTERNALS_OUT)/%.o,$(CSRC)) +MISC_INTERNALS_SRC := $(patsubst %.c,$(MISC_INTERNALS_DIR)/%.c,$(CSRC-y)) +MISC_INTERNALS_OBJ := $(patsubst %.c,$(MISC_INTERNALS_OUT)/%.o,$(CSRC-y)) CFLAGS-__uClibc_main.c := $(SSP_DISABLE_FLAGS) diff --git a/libc/misc/locale/Makefile.in b/libc/misc/locale/Makefile.in index c12befd32..3db6d5c5c 100644 --- a/libc/misc/locale/Makefile.in +++ b/libc/misc/locale/Makefile.in @@ -8,19 +8,16 @@ subdirs += libc/misc/locale # multi source locale.c -CSRC := setlocale.c localeconv.c _locale_init.c nl_langinfo.c -ifeq ($(UCLIBC_HAS_LOCALE),y) -CSRC += newlocale.c __locale_mbrtowc_l.c -endif -ifeq ($(UCLIBC_HAS_XLOCALE),y) -CSRC += nl_langinfo_l.c duplocale.c freelocale.c uselocale.c __curlocale.c -endif +CSRC-y := setlocale.c localeconv.c _locale_init.c nl_langinfo.c +CSRC-$(UCLIBC_HAS_LOCALE) += newlocale.c __locale_mbrtowc_l.c +CSRC-$(UCLIBC_HAS_XLOCALE) += nl_langinfo_l.c duplocale.c freelocale.c \ + uselocale.c __curlocale.c MISC_LOCALE_DIR := $(top_srcdir)libc/misc/locale MISC_LOCALE_OUT := $(top_builddir)libc/misc/locale -MISC_LOCALE_SRC := $(patsubst %.c,$(MISC_LOCALE_DIR)/%.c,$(CSRC)) -MISC_LOCALE_OBJ := $(patsubst %.c,$(MISC_LOCALE_OUT)/%.o,$(CSRC)) +MISC_LOCALE_SRC := $(patsubst %.c,$(MISC_LOCALE_DIR)/%.c,$(CSRC-y)) +MISC_LOCALE_OBJ := $(patsubst %.c,$(MISC_LOCALE_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_LOCALE_OBJ) diff --git a/libc/misc/mntent/Makefile.in b/libc/misc/mntent/Makefile.in index daa888da0..3ced9bbd1 100644 --- a/libc/misc/mntent/Makefile.in +++ b/libc/misc/mntent/Makefile.in @@ -7,13 +7,13 @@ subdirs += libc/misc/mntent -CSRC := mntent.c +CSRC-y := mntent.c MISC_MNTENT_DIR := $(top_srcdir)libc/misc/mntent MISC_MNTENT_OUT := $(top_builddir)libc/misc/mntent -MISC_MNTENT_SRC := $(MISC_MNTENT_DIR)/mntent.c -MISC_MNTENT_OBJ := $(MISC_MNTENT_OUT)/mntent.o +MISC_MNTENT_SRC := $(patsubst %.c,$(MISC_MNTENT_DIR)/%.c,$(CSRC-y)) +MISC_MNTENT_OBJ := $(patsubst %.c,$(MISC_MNTENT_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_MNTENT_OBJ) diff --git a/libc/misc/regex/Makefile.in b/libc/misc/regex/Makefile.in index 94710238f..f95a9f7a3 100644 --- a/libc/misc/regex/Makefile.in +++ b/libc/misc/regex/Makefile.in @@ -7,17 +7,14 @@ subdirs += libc/misc/regex -ifeq ($(UCLIBC_HAS_REGEX_OLD),y) -CSRC := regex_old.c -else -CSRC := regex.c -endif +VARIANT := $(if $(UCLIBC_HAS_REGEX_OLD),_old) +CSRC-y := regex$(VARIANT).c MISC_REGEX_DIR := $(top_srcdir)libc/misc/regex MISC_REGEX_OUT := $(top_builddir)libc/misc/regex -MISC_REGEX_SRC := $(patsubst %.c,$(MISC_REGEX_DIR)/%.c,$(CSRC)) -MISC_REGEX_OBJ := $(patsubst %.c,$(MISC_REGEX_OUT)/%.o,$(CSRC)) +MISC_REGEX_SRC := $(patsubst %.c,$(MISC_REGEX_DIR)/%.c,$(CSRC-y)) +MISC_REGEX_OBJ := $(patsubst %.c,$(MISC_REGEX_OUT)/%.o,$(CSRC-y)) libc-$(UCLIBC_HAS_REGEX) += $(MISC_REGEX_OBJ) diff --git a/libc/misc/search/Makefile.in b/libc/misc/search/Makefile.in index 35dacb49b..d13766148 100644 --- a/libc/misc/search/Makefile.in +++ b/libc/misc/search/Makefile.in @@ -7,25 +7,25 @@ subdirs += libc/misc/search -CSRC := hsearch.c +CSRC-y := hsearch.c # multi source _tsearch.c -CSRC += tsearch.c tfind.c tdelete.c twalk.c tdestroy.c +CSRC-y += tsearch.c tfind.c tdelete.c twalk.c tdestroy.c # multi source _lsearch.c -CSRC += lfind.c lsearch.c +CSRC-y += lfind.c lsearch.c # multi source insremque.c -CSRC += insque.c remque.c +CSRC-y += insque.c remque.c # multi source _hsearch_r.c -CSRC += hcreate_r.c hdestroy_r.c hsearch_r.c +CSRC-y += hcreate_r.c hdestroy_r.c hsearch_r.c MISC_SEARCH_DIR := $(top_srcdir)libc/misc/search MISC_SEARCH_OUT := $(top_builddir)libc/misc/search -MISC_SEARCH_SRC := $(patsubst %.c,$(MISC_SEARCH_DIR)/%.c,$(CSRC)) -MISC_SEARCH_OBJ := $(patsubst %.c,$(MISC_SEARCH_OUT)/%.o,$(CSRC)) +MISC_SEARCH_SRC := $(patsubst %.c,$(MISC_SEARCH_DIR)/%.c,$(CSRC-y)) +MISC_SEARCH_OBJ := $(patsubst %.c,$(MISC_SEARCH_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_SEARCH_OBJ) diff --git a/libc/misc/statfs/Makefile.in b/libc/misc/statfs/Makefile.in index aa92d1f70..d70ab8f6e 100644 --- a/libc/misc/statfs/Makefile.in +++ b/libc/misc/statfs/Makefile.in @@ -7,19 +7,16 @@ subdirs += libc/misc/statfs -CSRC := statvfs.c fstatvfs.c -ifeq ($(UCLIBC_HAS_LFS),y) -ifeq ($(UCLIBC_LINUX_SPECIFIC),y) -CSRC += fstatfs64.c statfs64.c -endif -CSRC += statvfs64.c fstatvfs64.c -endif +CSRC-y := statvfs.c fstatvfs.c +CSRC-$(UCLIBC_HAS_LFS) += $(patsubst %.c,%64.c,$(CSRC-y)) +CSRC-$(if $(findstring yy,$(UCLIBC_HAS_LFS)$(UCLIBC_LINUX_SPECIFIC)),y) += \ + fstatfs64.c statfs64.c MISC_STATFS_DIR := $(top_srcdir)libc/misc/statfs MISC_STATFS_OUT := $(top_builddir)libc/misc/statfs -MISC_STATFS_SRC := $(patsubst %.c,$(MISC_STATFS_DIR)/%.c,$(CSRC)) -MISC_STATFS_OBJ := $(patsubst %.c,$(MISC_STATFS_OUT)/%.o,$(CSRC)) +MISC_STATFS_SRC := $(patsubst %.c,$(MISC_STATFS_DIR)/%.c,$(CSRC-y)) +MISC_STATFS_OBJ := $(patsubst %.c,$(MISC_STATFS_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_STATFS_OBJ) diff --git a/libc/misc/syslog/Makefile.in b/libc/misc/syslog/Makefile.in index 5cc4f5237..2d00a33fd 100644 --- a/libc/misc/syslog/Makefile.in +++ b/libc/misc/syslog/Makefile.in @@ -7,13 +7,13 @@ subdirs += libc/misc/syslog -CSRC := syslog.c +CSRC-y := syslog.c MISC_SYSLOG_DIR := $(top_srcdir)libc/misc/syslog MISC_SYSLOG_OUT := $(top_builddir)libc/misc/syslog -MISC_SYSLOG_SRC := $(patsubst %.c,$(MISC_SYSLOG_DIR)/%.c,$(CSRC)) -MISC_SYSLOG_OBJ := $(patsubst %.c,$(MISC_SYSLOG_OUT)/%.o,$(CSRC)) +MISC_SYSLOG_SRC := $(patsubst %.c,$(MISC_SYSLOG_DIR)/%.c,$(CSRC-y)) +MISC_SYSLOG_OBJ := $(patsubst %.c,$(MISC_SYSLOG_OUT)/%.o,$(CSRC-y)) ifeq ($(UCLIBC_HAS_SYSLOG),y) libc-y += $(MISC_SYSLOG_OBJ) diff --git a/libc/misc/sysvipc/Makefile.in b/libc/misc/sysvipc/Makefile.in index 115cfc67e..d1c124430 100644 --- a/libc/misc/sysvipc/Makefile.in +++ b/libc/misc/sysvipc/Makefile.in @@ -7,22 +7,22 @@ subdirs += libc/misc/sysvipc -CSRC := ftok.c __syscall_ipc.c +CSRC-y := ftok.c __syscall_ipc.c # multi source sem.c -CSRC += semget.c semctl.c semop.c semtimedop.c +CSRC-y += semget.c semctl.c semop.c semtimedop.c # multi source shm.c -CSRC += shmat.c shmctl.c shmdt.c shmget.c +CSRC-y += shmat.c shmctl.c shmdt.c shmget.c # multi source msgq.c -CSRC += msgctl.c msgget.c msgrcv.c msgsnd.c +CSRC-y += msgctl.c msgget.c msgrcv.c msgsnd.c MISC_SYSVIPC_DIR := $(top_srcdir)libc/misc/sysvipc MISC_SYSVIPC_OUT := $(top_builddir)libc/misc/sysvipc -MISC_SYSVIPC_SRC := $(patsubst %.c,$(MISC_SYSVIPC_DIR)/%.c,$(CSRC)) -MISC_SYSVIPC_OBJ := $(patsubst %.c,$(MISC_SYSVIPC_OUT)/%.o,$(CSRC)) +MISC_SYSVIPC_SRC := $(patsubst %.c,$(MISC_SYSVIPC_DIR)/%.c,$(CSRC-y)) +MISC_SYSVIPC_OBJ := $(patsubst %.c,$(MISC_SYSVIPC_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_SYSVIPC_OBJ) diff --git a/libc/misc/time/Makefile.in b/libc/misc/time/Makefile.in index 78f01ad85..906a1b28e 100644 --- a/libc/misc/time/Makefile.in +++ b/libc/misc/time/Makefile.in @@ -7,33 +7,24 @@ subdirs += libc/misc/time -CSRC := adjtime.c -ifeq ($(UCLIBC_SUSV3_LEGACY),y) -CSRC += ftime.c -endif +CSRC-y := adjtime.c +CSRC-$(UCLIBC_SUSV3_LEGACY) += ftime.c # multi source time.c -CSRC += asctime.c asctime_r.c clock.c ctime.c ctime_r.c gmtime.c gmtime_r.c \ +CSRC-y += asctime.c asctime_r.c clock.c ctime.c ctime_r.c gmtime.c gmtime_r.c \ localtime.c localtime_r.c mktime.c strftime.c strptime.c tzset.c \ _time_t2tm.c __time_tm.c _time_mktime.c dysize.c timegm.c \ _time_mktime_tzi.c _time_localtime_tzi.c -ifeq ($(UCLIBC_HAS_FLOATS),y) -CSRC += difftime.c -endif -ifeq ($(UCLIBC_HAS_XLOCALE),y) -CSRC += strftime_l.c strptime_l.c -endif -ifeq ($(UCLIBC_HAS_WCHAR),y) -CSRC += wcsftime.c -ifeq ($(UCLIBC_HAS_XLOCALE),y) -CSRC += wcsftime_l.c -endif -endif +CSRC-$(UCLIBC_HAS_FLOATS) += difftime.c +CSRC-$(UCLIBC_HAS_XLOCALE) += strftime_l.c strptime_l.c +CSRC-$(UCLIBC_HAS_WCHAR) += wcsftime.c +CSRC-$(if $(findstring yy,$(UCLIBC_HAS_WCHAR)$(UCLIBC_HAS_XLOCALE)),y) += \ + wcsftime_l.c MISC_TIME_DIR := $(top_srcdir)libc/misc/time MISC_TIME_OUT := $(top_builddir)libc/misc/time -MISC_TIME_SRC := $(patsubst %.c,$(MISC_TIME_DIR)/%.c,$(CSRC)) -MISC_TIME_OBJ := $(patsubst %.c,$(MISC_TIME_OUT)/%.o,$(CSRC)) +MISC_TIME_SRC := $(patsubst %.c,$(MISC_TIME_DIR)/%.c,$(CSRC-y)) +MISC_TIME_OBJ := $(patsubst %.c,$(MISC_TIME_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_TIME_OBJ) diff --git a/libc/misc/ttyent/Makefile.in b/libc/misc/ttyent/Makefile.in index bfa80bec1..02d7df8d1 100644 --- a/libc/misc/ttyent/Makefile.in +++ b/libc/misc/ttyent/Makefile.in @@ -7,13 +7,13 @@ subdirs += libc/misc/ttyent -CSRC := getttyent.c +CSRC-y := getttyent.c MISC_TTYENT_DIR := $(top_srcdir)libc/misc/ttyent MISC_TTYENT_OUT := $(top_builddir)libc/misc/ttyent -MISC_TTYENT_SRC := $(patsubst %.c,$(MISC_TTYENT_DIR)/%.c,$(CSRC)) -MISC_TTYENT_OBJ := $(patsubst %.c,$(MISC_TTYENT_OUT)/%.o,$(CSRC)) +MISC_TTYENT_SRC := $(patsubst %.c,$(MISC_TTYENT_DIR)/%.c,$(CSRC-y)) +MISC_TTYENT_OBJ := $(patsubst %.c,$(MISC_TTYENT_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_TTYENT_OBJ) diff --git a/libc/misc/utmp/Makefile.in b/libc/misc/utmp/Makefile.in index 49ae5a503..535efb150 100644 --- a/libc/misc/utmp/Makefile.in +++ b/libc/misc/utmp/Makefile.in @@ -7,17 +7,14 @@ subdirs += libc/misc/utmp -CSRC := utent.c wtent.c - -ifeq ($(UCLIBC_HAS_UTMPX),y) -CSRC += utxent.c -endif +CSRC-y := utent.c wtent.c +CSRC-$(UCLIBC_HAS_UTMPX) += utxent.c MISC_UTMP_DIR := $(top_srcdir)libc/misc/utmp MISC_UTMP_OUT := $(top_builddir)libc/misc/utmp -MISC_UTMP_SRC := $(patsubst %.c,$(MISC_UTMP_DIR)/%.c,$(CSRC)) -MISC_UTMP_OBJ := $(patsubst %.c,$(MISC_UTMP_OUT)/%.o,$(CSRC)) +MISC_UTMP_SRC := $(patsubst %.c,$(MISC_UTMP_DIR)/%.c,$(CSRC-y)) +MISC_UTMP_OBJ := $(patsubst %.c,$(MISC_UTMP_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_UTMP_OBJ) diff --git a/libc/misc/wchar/Makefile.in b/libc/misc/wchar/Makefile.in index be95a186a..32a8dbc62 100644 --- a/libc/misc/wchar/Makefile.in +++ b/libc/misc/wchar/Makefile.in @@ -19,19 +19,17 @@ subdirs += libc/misc/wchar # multi source wchar.c -CSRC := btowc.c wctob.c mbsinit.c mbrlen.c mbrtowc.c wcrtomb.c mbsrtowcs.c \ +CSRC-y := btowc.c wctob.c mbsinit.c mbrlen.c mbrtowc.c wcrtomb.c mbsrtowcs.c \ wcsrtombs.c _wchar_utf8sntowcs.c _wchar_wcsntoutf8s.c \ mbsnrtowcs.c wcsnrtombs.c wcwidth.c wcswidth.c -ifeq ($(UCLIBC_HAS_LOCALE),y) -CSRC += iconv.c -endif +CSRC-$(UCLIBC_HAS_LOCALE) += iconv.c MISC_WCHAR_DIR := $(top_srcdir)libc/misc/wchar MISC_WCHAR_OUT := $(top_builddir)libc/misc/wchar -MISC_WCHAR_SRC := $(patsubst %.c,$(MISC_WCHAR_DIR)/%.c,$(CSRC)) -MISC_WCHAR_OBJ := $(patsubst %.c,$(MISC_WCHAR_OUT)/%.o,$(CSRC)) +MISC_WCHAR_SRC := $(patsubst %.c,$(MISC_WCHAR_DIR)/%.c,$(CSRC-y)) +MISC_WCHAR_OBJ := $(patsubst %.c,$(MISC_WCHAR_OUT)/%.o,$(CSRC-y)) libc-$(UCLIBC_HAS_WCHAR) += $(MISC_WCHAR_OBJ) diff --git a/libc/misc/wctype/Makefile.in b/libc/misc/wctype/Makefile.in index 4eacc118e..d40c2d321 100644 --- a/libc/misc/wctype/Makefile.in +++ b/libc/misc/wctype/Makefile.in @@ -14,19 +14,15 @@ COM_SRC := \ iswxdigit.c iswblank.c wctrans.c towctrans.c \ wctype.c iswctype.c towlower.c towupper.c -CSRC := -ifeq ($(UCLIBC_HAS_WCHAR),y) -CSRC += $(COM_SRC) -endif -ifeq ($(UCLIBC_HAS_XLOCALE),y) -CSRC += $(patsubst %.c,%_l.c,$(COM_SRC)) -endif +CSRC-y := +CSRC-$(UCLIBC_HAS_WCHAR) += $(COM_SRC) +CSRC-$(UCLIBC_HAS_XLOCALE) += $(patsubst %.c,%_l.c,$(COM_SRC)) MISC_WCTYPE_DIR := $(top_srcdir)libc/misc/wctype MISC_WCTYPE_OUT := $(top_builddir)libc/misc/wctype -MISC_WCTYPE_SRC := $(patsubst %.c,$(MISC_WCTYPE_DIR)/%.c,$(CSRC)) -MISC_WCTYPE_OBJ := $(patsubst %.c,$(MISC_WCTYPE_OUT)/%.o,$(CSRC)) +MISC_WCTYPE_SRC := $(patsubst %.c,$(MISC_WCTYPE_DIR)/%.c,$(CSRC-y)) +MISC_WCTYPE_OBJ := $(patsubst %.c,$(MISC_WCTYPE_OUT)/%.o,$(CSRC-y)) libc-y += $(MISC_WCTYPE_OBJ) diff --git a/libc/misc/wordexp/Makefile.in b/libc/misc/wordexp/Makefile.in index 981db643e..3d642488b 100644 --- a/libc/misc/wordexp/Makefile.in +++ b/libc/misc/wordexp/Makefile.in @@ -7,13 +7,13 @@ subdirs += libc/misc/wordexp -CSRC := wordexp.c +CSRC-y := wordexp.c MISC_WORDEXP_DIR := $(top_srcdir)libc/misc/wordexp MISC_WORDEXP_OUT := $(top_builddir)libc/misc/wordexp -MISC_WORDEXP_SRC := $(patsubst %.c,$(MISC_WORDEXP_DIR)/%.c,$(CSRC)) -MISC_WORDEXP_OBJ := $(patsubst %.c,$(MISC_WORDEXP_OUT)/%.o,$(CSRC)) +MISC_WORDEXP_SRC := $(patsubst %.c,$(MISC_WORDEXP_DIR)/%.c,$(CSRC-y)) +MISC_WORDEXP_OBJ := $(patsubst %.c,$(MISC_WORDEXP_OUT)/%.o,$(CSRC-y)) libc-$(UCLIBC_HAS_WORDEXP) += $(MISC_WORDEXP_OBJ) |