Commit | Line | Data |
---|---|---|
bb0cfa24 | 1 | # |
237d2d6a KB |
2 | # Copyright (c) 1988 Regents of the University of California. |
3 | # All rights reserved. | |
bb0cfa24 | 4 | # |
237d2d6a KB |
5 | # Redistribution and use in source and binary forms are permitted |
6 | # provided that this notice is preserved and that due credit is given | |
7 | # to the University of California at Berkeley. The name of the University | |
8 | # may not be used to endorse or promote products derived from this | |
9 | # software without specific prior written permission. This software | |
10 | # is provided ``as is'' without express or implied warranty. | |
11 | # | |
d3949ea7 | 12 | # @(#)Makefile 5.9 (Berkeley) %G% |
35486962 | 13 | # |
e747638b | 14 | DEFS= -DLIBC_SCCS |
b5fb482c | 15 | CFLAGS= -O ${DEFS} |
d3949ea7 KB |
16 | |
17 | STDSRCS=ftime.c gtty.c nice.c pause.c rand.c strcatn.c strcmpn.c strcpyn.c \ | |
18 | stty.c tell.c times.c utime.c vlimit.c vtimes.c | |
19 | STDOBJS=ftime.o gtty.o nice.o pause.o rand.o strcatn.o strcmpn.o strcpyn.o \ | |
20 | stty.o tell.o times.o utime.o vlimit.o vtimes.o | |
21 | ||
35486962 | 22 | # these should just be pitched, but in the interest of compatibility... |
d3949ea7 KB |
23 | TRASHSRCS=getpw.c |
24 | TRASHOBJS=getpw.o | |
818c32a5 | 25 | SRCS= ${STDSRCS} ${TRASHSRCS} |
d3949ea7 | 26 | OBJS= ${STDOBJS} ${TRASHOBJS} |
818c32a5 | 27 | TAGSFILE=tags |
35486962 SL |
28 | |
29 | .c.o: | |
237d2d6a KB |
30 | @${CC} -p ${CFLAGS} -c $*.c |
31 | @-ld -X -o profiled/$*.o -r $*.o | |
35486962 | 32 | ${CC} ${CFLAGS} -c $*.c |
237d2d6a KB |
33 | @-ld -x -r $*.o |
34 | @mv a.out $*.o | |
35 | ||
36 | all: ${OBJS} | |
35486962 | 37 | |
237d2d6a KB |
38 | link: ${OBJS} |
39 | (cd ../library; rm -f ${OBJS}) | |
40 | (cd ../profiled; rm -f ${OBJS}) | |
41 | ln ${OBJS} ../library | |
42 | (cd profiled; ln ${OBJS} ../../profiled) | |
35486962 | 43 | |
818c32a5 SL |
44 | tags: |
45 | cwd=`pwd`; \ | |
46 | for i in ${SRCS}; do \ | |
47 | ctags -a -f ${TAGSFILE} $$cwd/$$i; \ | |
48 | done | |
49 | ||
35486962 | 50 | clean: |
237d2d6a | 51 | rm -f *.o profiled/* a.out core ${TAGSFILE} |
f0bb30cd JB |
52 | |
53 | depend: | |
e2d34627 KB |
54 | mkdep ${CFLAGS} ${SRCS} |
55 | ||
56 | # DO NOT DELETE THIS LINE -- mkdep uses it. | |
57 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
f0bb30cd | 58 | |
e2d34627 KB |
59 | ftime.o: ftime.c /usr/include/sys/types.h /usr/include/sys/time.h |
60 | ftime.o: /usr/include/time.h | |
61 | gtty.o: gtty.c /usr/include/sgtty.h /usr/include/sys/ioctl.h | |
237d2d6a KB |
62 | gtty.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydefaults.h |
63 | gtty.o: /usr/include/sys/ttydev.h | |
e2d34627 KB |
64 | nice.o: nice.c /usr/include/sys/time.h /usr/include/time.h |
65 | nice.o: /usr/include/sys/resource.h | |
66 | pause.o: pause.c | |
67 | rand.o: rand.c | |
d3949ea7 KB |
68 | strcatn.o: strcatn.c |
69 | strcmpn.o: strcmpn.c | |
70 | strcpyn.o: strcpyn.c | |
e2d34627 | 71 | stty.o: stty.c /usr/include/sgtty.h /usr/include/sys/ioctl.h |
237d2d6a KB |
72 | stty.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydefaults.h |
73 | stty.o: /usr/include/sys/ttydev.h | |
e2d34627 KB |
74 | tell.o: tell.c |
75 | times.o: times.c /usr/include/sys/time.h /usr/include/time.h | |
76 | times.o: /usr/include/sys/resource.h | |
77 | utime.o: utime.c /usr/include/sys/time.h /usr/include/time.h | |
78 | vlimit.o: vlimit.c /usr/include/sys/time.h /usr/include/time.h | |
79 | vlimit.o: /usr/include/sys/resource.h /usr/include/errno.h | |
80 | vtimes.o: vtimes.c /usr/include/sys/time.h /usr/include/time.h | |
81 | vtimes.o: /usr/include/sys/resource.h | |
d3949ea7 | 82 | getpw.o: getpw.c /usr/include/stdio.h |
f0bb30cd | 83 | |
e2d34627 | 84 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |