summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-03-05 01:37:07 -0500
committerMike Frysinger <vapier@gentoo.org>2012-03-05 01:37:57 -0500
commit60b9866848353c3b81c57a985c07765c3d3241df (patch)
tree7bf90b26dda0c746dd4468056b46ffcea00bcac7
parent3bab4144e8516d5e63f4fe307aa594364847e527 (diff)
librt: refactor source selection
Should make adding more knob control simpler as people only need to modify one variable now (librt_filter_SRC). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--librt/Makefile.in19
1 files changed, 11 insertions, 8 deletions
diff --git a/librt/Makefile.in b/librt/Makefile.in
index 7d295d4a6..909afd884 100644
--- a/librt/Makefile.in
+++ b/librt/Makefile.in
@@ -22,18 +22,21 @@ librt_DIR := $(top_srcdir)librt
librt_OUT := $(top_builddir)librt
ifeq ($(UCLIBC_HAS_REALTIME),y)
+
+librt_SRC := $(notdir $(wildcard $(librt_DIR)/*.c))
+librt_filter_SRC :=
ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
-librt_CSRC := $(filter-out mq_notify.c timer_create.c timer_delete.c \
- timer_getoverr.c timer_gettime.c timer_settime.c, \
- $(notdir $(wildcard $(librt_DIR)/*.c)))
+librt_filter_SRC += mq_notify.c timer_create.c timer_delete.c \
+ timer_getoverr.c timer_gettime.c timer_settime.c
librt_SSRC := $(wildcard $(librt_DIR)/*.S)
-librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_CSRC))
-librt_OBJ += $(patsubst $(librt_DIR)/%.S,$(librt_OUT)/%.o,$(librt_SSRC))
else
-librt_SRC := $(filter-out clock_nanosleep.c clock_getcpuclockid.c clock_gettime.c, \
- $(notdir $(wildcard $(librt_DIR)/*.c)))
-librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_SRC))
+librt_filter_SRC += clock_nanosleep.c clock_getcpuclockid.c clock_gettime.c
+librt_SSRC :=
endif
+librt_SRC := $(filter-out $(librt_filter_SRC),$(librt_SRC))
+
+librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_SRC))
+librt_OBJ += $(patsubst $(librt_DIR)/%.S,$(librt_OUT)/%.o,$(librt_SSRC))
ASFLAGS-mq_timedreceive.S = -D_LIBC_REENTRANT
ASFLAGS-mq_timedsend.S = -D_LIBC_REENTRANT