xref: /original-bsd/lib/libcompat/4.1/Makefile (revision 5fd6b0d9)
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.12 (Berkeley) 08/30/88
18#
19DEFS=	-DLIBC_SCCS
20CFLAGS=	-O ${DEFS}
21
22STDSRCS=ftime.c gtty.c nice.c pause.c rand.c stty.c tell.c times.c \
23	utime.c vlimit.c vtimes.c
24STDOBJS=ftime.o gtty.o nice.o pause.o rand.o stty.o tell.o times.o \
25	utime.o vlimit.o vtimes.o
26
27# these should just be pitched, but in the interest of compatibility...
28TRASHSRCS=getpw.c
29TRASHOBJS=getpw.o
30SRCS=	${STDSRCS} ${TRASHSRCS}
31OBJS=	${STDOBJS} ${TRASHOBJS}
32TAGSFILE=tags
33
34.c.o:
35	@${CC} -p ${CFLAGS} -c $*.c
36	@-ld -X -o profiled/$*.o -r $*.o
37	${CC} ${CFLAGS} -c $*.c
38	@-ld -x -r $*.o
39	@mv a.out $*.o
40
41all: ${OBJS}
42
43link: ${OBJS}
44	(cd ../library; rm -f ${OBJS})
45	(cd ../profiled; rm -f ${OBJS})
46	ln ${OBJS} ../library
47	(cd profiled; ln ${OBJS} ../../profiled)
48
49tags:
50	cwd=`pwd`; \
51	for i in ${SRCS}; do \
52		ctags -a -f ${TAGSFILE} $$cwd/$$i; \
53	done
54
55clean:
56	rm -f *.o profiled/* a.out core ${TAGSFILE}
57
58depend:
59	mkdep ${CFLAGS} ${SRCS}
60
61