1 # Copyright (C) 1991-2006, 2007 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, write to the Free
16 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 # Sub-makefile for misc portion of the library.
25 headers
:= sys
/uio.h bits
/uio.h sys
/ioctl.h bits
/ioctls.h bits
/ioctl-types.h \
26 sys
/ptrace.h sys
/file.h sys
/dir.h sys
/cdefs.h \
27 ar.h a.out.h libgen.h stab.h bits
/stab.def sgtty.h \
28 ttyent.h paths.h sys
/reboot.h \
29 sys
/mman.h sys
/param.h fstab.h mntent.h search.h err.h error.h \
30 sys
/queue.h sysexits.h syscall.h sys
/syscall.h sys
/swap.h \
31 sys
/select.h ustat.h sys
/ustat.h bits
/ustat.h sys
/sysinfo.h \
32 regexp.h bits
/select.h bits
/mman.h sys
/xattr.h \
33 syslog.h sys
/syslog.h \
34 bits
/syslog.h bits
/syslog-ldbl.h bits
/syslog-path.h bits
/error.h
36 routines
:= brk sbrk sstk ioctl \
42 gethostname sethostname getdomain setdomain \
44 acct chroot fsync sync fdatasync reboot \
47 swapon swapoff mktemp mkstemp mkstemp64 mkdtemp \
52 fstab mntent mntent_r \
53 utimes lutimes futimes futimesat \
54 truncate ftruncate truncate64 ftruncate64 \
56 insremque getttyent getusershell getpass ttyslot \
57 syslog syscall daemon \
58 mmap mmap64 munmap mprotect msync madvise mincore remap_file_pages\
59 mlock munlock mlockall munlockall \
60 efgcvt efgcvt_r qefgcvt qefgcvt_r \
61 hsearch hsearch_r tsearch lsearch \
63 getsysstats dirname regexp \
64 getloadavg getclktck \
65 fgetxattr flistxattr fremovexattr fsetxattr getxattr \
66 listxattr lgetxattr llistxattr lremovexattr lsetxattr \
69 distribute
:= device-nrs.h
71 generated
:= tst-error1.mtrace tst-error1-mem
76 ifeq ($(build-static
),yes
)
77 install-lib
:= libbsd-compat.a libg.a
79 gpl2lgpl
:= error.c error.h
81 tests
:= tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
82 tst-error1 tst-pselect tst-insremque tst-mntent2
83 ifeq (no
,$(cross-compiling
))
84 tests
: $(objpfx
)tst-error1-mem
87 CFLAGS-tsearch.c
= $(uses-callbacks
)
88 CFLAGS-lsearch.c
= $(uses-callbacks
)
89 CFLAGS-pselect.c
= -fexceptions
90 CFLAGS-readv.c
= -fexceptions
-fasynchronous-unwind-tables
91 CFLAGS-writev.c
= -fexceptions
-fasynchronous-unwind-tables
92 CFLAGS-usleep.c
= -fexceptions
93 CFLAGS-syslog.c
= -fexceptions
94 CFLAGS-error.c
= -fexceptions
95 CFLAGS-getpass.c
= -fexceptions
96 CFLAGS-mkstemp.c
= -fexceptions
97 CFLAGS-mkstemp64.c
= -fexceptions
98 CFLAGS-getsysstats.c
= -fexceptions
99 CFLAGS-getusershell.c
= -fexceptions
100 CFLAGS-err.c
= -fexceptions
101 CFLAGS-tst-tsearch.c
= $(stack-align-test-flags
)
102 CFLAGS-mntent_r.c
= -D_IO_MTSAFE_IO
106 $(objpfx
)libbsd-compat.a
: $(dep-dummy-lib
); $(make-dummy-lib
)
107 $(objpfx
)libg.a
: $(dep-dummy-lib
); $(make-dummy-lib
)
109 ifeq ($(build-shared
),yes
)
110 $(objpfx
)tst-tsearch
: $(common-objpfx
)math
/libm.so
$(libm.so-version
)
112 $(objpfx
)tst-tsearch
: $(common-objpfx
)math
/libm.a
115 ifeq ($(build-bounded
),yes
)
116 $(objpfx
)tst-tsearch-bp
: $(common-objpfx
)math
/libm_b.a
119 tst-error1-ENV
= MALLOC_TRACE
=$(objpfx
)tst-error1.mtrace
120 tst-error1-ARGS
= $(objpfx
)tst-error1.out
121 $(objpfx
)tst-error1-mem
: $(objpfx
)tst-error1.out
122 $(common-objpfx
)malloc
/mtrace
$(objpfx
)tst-error1.mtrace
> $@