BSD 4_3_Tahoe release
[unix-history] / usr / src / lib / libc / stdio / Makefile
CommitLineData
cae03c9a 1#
ca67e7b4
C
2# Copyright (c) 1988 Regents of the University of California.
3# All rights reserved.
cae03c9a 4#
ca67e7b4
C
5# Redistribution and use in source and binary forms are permitted
6# provided that the above copyright notice and this paragraph are
7# duplicated in all such forms and that any documentation,
8# advertising materials, and other materials related to such
9# distribution and use acknowledge that the software was developed
10# by the University of California, Berkeley. The name of the
11# University may not be used to endorse or promote products derived
12# from this software without specific prior written permission.
13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
95f51977 16#
ca67e7b4 17# @(#)Makefile 5.9 (Berkeley) 6/27/88
95f51977 18#
ca67e7b4
C
19# Many of these routines have been rewritten in assembly. The assembly
20# source can be found in the directory stdio.${MACHINE}. The macro
21# ${STDSRC} lists the files needed by all current implementations. The
22# macros ${VAXSRC} and ${TAHOESRC} are the supplemental files needed by
23# the VAX and the TAHOE. ${PORTSRC} is a list of all of the supplemental
24# files.
cae03c9a 25
ca67e7b4 26DEFS= -DLIBC_SCCS
95f51977 27CFLAGS= -O ${DEFS}
ca67e7b4
C
28STDSRC= clrerr.c doprnt.c doscan.c exit.c fdopen.c fgetc.c filbuf.c \
29 findiop.c flsbuf.c fopen.c fprintf.c fputc.c fread.c freopen.c \
30 fseek.c ftell.c fwrite.c getchar.c getw.c printf.c putchar.c \
31 putw.c rew.c scanf.c setbuf.c setbuffer.c sprintf.c ungetc.c \
32 vfprintf.c vprintf.c vsprintf.c
33STDOBJ= clrerr.o doprnt.o doscan.o exit.o fdopen.o fgetc.o filbuf.o \
34 findiop.o flsbuf.o fopen.o fprintf.o fputc.o fread.o freopen.o \
35 fseek.o ftell.o fwrite.o getchar.o getw.o printf.o putchar.o \
36 putw.o rew.o scanf.o setbuf.o setbuffer.o sprintf.o ungetc.o \
37 vfprintf.o vprintf.o vsprintf.o
38VAXSRC=
39VAXOBJ=
40TAHOESRC= fgets.c fputs.c gets.c puts.c
41TAHOEOBJ= fgets.o fputs.o gets.o puts.o
42PORTSRC= fgets.c fputs.c gets.c puts.c
43PORTOBJ= fgets.o fputs.o gets.o puts.o
95f51977 44TAGSFILE=tags
cae03c9a
C
45
46.c.o:
ca67e7b4
C
47 @${CC} -p ${CFLAGS} -c $*.c
48 @-ld -X -o profiled/$*.o -r $*.o
cae03c9a 49 ${CC} ${CFLAGS} -c $*.c
ca67e7b4
C
50 @-ld -x -r $*.o
51 @mv a.out $*.o
52
53all: lib.${MACHINE}
54
55link: lib.${MACHINE} link.${MACHINE}
56
57link.vax:
58 (cd ../library; rm -f ${STDOBJ} ${VAXOBJ})
59 (cd ../profiled; rm -f ${STDOBJ} ${VAXOBJ})
60 ln ${STDOBJ} ${VAXOBJ} ../library
61 (cd profiled; ln ${STDOBJ} ${VAXOBJ} ../../profiled)
62
63link.tahoe:
64 (cd ../library; rm -f ${STDOBJ} ${TAHOEOBJ})
65 (cd ../profiled; rm -f ${STDOBJ} ${TAHOEOBJ})
66 ln ${STDOBJ} ${TAHOEOBJ} ../library
67 (cd profiled; ln ${STDOBJ} ${TAHOEOBJ} ../../profiled)
cae03c9a 68
cae03c9a 69
ca67e7b4
C
70lib.vax: ${STDOBJ} ${VAXOBJ}
71
72lib.tahoe: ${STDOBJ} ${TAHOEOBJ}
73
74tags: tags.${MACHINE}
75
76tags.vax:
95f51977 77 cwd=`pwd`; \
ca67e7b4
C
78 for i in ${STDSRC} ${VAXSRC}; do \
79 ctags -a -f ${TAGSFILE} $$cwd/$$i; \
80 done
81
82tags.tahoe:
83 cwd=`pwd`; \
84 for i in ${STDSRC} ${TAHOESRC}; do \
95f51977
C
85 ctags -a -f ${TAGSFILE} $$cwd/$$i; \
86 done
87
cae03c9a 88clean:
ca67e7b4
C
89 rm -f *.o profiled/* a.out core ${TAGSFILE}
90
91depend: depend.${MACHINE}
92
93depend.vax: ${STDSRC} ${VAXSRC}
94 mkdep ${CFLAGS} ${STDSRC} ${VAXSRC}
95
96depend.tahoe: ${STDSRC} ${TAHOESRC}
97 mkdep ${CFLAGS} ${STDSRC} ${TAHOESRC}
98
99# DO NOT DELETE THIS LINE -- mkdep uses it.
100# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
95f51977
C
101
102clrerr.o: clrerr.c /usr/include/stdio.h
ca67e7b4
C
103doprnt.o: doprnt.c /usr/include/sys/types.h /usr/include/varargs.h
104doprnt.o: /usr/include/stdio.h /usr/include/ctype.h
95f51977
C
105doscan.o: doscan.c /usr/include/stdio.h /usr/include/ctype.h
106exit.o: exit.c
107fdopen.o: fdopen.c /usr/include/sys/types.h /usr/include/sys/file.h
108fdopen.o: /usr/include/stdio.h
109fgetc.o: fgetc.c /usr/include/stdio.h
110filbuf.o: filbuf.c /usr/include/stdio.h /usr/include/sys/types.h
111filbuf.o: /usr/include/sys/stat.h
ca67e7b4 112findiop.o: findiop.c /usr/include/stdio.h /usr/include/errno.h
95f51977
C
113flsbuf.o: flsbuf.c /usr/include/stdio.h /usr/include/sys/types.h
114flsbuf.o: /usr/include/sys/stat.h
115fopen.o: fopen.c /usr/include/sys/types.h /usr/include/sys/file.h
116fopen.o: /usr/include/stdio.h
117fprintf.o: fprintf.c /usr/include/stdio.h
118fputc.o: fputc.c /usr/include/stdio.h
119fread.o: fread.c /usr/include/stdio.h
120freopen.o: freopen.c /usr/include/sys/types.h /usr/include/sys/file.h
121freopen.o: /usr/include/stdio.h
122fseek.o: fseek.c /usr/include/stdio.h
123ftell.o: ftell.c /usr/include/stdio.h
124fwrite.o: fwrite.c /usr/include/stdio.h
125getchar.o: getchar.c /usr/include/stdio.h
126getw.o: getw.c /usr/include/stdio.h
127printf.o: printf.c /usr/include/stdio.h
128putchar.o: putchar.c /usr/include/stdio.h
129putw.o: putw.c /usr/include/stdio.h
ca67e7b4
C
130rew.o: rew.c /usr/include/sys/types.h /usr/include/sys/file.h
131rew.o: /usr/include/stdio.h
95f51977
C
132scanf.o: scanf.c /usr/include/stdio.h
133setbuf.o: setbuf.c /usr/include/stdio.h
134setbuffer.o: setbuffer.c /usr/include/stdio.h
95f51977 135sprintf.o: sprintf.c /usr/include/stdio.h
95f51977 136ungetc.o: ungetc.c /usr/include/stdio.h
ca67e7b4
C
137vfprintf.o: vfprintf.c /usr/include/stdio.h /usr/include/varargs.h
138vprintf.o: vprintf.c /usr/include/stdio.h /usr/include/varargs.h
139vsprintf.o: vsprintf.c /usr/include/stdio.h /usr/include/varargs.h
140fgets.o: fgets.c /usr/include/stdio.h
141fputs.o: fputs.c /usr/include/stdio.h
142gets.o: gets.c /usr/include/stdio.h
143puts.o: puts.c /usr/include/stdio.h
144
145# IF YOU PUT ANYTHING HERE IT WILL GO AWAY