xref: /original-bsd/lib/libcompat/4.3/Makefile (revision be29bfce)
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 this notice is preserved and that due credit is given
7# to the University of California at Berkeley. The name of the University
8# may not be used to endorse or promote products derived from this
9# software without specific prior written permission. This software
10# is provided ``as is'' without express or implied warranty.
11#
12#	@(#)Makefile	5.3 (Berkeley) 05/20/88
13#
14DEFS=	-DLIBC_SCCS
15CFLAGS=	-O ${DEFS}
16SRCS=	ecvt.c gcvt.c sibuf.c sobuf.c strout.c
17OBJS=	ecvt.o gcvt.o sibuf.o sobuf.o strout.o
18TAGSFILE=tags
19
20.c.o:
21	@${CC} -p ${CFLAGS} -c $*.c
22	@-ld -X -o profiled/$*.o -r $*.o
23	${CC} ${CFLAGS} -c $*.c
24	@-ld -x -r $*.o
25	@mv a.out $*.o
26
27all: ${OBJS}
28
29link: ${OBJS}
30	(cd ../library; rm -f ${OBJS})
31	(cd ../profiled; rm -f ${OBJS})
32	ln ${OBJS} ../library
33	(cd profiled; ln ${OBJS} ../../profiled)
34
35tags:
36	cwd=`pwd`; \
37	for i in ${SRCS}; do \
38		ctags -a -f ${TAGSFILE} $$cwd/$$i; \
39	done
40
41clean:
42	rm -f *.o profiled/* a.out core ${TAGSFILE}
43
44depend:
45	mkdep ${CFLAGS} ${SRCS}
46
47# DO NOT DELETE THIS LINE -- mkdep uses it.
48# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
49
50ecvt.o: ecvt.c
51gcvt.o: gcvt.c
52sibuf.o: sibuf.c /usr/include/stdio.h
53sobuf.o: sobuf.c /usr/include/stdio.h
54strout.o: strout.c /usr/include/stdio.h
55
56# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
57