From 60b9866848353c3b81c57a985c07765c3d3241df Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 5 Mar 2012 01:37:07 -0500 Subject: 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 --- librt/Makefile.in | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'librt') 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 -- cgit v1.2.3