1# $FreeBSD$ 2 3.PATH: ${.CURDIR}/../common 4 5SRCS= crt1.c crti.S crtn.S 6OBJS= ${SRCS:N*.h:R:S/$/.o/g} 7OBJS+= Scrt1.o gcrt1.o 8CFLAGS+= -I${.CURDIR}/../common \ 9 -I${.CURDIR}/../../libc/include 10CFLAGS+= -fno-omit-frame-pointer 11 12FILES= ${OBJS} 13FILESMODE= ${LIBMODE} 14FILESOWN= ${LIBOWN} 15FILESGRP= ${LIBGRP} 16FILESDIR= ${LIBDIR} 17 18CLEANFILES= ${OBJS} 19CLEANFILES+= crt1.s gcrt1.s Scrt1.s 20 21# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not 22# directly compiled to .o files. 23 24crt1.s: crt1.c 25 ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c 26 sed ${SED_FIX_NOTE} ${.TARGET} 27 28crt1.o: crt1.s 29 ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s 30 31gcrt1.s: crt1.c 32 ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c 33 sed ${SED_FIX_NOTE} ${.TARGET} 34 35gcrt1.o: gcrt1.s 36 ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s 37 38Scrt1.s: crt1.c 39 ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c 40 sed ${SED_FIX_NOTE} ${.TARGET} 41 42Scrt1.o: Scrt1.s 43 ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s 44 45.include <bsd.lib.mk> 46