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