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
9 package_makefile_rules_frag=../Make.pack.r
18 MOSTLYCLEAN='*.o pic stamp-picdir core stdio.list'
19 (. ${srcdir}/../config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
23 # Certain files that are used to build a C library (such as fprintf.o)
24 # are compled from the same sources as the ioXXX versions (such as ioprintf.c).
25 # These lines add the appropriate rules.
26 # NOTE: We assume a C compiler that where -o with -c works.
27 # But these files are not built by default anyway ...
29 # TODO: remove rename tmpfile tmpnam
31 stdio_renames="fclose fflush fgetpos fgets fopen fprintf fputs fread \
32 fscanf fsetpos ftell fwrite getdelim gets perror printf puts \
33 scanf setbuffer setvbuf sprintf sscanf ungetc vsprintf vsscanf"
36 for file in $stdio_renames ; do
38 $file.o: \$(srcdir)/../io$file.c
39 if [ -n "\$(PICFLAG)" ]; then \\
40 \$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) \$(PICFLAG) -c \\
41 \$(srcdir)/../io$file.c -D_IO_$file=$file -o pic/$file.o; \\
43 \$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) -c \\
44 \$(srcdir)/../io$file.c -D_IO_$file=$file -o $file.o
46 stdio_objects="$stdio_objects $file.o"
48 sed -e "/STDIO_RENAMED_OBJECTS =/s/=.*/=${stdio_objects}/" <Makefile >tmp