Annotation of coherent/d/lib/libc/stdio/Makefile, revision 1.1.1.1

1.1       root        1: # /usr/src/libc/stdio/Makefile 2/14/91
                      2: 
                      3: # The order of stdio objects in libc.a is significant and a bit complicated.
                      4: # To reduce the size of linked objects when possible,
                      5: # libc includes both real and fake versions of _dtefg() (floating point output)
                      6: # and of _finish() (close open FILEs).
                      7: # If a program requires floating point output, the "-f" flag to /bin/cc
                      8: # produces an "-u _dtefg_" argument to /bin/ld, forcing the link to include
                      9: # the real floating point output routine from _dtefg.o.
                     10: # Otherwise, /bin/ld resolves the reference to _dtefg() in printf.o with
                     11: # the much smaller fake floating point output routine from _fdtefg.o.
                     12: # To avoid linking in extra stdio overhead when not required,
                     13: # libc.a should contain _fp.o, finit.o, exit.o and _finish.o, in that order,
                     14: # after stdio objects from $(OBJ) and from the machine-dependent subdirectory,
                     15: # If a program uses stdio, /bin/ld will link in finit.o;
                     16: # finit.o defines the real _finish() which closes all open files for exit().
                     17: # If a program does not use stdio, /bin/ld will link in exit.o but not finit.o;
                     18: # then it resolves the _finish() reference in exit() with the fake _finish.o,
                     19: # which does nothing.
                     20: 
                     21: OBJ=\
                     22:        _fgetb.o\
                     23:        _fgetc.o\
                     24:        _fgeteof.o\
                     25:        _fopen.o\
                     26:        _fpseek.o\
                     27:        _fputb.o\
                     28:        _fputc.o\
                     29:        _fputt.o\
                     30:        _stropen.o\
                     31:        fclose.o\
                     32:        fdopen.o\
                     33:        fflush.o\
                     34:        fgetc.o\
                     35:        fgets.o\
                     36:        fopen.o\
                     37:        fputc.o\
                     38:        fputs.o\
                     39:        fread.o\
                     40:        freopen.o\
                     41:        fseek.o\
                     42:        ftell.o\
                     43:        fwrite.o\
                     44:        getc.o\
                     45:        getchar.o\
                     46:        gets.o\
                     47:        popen.o\
                     48:        putc.o\
                     49:        putchar.o\
                     50:        puts.o\
                     51:        rewind.o\
                     52:        scanf.o\
                     53:        setbuf.o\
                     54:        ungetc.o
                     55: 
                     56: # N.B. The order of objects in $(OBJ2) is significant,
                     57: # see the lengthy comment above and be extremely careful if you change it.
                     58: OBJ2=\
                     59:        _dtefg.o\
                     60:        printf.o\
                     61:        _fdtefg.o\
                     62:        _fp.o\
                     63:        finit.o\
                     64:        exit.o\
                     65:        _finish.o
                     66: 
                     67: # Primary target.
                     68: all:   stdioi8086 STDIO
                     69:        : libc/stdio done.
                     70: 
                     71: # Pseudotargets.
                     72: stdioi8086:
                     73:        make SRCPATH=$(SRCPATH)/i8086
                     74: # This assumes that either libc.a is being made from scratch
                     75: # or the names of the objects in $(OBJ2) are unchanged.
                     76: # Otherwise, "ar rkus lib.c $?" may not preserve the required object order.
                     77: # It could be done more correctly with ar positional specifications.
                     78: STDIO: $(OBJ) $(OBJ2)
                     79:        ar rkus libc.a $?
                     80:        touch $@
                     81: 
                     82: # Secondary targets.
                     83: _dtefg.o:      _dtefg.c
                     84: _fdtefg.o:     _fdtefg.c
                     85: _fgetb.o:      _fgetb.c
                     86: _fgetc.o:      _fgetc.c
                     87: _fgeteof.o:    _fgeteof.c
                     88: _finish.o:     _finish.c
                     89: _fopen.o:      _fopen.c
                     90: _fp.o:         _fp.c
                     91: _fpseek.o:     _fpseek.c
                     92: _fputb.o:      _fputb.c
                     93: _fputc.o:      _fputc.c
                     94: _fputt.o:      _fputt.c
                     95: _stropen.o:    _stropen.c
                     96: exit.o:                exit.c
                     97: fclose.o:      fclose.c
                     98: fdopen.o:      fdopen.c
                     99: fflush.o:      fflush.c
                    100: fgetc.o:       fgetc.c
                    101: fgets.o:       fgets.c
                    102: finit.o:       finit.c
                    103: fopen.o:       fopen.c
                    104: fputc.o:       fputc.c
                    105: fputs.o:       fputs.c
                    106: fread.o:       fread.c
                    107: freopen.o:     freopen.c
                    108: fseek.o:       fseek.c
                    109: ftell.o:       ftell.c
                    110: fwrite.o:      fwrite.c
                    111: getc.o:                getc.c
                    112: getchar.o:     getchar.c
                    113: gets.o:                gets.c
                    114: popen.o:       popen.c
                    115: printf.o:      printf.c
                    116: putc.o:                putc.c
                    117: putchar.o:     putchar.c
                    118: puts.o:                puts.c
                    119: rewind.o:      rewind.c
                    120: scanf.o:       scanf.c
                    121: setbuf.o:      setbuf.c
                    122: ungetc.o:      ungetc.c
                    123: 
                    124: # end of /usr/src/libc/stdio/Makefile

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.