xref: /original-bsd/lib/libcompat/4.3/Makefile (revision 23cd6db2)
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,
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.
16#
17#	@(#)Makefile	5.7 (Berkeley) 03/22/90
18#
19
20DEFS=	-DLIBC_SCCS
21CFLAGS=	-O ${DEFS}
22SRCS=	ecvt.c gcvt.c lsearch.c rexec.c ruserpass.c sibuf.c sobuf.c strout.c
23OBJS=	ecvt.o gcvt.o lsearch.o rexec.o ruserpass.o sibuf.o sobuf.o strout.o
24MAN=	ecvt.0 lsearch.0 rexec.0
25TAGSFILE=tags
26MDIR=	${DESTDIR}/usr/man/cat3
27
28.c.o:
29	@${CC} -p ${CFLAGS} -c $*.c
30	@-ld -X -o profiled/$*.o -r $*.o
31	${CC} ${CFLAGS} -c $*.c
32	@-ld -x -r $*.o
33	@mv a.out $*.o
34
35all: ${OBJS}
36
37tags:
38	rm -f ${TAGSFILE}
39	cwd=`pwd`; \
40	for i in ${SRCS}; do \
41		ctags -a -f ${TAGSFILE} $$cwd/$$i; \
42	done
43
44clean:
45	rm -f *.o profiled/* a.out core ${TAGSFILE}
46
47cleandir: clean
48	rm -f ${MAN} tags .depend
49
50depend:
51	mkdep ${CFLAGS} ${SRCS}
52
53install: ${MAN}
54	cd ../library; rm -f ${OBJS}
55	cd ../profiled; rm -f ${OBJS}
56	ln ${OBJS} ../library
57	cd profiled; ln ${OBJS} ../../profiled
58	install -c -o bin -g bin -m 444 ${MAN} ${MDIR}
59	rm -f ${MDIR}/fcvt.0; ln ${MDIR}/ecvt.0 ${MDIR}/fcvt.0
60	rm -f ${MDIR}/gcvt.0; ln ${MDIR}/ecvt.0 ${MDIR}/gcvt.0
61