date and time created 88/08/31 23:01:12 by bostic
[unix-history] / usr / src / lib / libutil / Makefile
CommitLineData
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
20DEFS= -DLIBC_SCCS
21CFLAGS= -O ${DEFS}
22SRCS= login.c logout.c logwtmp.c
23OBJS= 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
32all: libutil libutil_p
33
34libutil 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
42tags:
43
44clean:
45 rm -f ${OBJS} profiled/*.o libutil libutil_p
46
47depend:
48 mkdep ${CFLAGS} ${SRCS}
49
50install:
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