blob: 1eaa9f07ae89e5f7d658b70ef7abc978c6487e8f [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# Makefile for uClibc
2#
3# Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
4#
5# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6#
7
8subdirs += libc/signal
9
10CSRC-y := allocrtsig.c killpg.c raise.c sigaction.c sigaddset.c sigandset.c \
11 sigblock.c sigdelset.c sigempty.c sigfillset.c siggetmask.c \
12 sigisempty.c sigismem.c sigjmp.c signal.c \
13 sigorset.c sigsetmask.c sigsetops.c sigwait.c
14CSRC-$(UCLIBC_HAS_OBSOLETE_BSD_SIGNAL) += \
15 sighold.c sigignore.c sigrelse.c sigset.c
16CSRC-$(UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL) += sysv_signal.c
17CSRC-$(UCLIBC_SUSV4_LEGACY) += sigintr.c sigpause.c
18
19ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
20CSRC-y:=$(filter-out raise.c,$(CSRC-y))
21endif
22
23ifneq ($(strip $(ARCH_OBJS)),)
24CSRC-y := $(filter-out $(notdir $(ARCH_OBJS:.o=.c)),$(CSRC-y))
25endif
26
27ifneq ($(UCLIBC_HAS_BACKTRACE),)
28CFLAGS-raise.c = -fasynchronous-unwind-tables
29endif
30
31SIGNAL_DIR := $(top_srcdir)libc/signal
32SIGNAL_OUT := $(top_builddir)libc/signal
33
34SIGNAL_SRC := $(patsubst %.c,$(SIGNAL_DIR)/%.c,$(CSRC-y))
35SIGNAL_OBJ := $(patsubst %.c,$(SIGNAL_OUT)/%.o,$(CSRC-y))
36
37libc-y += $(SIGNAL_OBJ)
38
39objclean-y += CLEAN_libc/signal
40
41CLEAN_libc/signal:
42 $(do_rm) $(addprefix $(SIGNAL_OUT)/*., o os)