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 10 11FILES= ${OBJS} 12FILESMODE= ${LIBMODE} 13FILESOWN= ${LIBOWN} 14FILESGRP= ${LIBGRP} 15FILESDIR= ${LIBDIR} 16 17CLEANFILES= ${OBJS} 18CLEANFILES+= crt1.s gcrt1.s Scrt1.s 19 20# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not 21# directly compiled to .o files. 22 23crt1.s: crt1.c 24 ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c 25 sed ${SED_FIX_NOTE} ${.TARGET} 26 27crt1.o: crt1.s 28 ${CC} ${ACFLAGS} -c -o ${.TARGET} crt1.s 29 30gcrt1.s: crt1.c 31 ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c 32 sed ${SED_FIX_NOTE} ${.TARGET} 33 34gcrt1.o: gcrt1.s 35 ${CC} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s 36 37Scrt1.s: crt1.c 38 ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c 39 sed ${SED_FIX_NOTE} ${.TARGET} 40 41Scrt1.o: Scrt1.s 42 ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s 43 44.include <bsd.lib.mk> 45