1 # This file is a shell script fragment that supplies the information
2 # necessary for a configure script to process the program in
3 # this directory. For more information, look at ../configure.
8 package_makefile_frag=../Make.pack
17 MOSTLYCLEAN='*.o pic stamp-picdir core stdio.list'
18 (. ${srcdir}/../config.shared) >${package_makefile_frag}
22 # Certain files that are used to build a C library (such as fprintf.o)
23 # are compled from the same sources as the ioXXX versions (such as ioprintf.c).
24 # These lines add the appropriate rules.
25 # NOTE: We assume a C compiler that where -o with -c works.
26 # But these files are not built by default anyway ...
28 # TODO: remove rename tmpfile tmpnam
30 stdio_renames="fclose fflush fgetpos fgets fopen fprintf fputs fread \
31 fscanf fsetpos ftell fwrite getdelim gets perror printf puts \
32 scanf setbuffer setvbuf sprintf sscanf ungetc vsprintf vsscanf"
35 for file in $stdio_renames ; do
37 $file.o: \$(srcdir)/../io$file.c
38 if [ -n "\$(PICFLAG)" ]; then \\
39 \$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) \$(PICFLAG) -c \\
40 \$(srcdir)/../io$file.c -D_IO_$file=$file -o pic/$file.o; \\
42 \$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) -c \\
43 \$(srcdir)/../io$file.c -D_IO_$file=$file -o $file.o
45 stdio_objects="$stdio_objects $file.o"
47 sed -e "/STDIO_RENAMED_OBJECTS =/s/=.*/=${stdio_objects}/" <Makefile >tmp