typo
[glibc.git] / misc / Makefile
blob7d60baa7d68471d1ce0be9752bc247d73a13b97f
1 # Copyright (C) 1991-2002,2003,2004,2005,2006 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
17 # 02111-1307 USA.
20 # Sub-makefile for misc portion of the library.
23 subdir := misc
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 bits/syslog.h bits/syslog-ldbl.h
35 routines := brk sbrk sstk ioctl \
36 readv writev \
37 setreuid setregid \
38 seteuid setegid \
39 getpagesize \
40 getdtsz \
41 gethostname sethostname getdomain setdomain \
42 select pselect \
43 acct chroot fsync sync fdatasync reboot \
44 gethostid sethostid \
45 revoke vhangup \
46 swapon swapoff mktemp mkstemp mkstemp64 mkdtemp \
47 ualarm usleep \
48 gtty stty \
49 ptrace \
50 fstab mntent mntent_r \
51 utimes lutimes futimes futimesat \
52 truncate ftruncate truncate64 ftruncate64 \
53 chflags fchflags \
54 insremque getttyent getusershell getpass ttyslot \
55 syslog syscall daemon \
56 mmap mmap64 munmap mprotect msync madvise mincore remap_file_pages\
57 mlock munlock mlockall munlockall \
58 efgcvt efgcvt_r qefgcvt qefgcvt_r \
59 hsearch hsearch_r tsearch lsearch \
60 err error ustat \
61 getsysstats dirname regexp \
62 getloadavg getclktck \
63 fgetxattr flistxattr fremovexattr fsetxattr getxattr \
64 listxattr lgetxattr llistxattr lremovexattr lsetxattr \
65 removexattr setxattr
67 distribute := device-nrs.h
69 generated := tst-error1.mtrace tst-error1-mem
71 include ../Makeconfig
73 aux := init-misc
74 ifeq ($(build-static),yes)
75 install-lib := libbsd-compat.a libg.a
76 endif
77 gpl2lgpl := error.c error.h
79 tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
80 tst-error1 tst-pselect
81 ifeq (no,$(cross-compiling))
82 tests: $(objpfx)tst-error1-mem
83 endif
85 CFLAGS-tsearch.c = $(uses-callbacks)
86 CFLAGS-lsearch.c = $(uses-callbacks)
87 CFLAGS-pselect.c = -fexceptions
88 CFLAGS-readv.c = -fexceptions -fasynchronous-unwind-tables
89 CFLAGS-writev.c = -fexceptions -fasynchronous-unwind-tables
90 CFLAGS-usleep.c = -fexceptions
91 CFLAGS-syslog.c = -fexceptions
92 CFLAGS-error.c = -fexceptions
93 CFLAGS-getpass.c = -fexceptions
94 CFLAGS-mkstemp.c = -fexceptions
95 CFLAGS-mkstemp64.c = -fexceptions
96 CFLAGS-getsysstats.c = -fexceptions
97 CFLAGS-getusershell.c = -fexceptions
98 CFLAGS-err.c = -fexceptions
99 CFLAGS-tst-tsearch.c = $(stack-align-test-flags)
100 CFLAGS-mntent_r.c = -D_IO_MTSAFE_IO
102 include ../Rules
104 $(objpfx)libbsd-compat.a: $(dep-dummy-lib); $(make-dummy-lib)
105 $(objpfx)libg.a: $(dep-dummy-lib); $(make-dummy-lib)
107 ifeq ($(build-shared),yes)
108 $(objpfx)tst-tsearch: $(common-objpfx)math/libm.so$(libm.so-version)
109 else
110 $(objpfx)tst-tsearch: $(common-objpfx)math/libm.a
111 endif
113 ifeq ($(build-bounded),yes)
114 $(objpfx)tst-tsearch-bp: $(common-objpfx)math/libm_b.a
115 endif
117 tst-error1-ENV = MALLOC_TRACE=$(objpfx)tst-error1.mtrace
118 tst-error1-ARGS = $(objpfx)tst-error1.out
119 $(objpfx)tst-error1-mem: $(objpfx)tst-error1.out
120 $(common-objpfx)malloc/mtrace $(objpfx)tst-error1.mtrace > $@