summaryrefslogtreecommitdiffstats
path: root/librt/Makefile.in
blob: 14bff70ef624c95e8b171bdf3c6c341f3d0094f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Makefile for uClibc
#
# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#

CFLAGS-librt := -DNOT_IN_libc -DIS_IN_librt $(SSP_ALL_CFLAGS)

LDFLAGS-librt.so := $(LDFLAGS)

LIBS-librt.so := $(LIBS)

librt_FULL_NAME := librt-$(VERSION).so

librt_DIR := $(top_srcdir)librt
librt_OUT := $(top_builddir)librt

ifeq ($(UCLIBC_HAS_REALTIME),y)
librt_SRC := $(wildcard $(librt_DIR)/*.c)
librt_OBJ := $(patsubst $(librt_DIR)/%.c,$(librt_OUT)/%.o,$(librt_SRC))

ifeq ($(DOPIC),y)
librt-a-y += $(librt_OBJ:.o=.os)
else
librt-a-y += $(librt_OBJ)
endif
librt-so-y += $(librt_OBJ:.o=.os)

lib-a-y += $(top_builddir)lib/librt.a
lib-so-y += $(top_builddir)lib/librt.so
endif

ifeq ($(DOPIC),y)
$(top_builddir)lib/librt.so: $(top_builddir)lib/librt.a $(libc.depend)
else
$(top_builddir)lib/librt.so: $(librt_OUT)/librt_so.a $(libc.depend)
endif
	$(call link.so,$(librt_FULL_NAME),$(MAJOR_VERSION))

$(librt_OUT)/librt_so.a: $(librt-so-y)
	$(Q)$(RM) $@
	$(do_ar)
	$(do_t_strip)

$(top_builddir)lib/librt.a: $(librt-a-y)
	$(Q)$(INSTALL) -d $(dir $@)
	$(Q)$(RM) $@
	$(do_ar)
	$(do_t_strip)

objclean-y += librt_clean

librt_clean:
	$(RM) $(librt_OUT)/*.{o,os,a}