]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/uclibc/lib/contrib/uclibc/libc/sysdeps/linux/common/Makefile.in
update
[l4.git] / l4 / pkg / uclibc / lib / contrib / uclibc / libc / sysdeps / linux / common / Makefile.in
1 # 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
8 COMMON_DIR := $(top_srcdir)libc/sysdeps/linux/common
9 COMMON_OUT := $(top_builddir)libc/sysdeps/linux/common
10
11 CSRC-y := $(notdir $(wildcard $(COMMON_DIR)/*.c))
12 CSRC-  := ssp-local.c
13
14 CSRC_LFS := $(notdir $(wildcard $(COMMON_DIR)/*64.c))
15 CSRC-y := $(filter-out llseek.c $(CSRC_LFS),$(CSRC-y))
16 CSRC-$(UCLIBC_HAS_LFS) += llseek.c $(CSRC_LFS)
17 CSRC-$(findstring y,$(UCLIBC_HAS_SSP)$(UCLIBC_HAS_FORTIFY)) += ssp.c
18 CSRC-$(UCLIBC_LINUX_MODULE_26) += delete_module.c init_module.c
19 CSRC-$(UCLIBC_LINUX_MODULE_24) += create_module.c query_module.c \
20         get_kernel_syms.c
21 # we need these internally: fstatfs.c statfs.c
22 CSRC-$(UCLIBC_LINUX_SPECIFIC) += \
23         bdflush.c \
24         capget.c \
25         capset.c \
26         dup3.c \
27         eventfd.c \
28         inotify.c \
29         ioperm.c \
30         iopl.c \
31         modify_ldt.c \
32         personality.c \
33         pipe2.c \
34         ppoll.c \
35         prctl.c \
36         readahead.c \
37         reboot.c \
38         remap_file_pages.c \
39         sched_cpucount.c \
40         sched_getaffinity.c \
41         sched_getcpu.c \
42         sched_setaffinity.c \
43         sendfile.c \
44         setfsgid.c \
45         setfsuid.c \
46         setresgid.c \
47         setresuid.c \
48         signalfd.c \
49         splice.c \
50         swapoff.c \
51         swapon.c \
52         sync_file_range.c \
53         sysctl.c \
54         sysinfo.c \
55         tee.c \
56         timerfd.c \
57         umount2.c \
58         umount.c \
59         unshare.c \
60         uselib.c \
61         vhangup.c \
62         vmsplice.c
63 CSRC-$(if $(findstring yy,$(UCLIBC_LINUX_SPECIFIC)$(UCLIBC_HAS_LFS)),y) += \
64         sendfile64.c
65 # NPTL needs these internally: madvise.c
66 CSRC-$(findstring y,$(UCLIBC_LINUX_SPECIFIC)$(UCLIBC_HAS_THREADS_NATIVE)) += madvise.c
67 ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
68 CSRC- += fork.c getpid.c raise.c #open.c close.c read.c write.c
69 CSRC- += $(if $(findstring =arm=,=$(TARGET_ARCH)=),vfork.c)
70 CSRC- += $(if $(findstring =x86_64=,=$(TARGET_ARCH)=),vfork.c)
71 #CSRC- += $(if $(findstring =mips=y=,=$(TARGET_ARCH)=$(CONFIG_MIPS_O32_ABI)=),waitpid.c)
72 CSRC- += $(if $(findstring =metag=,=$(TARGET_ARCH)=),vfork.c)
73 endif
74 ifneq ($(ARCH_HAS_DEPRECATED_SYSCALLS),y)
75 # No conversion is needed for new architectures
76 CSRC- += xstatconv.c
77 endif
78 # stubbed out in mman.h
79 CSRC-$(ARCH_USE_MMU) += msync.c
80 # we need these internally: getdomainname.c
81 CSRC-$(UCLIBC_BSD_SPECIFIC) += mincore.c setdomainname.c
82 CSRC-$(UCLIBC_NTP_LEGACY) += ntp_gettime.c
83 # aio_cancel|aio_error|aio_fsync|aio_read|aio_return|aio_suspend|aio_write|clock_getres|clock_gettime|clock_settime|clock_settime|fdatasync|lio_listio|mlockall|munlockall|mlock|munlock|mq_close|mq_getattr|mq_notify|mq_open|mq_receive|mq_timedreceive|mq_send|mq_timedsend|mq_setattr|mq_unlink|nanosleep|sched_getparam|sched_get_priority_max|sched_get_priority_min|sched_getscheduler|sched_rr_get_interval|sched_setparam|sched_setscheduler|sem_close|sem_destroy|sem_getvalue|sem_init|sem_open|sem_post|sem_trywait|sem_wait|sem_unlink|sem_wait|shm_open|shm_unlink|sigqueue|sigtimedwait|sigwaitinfo|timer_create|timer_delete|timer_getoverrun|timer_gettime|timer_settime
84 CSRC-$(UCLIBC_HAS_REALTIME) += clock_getres.c clock_gettime.c clock_settime.c \
85         fdatasync.c mlockall.c mlock.c munlockall.c munlock.c \
86         nanosleep.c __rt_sigtimedwait.c __rt_sigwaitinfo.c sched_getparam.c \
87         sched_get_priority_max.c sched_get_priority_min.c sched_getscheduler.c \
88         sched_rr_get_interval.c sched_setparam.c sched_setscheduler.c sigqueue.c
89 # clock_getcpuclockid|clock_nanosleep|mq_timedreceive|mq_timedsend|posix_fadvise|posix_fallocate|posix_madvise|posix_memalign|posix_mem_offset|posix_spawnattr_destroy|posix_spawnattr_init|posix_spawnattr_getflags|posix_spawnattr_setflags|posix_spawnattr_getpgroup|posix_spawnattr_setpgroup|posix_spawnattr_getschedparam|posix_spawnattr_setschedparam|posix_spawnattr_getschedpolicy|posix_spawnattr_setschedpolicy|posix_spawnattr_getsigdefault|posix_spawnattr_setsigdefault|posix_spawnattr_getsigmask|posix_spawnattr_setsigmask|posix_spawnattr_init|posix_spawnattr_setflags|posix_spawnattr_setpgroup|posix_spawnattr_setschedparam|posix_spawnattr_setschedpolicy|posix_spawnattr_setsigdefault|posix_spawnattr_setsigmask|posix_spawn_file_actions_addclose|posix_spawn_file_actions_addopen|posix_spawn_file_actions_adddup2|posix_spawn_file_actions_addopen|posix_spawn_file_actions_destroy|posix_spawn_file_actions_init|posix_spawn_file_actions_init|posix_spawn|posix_spawnp|posix_spawnp|posix_typed_mem_get_info|pthread_mutex_timedlock|sem_timedwait
90 CSRC-$(UCLIBC_HAS_ADVANCED_REALTIME) += posix_fadvise64.c posix_fadvise.c posix_madvise.c \
91         posix_fallocate.c posix_fallocate64.c
92 CSRC-$(UCLIBC_SUSV4_LEGACY) += utime.c
93 CSRC-$(UCLIBC_HAS_EPOLL) += epoll.c
94 CSRC-$(UCLIBC_HAS_XATTR) += xattr.c
95 CSRC-$(UCLIBC_HAS_PROFILING) += noophooks.c #pcprofile.c
96 CSRC-$(UCLIBC_SV4_DEPRECATED) += ustat.c
97 CSRC- += $(if $(findstring =c6x=,=$(TARGET_ARCH)=),vfork.c)
98 CSRC- += $(if $(findstring =sh=,=$(TARGET_ARCH)=),vfork.c)
99 CSRC- += $(if $(findstring =sparc=,=$(TARGET_ARCH)=),vfork.c)
100 CSRC- += $(if $(findstring =i386=,=$(TARGET_ARCH)=),vfork.c)
101
102 CSRC-y := $(filter-out $(CSRC-),$(CSRC-y))
103
104 # provided via pthreads builddir
105 CSRC-y := $(filter-out $(libc_a_CSRC) $(notdir $(libpthread_libc_OBJS:.o=.c)),$(CSRC-y))
106 SSRC-y := $(filter-out $(libc_a_SSRC) $(notdir $(libpthread_libc_OBJS:.o=.S)),$(SSRC-y))
107
108 # fails for some reason
109 ifneq ($(strip $(ARCH_OBJS-y)),)
110 CSRC-y := $(filter-out $(notdir $(ARCH_OBJS-y:.o=.c)) $(ARCH_OBJ_FILTEROUT-y),$(CSRC-y))
111 endif
112
113 CFLAGS-ssp.c := $(SSP_DISABLE_FLAGS)
114 CFLAGS-ssp-local.c := $(SSP_DISABLE_FLAGS)
115
116 COMMON_SRC := $(patsubst %.c,$(COMMON_DIR)/%.c,$(CSRC-y))
117 COMMON_OBJ := $(patsubst %.c,$(COMMON_OUT)/%.o,$(CSRC-y))
118
119 libc-y += $(COMMON_OBJ)
120 libc-static-$(UCLIBC_HAS_SSP) += $(COMMON_OUT)/ssp-local.o
121 libc-nonshared-$(UCLIBC_HAS_SSP) += $(COMMON_OUT)/ssp-local.os
122
123 libc-nomulti-y += $(COMMON_OUT)/__syscall_rt_sigaction.o \
124         $(COMMON_OUT)/__syscall_sigaction.o \
125         $(COMMON_OUT)/mremap.o \
126         $(COMMON_OUT)/stat.o
127 libc-nomulti-$(UCLIBC_HAS_SSP) += $(COMMON_OUT)/ssp.o
128
129 objclean-y += CLEAN_libc/sysdeps/linux/common
130
131 CLEAN_libc/sysdeps/linux/common:
132         $(do_rm) $(addprefix $(COMMON_OUT)/*., o os oS)