1# $FreeBSD: src/lib/csu/amd64/Makefile SVN 232832 2012/03/11 kib $ 2 3SRCS= crt1.c crti.S crtn.S 4OBJS+= Scrt1.o gcrt1.o 5INSTALLOBJS+= crt1.o crti.o crtn.o Scrt1.o gcrt1.o 6CLEANFILES= crt1.s gcrt1.s Scrt1.s 7CLEANFILES+= crt1.o crti.o crtn.o Scrt1.o gcrt1.o 8MKDEPINTDEPS= crt1.o:crt1.s 9MKDEPINTDEPS+= crt1.o:gcrt1.s 10MKDEPINTDEPS+= crt1.o:Scrt1.s 11NOIMPLICITDEPEND= 12WARNS?= 2 13 14CFLAGS+= -I${CSUDIR}/../common \ 15 -I${CSUDIR}/../../libc/include 16CFLAGS+= -fno-omit-frame-pointer 17CFLAGS+= -fno-asynchronous-unwind-tables 18 19# explictly do not let the use of -flto (ld.gold blows away os version elf note) 20.if ${CFLAGS:M-flto} 21CFLAGS+= -fno-lto 22.endif 23 24.PATH: ${CSUDIR} ${CSUDIR}/../common 25 26# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not 27# directly compiled to .o files. 28 29crt1.s: crt1.c 30 ${CC} ${CFLAGS:N-flto} -S -o ${.TARGET} ${CSUDIR}/crt1.c 31 sed ${SED_FIX_NOTE} ${.TARGET} 32 33crt1.o: crt1.s 34 ${CC} -c -o ${.TARGET} crt1.s 35 36gcrt1.s: crt1.c 37 ${CC} ${CFLAGS:N-flto} -DGCRT -S -o ${.TARGET} ${CSUDIR}/crt1.c 38 sed ${SED_FIX_NOTE} ${.TARGET} 39 40gcrt1.o: gcrt1.s 41 ${CC} -c -o ${.TARGET} gcrt1.s 42 43Scrt1.s: crt1.c 44 ${CC} ${CFLAGS:N-flto} -fPIC -DPIC -S -o ${.TARGET} ${CSUDIR}/crt1.c 45 sed ${SED_FIX_NOTE} ${.TARGET} 46 47Scrt1.o: Scrt1.s 48 ${CC} -c -o ${.TARGET} Scrt1.s 49