1997-08-22 00:57:35 +02:00
|
|
|
# This file is a shell script fragment that supplies the information
|
|
|
|
# necessary for a configure script to process the program in
|
|
|
|
# this directory. For more information, look at ../configure.
|
|
|
|
|
|
|
|
configdirs=
|
|
|
|
srctrigger=stdio.h
|
|
|
|
srcname="libio/stdio"
|
|
|
|
package_makefile_frag=../Make.pack
|
1998-01-28 10:30:03 +01:00
|
|
|
package_makefile_rules_frag=../Make.pack.r
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
# per-host:
|
|
|
|
|
|
|
|
# per-target:
|
|
|
|
|
|
|
|
LIBDIR=yes
|
|
|
|
TO_TOPDIR=../../
|
|
|
|
ALL=nothing
|
|
|
|
MOSTLYCLEAN='*.o pic stamp-picdir core stdio.list'
|
1998-01-28 10:30:03 +01:00
|
|
|
(. ${srcdir}/../config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
|
1997-08-22 00:57:35 +02:00
|
|
|
|
|
|
|
# post-target:
|
|
|
|
|
|
|
|
# Certain files that are used to build a C library (such as fprintf.o)
|
|
|
|
# are compled from the same sources as the ioXXX versions (such as ioprintf.c).
|
|
|
|
# These lines add the appropriate rules.
|
|
|
|
# NOTE: We assume a C compiler that where -o with -c works.
|
|
|
|
# But these files are not built by default anyway ...
|
|
|
|
|
|
|
|
# TODO: remove rename tmpfile tmpnam
|
|
|
|
|
|
|
|
stdio_renames="fclose fflush fgetpos fgets fopen fprintf fputs fread \
|
|
|
|
fscanf fsetpos ftell fwrite getdelim gets perror printf puts \
|
|
|
|
scanf setbuffer setvbuf sprintf sscanf ungetc vsprintf vsscanf"
|
|
|
|
stdio_objects=""
|
|
|
|
|
|
|
|
for file in $stdio_renames ; do
|
|
|
|
cat >>Makefile <<EOF
|
|
|
|
$file.o: \$(srcdir)/../io$file.c
|
|
|
|
if [ -n "\$(PICFLAG)" ]; then \\
|
|
|
|
\$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) \$(PICFLAG) -c \\
|
|
|
|
\$(srcdir)/../io$file.c -D_IO_$file=$file -o pic/$file.o; \\
|
|
|
|
fi
|
|
|
|
\$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) -c \\
|
|
|
|
\$(srcdir)/../io$file.c -D_IO_$file=$file -o $file.o
|
|
|
|
EOF
|
|
|
|
stdio_objects="$stdio_objects $file.o"
|
|
|
|
done
|
|
|
|
sed -e "/STDIO_RENAMED_OBJECTS =/s/=.*/=${stdio_objects}/" <Makefile >tmp
|
|
|
|
mv -f tmp Makefile
|