Commit | Line | Data |
---|---|---|
6cf1ea43 KB |
1 | # |
2 | # Copyright (c) 1988 Regents of the University of California. | |
3 | # All rights reserved. | |
4 | # | |
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, advertising | |
8 | # materials, and other materials related to such redistribution and | |
9 | # use acknowledge that the software was developed by the University | |
10 | # of California, Berkeley. The name of the University may not be | |
11 | # used to endorse or promote products derived from this software | |
12 | # without specific prior written permission. THIS SOFTWARE IS PROVIDED | |
13 | # ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | |
14 | # WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND | |
15 | # FITNESS FOR A PARTICULAR PURPOSE. | |
16 | # | |
17 | # @(#)Makefile 5.1 (Berkeley) %G% | |
18 | # | |
19 | ||
20 | DEFS= -DLIBC_SCCS | |
21 | CFLAGS= -O ${DEFS} | |
22 | SRCS= login.c logout.c logwtmp.c | |
23 | OBJS= login.o logout.o logwtmp.o | |
24 | ||
25 | .c.o: | |
26 | @${CC} -p ${CFLAGS} -c $*.c | |
27 | @-ld -X -o profiled/$*.o -r $*.o | |
28 | ${CC} ${CFLAGS} -c $*.c | |
29 | @-ld -x -r $*.o | |
30 | @mv a.out $*.o | |
31 | ||
32 | all: libutil libutil_p | |
33 | ||
34 | libutil libutil_p: ${OBJS} | |
35 | @echo building profiled libutil | |
36 | @cd profiled; ar cu ../libutil_p ${OBJS} | |
37 | ranlib libutil_p | |
38 | @echo building normal libutil | |
39 | @ar cu libutil ${OBJS} | |
40 | ranlib libutil | |
41 | ||
42 | tags: | |
43 | ||
44 | clean: | |
45 | rm -f ${OBJS} profiled/*.o libutil libutil_p | |
46 | ||
47 | depend: | |
48 | mkdep ${CFLAGS} ${SRCS} | |
49 | ||
50 | install: | |
51 | install -o bin -g bin -m 644 libutil ${DESTDIR}/usr/lib/libutil.a | |
52 | ranlib ${DESTDIR}/usr/lib/libutil.a | |
53 | install -o bin -g bin -m 644 libutil_p ${DESTDIR}/usr/lib/libutil_p.a | |
54 | ranlib ${DESTDIR}/usr/lib/libutil_p.a | |
55 |