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