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