]> git.ipfire.org Git - thirdparty/glibc.git/blame - misc/Makefile
Move wide char tests to wcsmbs directory
[thirdparty/glibc.git] / misc / Makefile
CommitLineData
81a5726b 1# Copyright (C) 1991-2006, 2007, 2009, 2011 Free Software Foundation, Inc.
28f540f4
RM
2# This file is part of the GNU C Library.
3
4# The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
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.
28f540f4
RM
8
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
41bdb6e2 12# Lesser General Public License for more details.
28f540f4 13
41bdb6e2
AJ
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
17# 02111-1307 USA.
28f540f4
RM
18
19#
20# Sub-makefile for misc portion of the library.
21#
22
23subdir := misc
24
5107cf1d 25headers := sys/uio.h bits/uio.h sys/ioctl.h bits/ioctls.h bits/ioctl-types.h \
072ebcef 26 sys/ptrace.h sys/file.h sys/dir.h sys/cdefs.h \
5107cf1d 27 ar.h a.out.h libgen.h stab.h bits/stab.def sgtty.h \
c6251f03 28 ttyent.h paths.h sys/reboot.h \
5107cf1d 29 sys/mman.h sys/param.h fstab.h mntent.h search.h err.h error.h \
503054c0 30 sys/queue.h sysexits.h syscall.h sys/syscall.h sys/swap.h \
5107cf1d 31 sys/select.h ustat.h sys/ustat.h bits/ustat.h sys/sysinfo.h \
c6251f03 32 regexp.h bits/select.h bits/mman.h sys/xattr.h \
0f289b2a 33 syslog.h sys/syslog.h \
29d49a1a 34 bits/syslog.h bits/syslog-ldbl.h bits/syslog-path.h bits/error.h
28f540f4
RM
35
36routines := brk sbrk sstk ioctl \
e109c612 37 readv writev preadv preadv64 pwritev pwritev64 \
28f540f4
RM
38 setreuid setregid \
39 seteuid setegid \
40 getpagesize \
41 getdtsz \
42 gethostname sethostname getdomain setdomain \
503054c0 43 select pselect \
81a5726b 44 acct chroot fsync sync fdatasync syncfs reboot \
28f540f4 45 gethostid sethostid \
069aa638 46 revoke vhangup \
85adf316 47 swapon swapoff mktemp mkstemp mkstemp64 mkdtemp \
3a83202d 48 mkostemp mkostemp64 mkstemps mkstemps64 mkostemps mkostemps64 \
28f540f4
RM
49 ualarm usleep \
50 gtty stty \
0d204b0a 51 ptrace \
845dcb57 52 fstab mntent mntent_r \
26cec518 53 utimes lutimes futimes futimesat \
9756dfe1 54 truncate ftruncate truncate64 ftruncate64 \
28f540f4
RM
55 chflags fchflags \
56 insremque getttyent getusershell getpass ttyslot \
57 syslog syscall daemon \
3c531a87 58 mmap mmap64 munmap mprotect msync madvise mincore remap_file_pages\
d81b986b 59 mlock munlock mlockall munlockall \
2064087b 60 efgcvt efgcvt_r qefgcvt qefgcvt_r \
9f447fb3 61 hsearch hsearch_r tsearch lsearch \
845dcb57 62 err error ustat \
54e9386d 63 getsysstats dirname regexp \
c0ad824e
AJ
64 getloadavg getclktck \
65 fgetxattr flistxattr fremovexattr fsetxattr getxattr \
66 listxattr lgetxattr llistxattr lremovexattr lsetxattr \
67 removexattr setxattr
7cabd57c 68
316ca440
UD
69distribute := device-nrs.h
70
10ffcd52
UD
71generated := tst-error1.mtrace tst-error1-mem
72
7cabd57c
UD
73include ../Makeconfig
74
bbed653c 75aux := init-misc
786a5421 76ifeq ($(build-static),yes)
28f540f4 77install-lib := libbsd-compat.a libg.a
786a5421 78endif
196980f5 79gpl2lgpl := error.c error.h
28f540f4 80
10ffcd52 81tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
25e84177 82 tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1
10ffcd52
UD
83ifeq (no,$(cross-compiling))
84tests: $(objpfx)tst-error1-mem
85endif
1474b80f 86
e07bb02a
UD
87CFLAGS-tsearch.c = $(uses-callbacks)
88CFLAGS-lsearch.c = $(uses-callbacks)
7a114794
UD
89CFLAGS-pselect.c = -fexceptions
90CFLAGS-readv.c = -fexceptions -fasynchronous-unwind-tables
91CFLAGS-writev.c = -fexceptions -fasynchronous-unwind-tables
92CFLAGS-usleep.c = -fexceptions
73299943 93CFLAGS-syslog.c = -fexceptions
048466f6 94CFLAGS-error.c = -fexceptions
cdbfa9f8 95CFLAGS-getpass.c = -fexceptions
f1c30c98
UD
96CFLAGS-mkstemp.c = -fexceptions
97CFLAGS-mkstemp64.c = -fexceptions
f1c30c98
UD
98CFLAGS-getsysstats.c = -fexceptions
99CFLAGS-getusershell.c = -fexceptions
8dab36a1 100CFLAGS-err.c = -fexceptions
06f6ca90 101CFLAGS-tst-tsearch.c = $(stack-align-test-flags)
9e59d9cb 102CFLAGS-mntent_r.c = -D_IO_MTSAFE_IO
dff14448 103
28f540f4
RM
104include ../Rules
105
01cad722 106$(objpfx)libbsd-compat.a: $(dep-dummy-lib); $(make-dummy-lib)
28f540f4 107$(objpfx)libg.a: $(dep-dummy-lib); $(make-dummy-lib)
b236e99d 108
993b3242
UD
109ifeq ($(build-shared),yes)
110$(objpfx)tst-tsearch: $(common-objpfx)math/libm.so$(libm.so-version)
111else
112$(objpfx)tst-tsearch: $(common-objpfx)math/libm.a
113endif
e64911d1
GM
114
115ifeq ($(build-bounded),yes)
116$(objpfx)tst-tsearch-bp: $(common-objpfx)math/libm_b.a
117endif
10ffcd52
UD
118
119tst-error1-ENV = MALLOC_TRACE=$(objpfx)tst-error1.mtrace
120tst-error1-ARGS = $(objpfx)tst-error1.out
121$(objpfx)tst-error1-mem: $(objpfx)tst-error1.out
122 $(common-objpfx)malloc/mtrace $(objpfx)tst-error1.mtrace > $@