xref: /original-bsd/lib/csu/vax/Makefile (revision 5d3a6356)
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.7 (Berkeley) 05/20/88
13#
14#	crt0	Normal C run time startoff
15#	mcrt0	C run time start off for profiling, ``prof'' conventions
16#	gcrt0	C run time start off for profiling, ``gprof'' conventions
17#
18DEFS=-DLIBC_SCCS
19SRCS=	crt0.c mon.c gmon.c
20OBJS=	crt0.o mcrt0.o gcrt0.o mon.o gmon.o
21TAGSFILE=tags
22
23all link: ${OBJS}
24
25install:
26	install -o bin -g bin -m 444 crt0.o ${DESTDIR}/lib/crt0.o
27	install -o bin -g bin -m 444 mcrt0.o ${DESTDIR}/lib/mcrt0.o
28	install -o bin -g bin -m 444 gcrt0.o ${DESTDIR}/usr/lib/gcrt0.o
29
30crt0.o: crt0.c
31	${CC} -S ${DFLAGS} -DCRT0 crt0.c
32	/lib/cpp crt0.s > x.s
33	as -o x.o x.s
34	ld -x -r -o crt0.o x.o
35	rm -f x.s x.o crt0.s
36
37moncrt0.o: crt0.c
38	${CC} -S ${DFLAGS} -DMCRT0 crt0.c
39	/lib/cpp crt0.s > x.s
40	as -o x.o x.s
41	ld -x -r -o moncrt0.o x.o
42	rm -f x.s x.o crt0.s
43
44gcrt0.o: moncrt0.o gmon.o
45	ld -x -r -o gcrt0.o moncrt0.o gmon.o
46
47mcrt0.o: moncrt0.o mon.o
48	ld -x -r -o mcrt0.o moncrt0.o mon.o
49
50mon.o: mon.c mon.ex
51	${CC} -S ${DEFS} ${DFLAGS} mon.c
52	ex - mon.s < mon.ex
53	as -o x.o mon.s
54	ld -x -r -o mon.o x.o
55	rm -f x.o mon.s
56
57gmon.o: gmon.c gmon.h gmon.ex
58	${CC} -S ${DEFS} ${DFLAGS} gmon.c
59	ex - gmon.s < gmon.ex
60	as -o x.o gmon.s
61	ld -x -r -o gmon.o x.o
62	rm -f x.o gmon.s
63
64tags:
65	cwd=`pwd`; \
66	for i in ${SRCS}; do \
67		ctags -a -f ${TAGSFILE} $$cwd/$$i; \
68	done
69
70clean:
71	rm -f *.o a.out core ${TAGSFILE}
72
73lint:	crt0.c
74	lint crt0.c -DMCRT0
75	lint crt0.c -DGCRT0
76	lint crt0.c -DCRT0
77
78depend:
79	mkdep ${CFLAGS} ${SRCS}
80
81# DO NOT DELETE THIS LINE -- mkdep uses it.
82# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
83
84crt0.o: crt0.c
85mon.o: mon.c
86gmon.o: gmon.c
87gmon.o:gmon.h
88
89# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
90