|
|
1.1 root 1: #
2: # Copyright (c) 1980 Regents of the University of California.
3: # All rights reserved. The Berkeley software License Agreement
4: # specifies the terms and conditions for redistribution.
5: #
6: # @(#)Makefile 5.4 (Berkeley) 9/5/85
7: #
8: # Several routines have been rewritten in assembly language for the VAX.
9: # If you are not running on a VAX, you should use the original C sources
10: # which are included in this directory. Regretably we do not have a C
11: # version of doprnt().
12: #
13: #ifndef vax
14: #SRCS= ${STDSRC} ${VAXSRC}
15: #OBJS= ${STDOBJ} ${VAXOBJ}
16: #else
17: SRCS= ${STDSRC}
18: OBJS= ${STDOBJ}
19: #endif not vax
20:
21: CFLAGS= -O ${DEFS}
22:
23: STDSRC= clrerr.c doscan.c \
24: exit.c fdopen.c fgetc.c filbuf.c findiop.c flsbuf.c fopen.c \
25: fprintf.c fputc.c fread.c freopen.c fseek.c ftell.c \
26: fwrite.c getchar.c getw.c printf.c putchar.c \
27: putw.c rew.c scanf.c setbuf.c setbuffer.c sibuf.c sobuf.c \
28: sprintf.c strout.c ungetc.c
29: VAXSRC= fgets.c fputs.c gets.c puts.c
30: STDOBJ= clrerr.o doscan.o \
31: exit.o fdopen.o fgetc.o filbuf.o findiop.o flsbuf.o fopen.o \
32: fprintf.o fputc.o fread.o freopen.o fseek.o ftell.o \
33: fwrite.o getchar.o getw.o printf.o putchar.o \
34: putw.o rew.o scanf.o setbuf.o setbuffer.o sibuf.o sobuf.o \
35: sprintf.o strout.o ungetc.o
36: VAXOBJ= fgets.o fputs.o gets.o puts.o
37: TAGSFILE=tags
38:
39: .c.o:
40: ${CC} -p ${CFLAGS} -c $*.c
41: -ld -X -r $*.o
42: mv a.out profiled/$*.o
43: ${CC} ${CFLAGS} -c $*.c
44: -ld -x -r $*.o
45: mv a.out $*.o
46:
47: stdiolib stdiolib_p: ${OBJS}
48: @echo "building profiled stdiolib"
49: @cd profiled; ar cru ../stdiolib_p ${OBJS}
50: @echo "building normal stdiolib"
51: @ar cru stdiolib ${OBJS}
52:
53: tags:
54: cwd=`pwd`; \
55: for i in ${SRCS}; do \
56: ctags -a -f ${TAGSFILE} $$cwd/$$i; \
57: done
58:
59: clean:
60: rm -f stdiolib stdiolib_p *.o profiled/*.o tags Makefile.bak
61:
62: depend:
63: for i in ${SRCS}; do \
64: cc -M ${CFLAGS} $$i | awk ' { if ($$1 != prev) \
65: { if (rec != "") print rec; rec = $$0; prev = $$1; } \
66: else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
67: else rec = rec " " $$2 } } \
68: END { print rec } ' >> makedep; done
69: echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
70: echo '$$r makedep' >>eddep
71: echo 'w' >>eddep
72: cp Makefile Makefile.bak
73: ed - Makefile < eddep
74: rm eddep makedep
75: echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
76: echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
77: echo '# see make depend above' >> Makefile
78:
79: # DO NOT DELETE THIS LINE -- make depend uses it
80:
81: clrerr.o: clrerr.c /usr/include/stdio.h
82: doscan.o: doscan.c /usr/include/stdio.h /usr/include/ctype.h
83: exit.o: exit.c
84: fdopen.o: fdopen.c /usr/include/sys/types.h /usr/include/sys/file.h
85: fdopen.o: /usr/include/stdio.h
86: fgetc.o: fgetc.c /usr/include/stdio.h
87: filbuf.o: filbuf.c /usr/include/stdio.h /usr/include/sys/types.h
88: filbuf.o: /usr/include/sys/stat.h
89: findiop.o: findiop.c /usr/include/stdio.h
90: flsbuf.o: flsbuf.c /usr/include/stdio.h /usr/include/sys/types.h
91: flsbuf.o: /usr/include/sys/stat.h
92: fopen.o: fopen.c /usr/include/sys/types.h /usr/include/sys/file.h
93: fopen.o: /usr/include/stdio.h
94: fprintf.o: fprintf.c /usr/include/stdio.h
95: fputc.o: fputc.c /usr/include/stdio.h
96: fread.o: fread.c /usr/include/stdio.h
97: freopen.o: freopen.c /usr/include/sys/types.h /usr/include/sys/file.h
98: freopen.o: /usr/include/stdio.h
99: fseek.o: fseek.c /usr/include/stdio.h
100: ftell.o: ftell.c /usr/include/stdio.h
101: fwrite.o: fwrite.c /usr/include/stdio.h
102: getchar.o: getchar.c /usr/include/stdio.h
103: getw.o: getw.c /usr/include/stdio.h
104: printf.o: printf.c /usr/include/stdio.h
105: putchar.o: putchar.c /usr/include/stdio.h
106: putw.o: putw.c /usr/include/stdio.h
107: rew.o: rew.c /usr/include/stdio.h
108: scanf.o: scanf.c /usr/include/stdio.h
109: setbuf.o: setbuf.c /usr/include/stdio.h
110: setbuffer.o: setbuffer.c /usr/include/stdio.h
111: sibuf.o: sibuf.c /usr/include/stdio.h
112: sobuf.o: sobuf.c /usr/include/stdio.h
113: sprintf.o: sprintf.c /usr/include/stdio.h
114: strout.o: strout.c /usr/include/stdio.h
115: ungetc.o: ungetc.c /usr/include/stdio.h
116: # DEPENDENCIES MUST END AT END OF FILE
117: # IF YOU PUT STUFF HERE IT WILL GO AWAY
118: # see make depend above
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.