xref: /original-bsd/lib/csu/tahoe/Makefile (revision da818fbb)
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.8 (Berkeley) 03/15/90
18#
19DEFS=	-DLIBC_SCCS
20CFLAGS=	-O ${DEFS}
21CSRCS=	gmon.c mon.c
22ASRCS=	crt0.s  mcrt0.s
23OBJS=	crt0.o mcrt0.o gcrt0.o
24TAGSFILE=tags
25
26.s.o:
27	${AS} -o $*.o $*.s
28	ld -x -r $*.o
29	mv ${OBJDIR}a.out ${OBJDIR}$*.o
30
31all: ${OBJS}
32
33mcrt0.o: moncrt0.o mon.o
34	ld -x -r -o $@ moncrt0.o mon.o
35
36gcrt0.o: moncrt0.o gmon.o
37	ld -x -r -o $@ moncrt0.o gmon.o
38
39moncrt0.o: mcrt0.s
40	${AS} -o $@ mcrt0.s
41
42mon.o: mon.c
43	${CC} -S ${CFLAGS} mon.c
44	ex - mon.s < mon.ex
45	${AS} -o $@ mon.s
46	rm -f mon.s
47
48gmon.o: gmon.c
49	${CC} -S ${CFLAGS} gmon.c
50	ex - gmon.s < mon.ex
51	${AS} -o $@ gmon.s
52	rm -f gmon.s
53
54install:
55	install -o bin -g bin -m 444 crt0.o ${DESTDIR}/usr/lib/crt0.o
56	install -o bin -g bin -m 444 mcrt0.o ${DESTDIR}/usr/lib/mcrt0.o
57	install -o bin -g bin -m 444 gcrt0.o ${DESTDIR}/usr/lib/gcrt0.o
58
59clean:
60	rm -f ${OBJDIR}*.o ${OBJDIR}a.out core
61
62cleandir: clean
63	rm -f ${MAN} tags .depend
64
65tags:
66	cwd=`pwd`; \
67	for i in ${CSRCS}; do \
68		ctags -a -f ${TAGSFILE} $$cwd/$$i; \
69	done
70	(P=`pwd`; \
71	egrep "^ENTRY(.*)|^SYSCALL(.*)" ${ASRCS} | sed \
72"s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 $$P/\1 /^\2(\3\4$$/;" \
73		>> ${TAGSFILE})
74
75depend:
76