3 # Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
5 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
10 CFLAGS-librt
:= -DNOT_IN_libc
-DIS_IN_librt
$(SSP_ALL_CFLAGS
)
12 librt_DIR
:= $(top_srcdir
)librt
13 librt_OUT
:= $(top_builddir
)librt
15 librt_SRC
:= $(notdir $(wildcard $(librt_DIR
)/*.c
))
17 ifeq ($(UCLIBC_HAS_THREADS_NATIVE
),y
)
18 librt_filter_SRC
+= mq_notify.c timer_create.c timer_delete.c \
19 timer_getoverr.c timer_gettime.c timer_settime.c
20 # these should really be guarded by ADVANCED_REALTIME, we use them in mq_send.c/mq_receive.c
21 librt_SSRC
:= $(wildcard $(librt_DIR
)/*.S
)
23 librt_filter_SRC
+= clock_nanosleep.c clock_getcpuclockid.c clock_gettime.c
27 librt_filter_SRC
+= $(if
$(UCLIBC_HAS_ADVANCED_REALTIME
),, \
29 spawn_faction_addclose.c \
30 spawn_faction_adddup2.c \
31 spawn_faction_addopen.c \
34 librt_filter_SRC
+= $(if
$(UCLIBC_HAS_STUBS
),,rt_stubs.c
)
35 librt_filter_SRC
+= $(if
$(HAS_NO_THREADS
),dso_handle.c
)
37 librt_SRC
:= $(filter-out $(librt_filter_SRC
),$(librt_SRC
))
38 librt_OBJ
:= $(patsubst %.c
,$(librt_OUT
)/%.o
,$(librt_SRC
))
39 librt_OBJ
+= $(patsubst $(librt_DIR
)/%.S
,$(librt_OUT
)/%.o
,$(librt_SSRC
))
41 ASFLAGS-mq_timedreceive.S
= -D_LIBC_REENTRANT
42 ASFLAGS-mq_timedsend.S
= -D_LIBC_REENTRANT
45 librt-a-y
+= $(librt_OBJ
:.o
=.os
)
47 librt-a-y
+= $(librt_OBJ
)
49 librt-so-y
+= $(librt_OBJ
:.o
=.oS
)
51 librt-dep-y
:= $(libc.depend
)
53 objclean-y
+= CLEAN_librt
56 $(do_rm
) $(addprefix $(librt_OUT
)/*.
, o os oS a
)