Files
glibc/libio/Makefile
T

177 lines
6.4 KiB
Makefile
Raw Normal View History

2002-07-31 23:30:24 +00:00
# Copyright (C) 1995,96,97,98,99,2000,01,02 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
2001-07-06 04:58:11 +00:00
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# The GNU C Library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2001-07-06 04:58:11 +00:00
# Lesser General Public License for more details.
2001-07-06 04:58:11 +00:00
# You should have received a copy of the GNU Lesser General Public
# License along with the GNU C Library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307 USA.
#
# Specific makefile for libio.
#
subdir := libio
2002-07-31 23:30:24 +00:00
headers := stdio.h libio.h _G_config.h bits/stdio.h bits/stdio-lock.h \
bits/sys_errlist.h
routines := \
filedoalloc iofclose iofdopen iofflush iofgetpos iofgets iofopen \
1999-06-16 22:55:47 +00:00
iofopncook iofputs iofread iofsetpos ioftell wfiledoalloc \
1996-12-08 08:01:13 +00:00
iofwrite iogetdelim iogetline iogets iopadn iopopen ioputs \
2002-02-26 01:45:59 +00:00
ioseekoff ioseekpos iosetbuffer iosetvbuf ioungetc \
iovsprintf iovsscanf \
1997-10-12 04:05:44 +00:00
iofgetpos64 iofopen64 iofsetpos64 \
1999-06-16 22:55:47 +00:00
fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \
iofputws iofputws_u iogetwline iowpadn ioungetwc putwc putwc_u \
1999-07-20 07:57:14 +00:00
putwchar putwchar_u putchar putchar_u fwprintf swprintf vwprintf \
wprintf wscanf fwscanf vwscanf vswprintf iovswscanf swscanf wgenops \
2000-07-21 06:15:13 +00:00
wstrops wfileops iofwide fwide \
\
1999-01-26 20:49:55 +00:00
clearerr feof ferror fileno fputc freopen fseek getc getchar \
memstream pclose putc putchar rewind setbuf setlinebuf vasprintf \
1997-09-30 17:10:40 +00:00
iovdprintf vscanf vsnprintf obprintf fcloseall fseeko ftello \
1998-07-05 11:57:59 +00:00
freopen64 fseeko64 ftello64 \
\
2000-09-01 08:56:06 +00:00
__fbufsize __freading __fwriting __freadable __fwritable __flbf \
__fpurge __fpending __fsetlocking \
\
2000-08-29 02:54:55 +00:00
libc_fatal fmemopen
2000-07-20 08:56:12 +00:00
tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc \
2001-08-09 00:11:12 +00:00
tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-fopenloc \
2002-04-03 05:18:32 +00:00
tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf \
2002-07-10 23:09:16 +00:00
tst-mmap-setvbuf bug-ungetwc1 bug-ungetwc2 tst-atime tst-eof \
2002-08-26 08:08:50 +00:00
tst-freopen bug-rewind bug-rewind2 bug-ungetc bug-fseek \
tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \
tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush
2000-11-17 00:27:46 +00:00
test-srcs = test-freopen
1999-06-16 22:55:47 +00:00
1996-09-27 03:45:24 +00:00
all: # Make this the default target; it will be defined in Rules.
1996-09-07 04:10:57 +00:00
include ../Makeconfig
1997-10-13 01:27:24 +00:00
ifeq ($(versioning),yes)
1998-11-23 09:36:06 +00:00
routines += oldiofopen oldiofdopen oldiofclose oldiopopen oldpclose \
1999-06-21 13:38:44 +00:00
oldtmpfile oldiofgetpos oldiofgetpos64 oldiofsetpos \
oldiofsetpos64
1997-10-13 01:27:24 +00:00
endif
1996-09-07 04:10:57 +00:00
ifneq (,$(filter %REENTRANT, $(defines)))
routines += clearerr_u feof_u ferror_u fputc_u getc_u getchar_u \
1998-07-16 11:44:36 +00:00
iofflush_u putc_u putchar_u peekc iofread_u iofwrite_u iofgets_u \
iofputs_u
1996-09-07 04:10:57 +00:00
CPPFLAGS += -D_IO_MTSAFE_IO
endif
# Support for exception handling.
CFLAGS-fileops.c = $(exceptions)
2003-08-29 19:58:49 +00:00
CFLAGS-fputc.c = $(exceptions)
CFLAGS-fputwc.c = $(exceptions)
CFLAGS-freopen64.c = $(exceptions)
CFLAGS-freopen.c = $(exceptions)
CFLAGS-fseek.c = $(exceptions)
CFLAGS-fseeko64.c = $(exceptions)
CFLAGS-fseeko.c = $(exceptions)
CFLAGS-ftello64.c = $(exceptions)
CFLAGS-ftello.c = $(exceptions)
CFLAGS-fwide.c = $(exceptions)
CFLAGS-genops.c = $(exceptions)
CFLAGS-getc.c = $(exceptions)
CFLAGS-getchar.c = $(exceptions)
CFLAGS-getwc.c = $(exceptions)
CFLAGS-getwchar.c = $(exceptions)
CFLAGS-iofclose.c = $(exceptions)
CFLAGS-iofflush.c = $(exceptions)
CFLAGS-iofgetpos64.c = $(exceptions)
CFLAGS-iofgetpos.c = $(exceptions)
CFLAGS-iofgets.c = $(exceptions)
CFLAGS-iofgetws.c = $(exceptions)
CFLAGS-iofputs.c = $(exceptions)
CFLAGS-iofputws.c = $(exceptions)
CFLAGS-iofread.c = $(exceptions)
CFLAGS-iofsetpos64.c = $(exceptions)
CFLAGS-iofsetpos.c = $(exceptions)
CFLAGS-ioftell.c = $(exceptions)
CFLAGS-iofwrite.c = $(exceptions)
CFLAGS-iogetdelim.c = $(exceptions)
CFLAGS-iogetline.c = $(exceptions)
CFLAGS-iogets.c = $(exceptions)
CFLAGS-iogetwline.c = $(exceptions)
CFLAGS-ioputs.c = $(exceptions)
CFLAGS-ioseekoff.c = $(exceptions)
CFLAGS-ioseekpos.c = $(exceptions)
CFLAGS-iosetbuffer.c = $(exceptions)
CFLAGS-iosetvbuf.c = $(exceptions)
CFLAGS-ioungetc.c = $(exceptions)
CFLAGS-ioungetwc.c = $(exceptions)
CFLAGS-oldfileops.c = $(exceptions)
CFLAGS-oldiofclose.c = $(exceptions)
CFLAGS-oldiofgetpos64.c = $(exceptions)
CFLAGS-oldiofgetpos.c = $(exceptions)
CFLAGS-oldiofsetpos64.c = $(exceptions)
CFLAGS-oldiofsetpos.c = $(exceptions)
CFLAGS-peekc.c = $(exceptions)
CFLAGS-putc.c = $(exceptions)
CFLAGS-putchar.c = $(exceptions)
CFLAGS-putwc.c = $(exceptions)
CFLAGS-putwchar.c = $(exceptions)
CFLAGS-rewind.c = $(exceptions)
CFLAGS-wfileops.c = $(exceptions)
2003-08-29 19:58:49 +00:00
CFLAGS-wgenops.c = $(exceptions)
# XXX Do we need filedoalloc and wfiledoalloc? Others?
2000-06-23 06:22:36 +00:00
CFLAGS-tst_putwc.c = -DOBJPFX=\"$(objpfx)\"
2000-07-20 08:56:12 +00:00
tst_wprintf2-ARGS = "Some Text"
2000-07-25 21:09:46 +00:00
tst-widetext-ENV = LOCPATH=$(common-objpfx)localedata LANGUAGE=C
2001-07-27 18:09:56 +00:00
tst-fopenloc-ENV = LOCPATH=$(common-objpfx)localedata \
MALLOC_TRACE=$(objpfx)tst-fopenloc.mtrace
2001-08-09 02:01:10 +00:00
tst-fgetws-ENV = LOCPATH=$(common-objpfx)localedata
tst-ungetwc1-ENV = LOCPATH=$(common-objpfx)localedata
2001-08-09 08:50:50 +00:00
tst-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
2002-05-14 21:26:41 +00:00
bug-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata
2001-08-09 19:10:37 +00:00
tst-swscanf-ENV = LOCPATH=$(common-objpfx)localedata
2001-07-27 18:09:56 +00:00
generated = tst-fopenloc.mtrace tst-fopenloc.check
2000-07-25 21:09:46 +00:00
1998-05-08 15:16:22 +00:00
aux := fileops genops stdfiles stdio strops
1997-10-13 01:27:24 +00:00
ifeq ($(versioning),yes)
aux += oldfileops oldstdfiles
endif
1997-12-14 22:24:57 +00:00
shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \
1999-06-21 13:38:44 +00:00
oldstdfiles oldiopopen oldpclose oldtmpfile \
oldiofgetpos oldiofgetpos64 oldiofsetpos \
oldiofsetpos64
1997-10-15 05:34:02 +00:00
2001-04-10 03:10:20 +00:00
distribute := iolibio.h libioP.h strfile.h Banner test-freopen.sh \
fd_to_filename.h
include ../Rules
2000-11-17 00:27:46 +00:00
2001-02-12 14:23:41 +00:00
ifeq (no,$(cross-compiling))
2001-07-27 18:09:56 +00:00
tests: $(objpfx)test-freopen.out $(objpfx)tst-fopenloc.check
2001-02-12 14:23:41 +00:00
endif
2000-11-17 00:27:46 +00:00
$(objpfx)test-freopen.out: test-freopen.sh $(objpfx)test-freopen
2001-02-12 14:24:51 +00:00
$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' \
2001-02-11 12:07:07 +00:00
$(common-objpfx)libio/
2001-07-27 18:09:56 +00:00
$(objpfx)tst-fopenloc.check: $(objpfx)tst-fopenloc.out
cmp ../iconvdata/testdata/ISO-8859-1..UTF8 $(objpfx)tst-fopenloc.out \
> $@
$(common-objpfx)malloc/mtrace $(objpfx)tst-fopenloc.mtrace >> $@