xref: /original-bsd/lib/libutil/Makefile (revision 79386b64)
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.2 (Berkeley) 09/20/88
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
47cleandir: clean
48	rm -f .depend
49
50depend:
51	mkdep ${CFLAGS} ${SRCS}
52
53install:
54	install -o bin -g bin -m 644 libutil ${DESTDIR}/usr/lib/libutil.a
55	ranlib ${DESTDIR}/usr/lib/libutil.a
56	install -o bin -g bin -m 644 libutil_p ${DESTDIR}/usr/lib/libutil_p.a
57	ranlib ${DESTDIR}/usr/lib/libutil_p.a
58
59