1# $FreeBSD$ 2 3.PATH: ${.CURDIR:H}/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:H}/common \ 9 -I${SRCTOP}/lib/libc/include 10CFLAGS+= -DCRT_IRELOC_SUPPRESS 11STATIC_CFLAGS+= -mlong-calls 12 13FILES= ${OBJS} 14FILESMODE= ${LIBMODE} 15FILESOWN= ${LIBOWN} 16FILESGRP= ${LIBGRP} 17FILESDIR= ${LIBDIR} 18# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. 19.undef LIBRARIES_ONLY 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} ${STATIC_CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c 29 sed ${SED_FIX_NOTE} ${.TARGET} 30 31crt1.o: crt1.s 32 ${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} crt1.s 33 34gcrt1.s: crt1.c 35 ${CC} ${CFLAGS} ${STATIC_CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c 36 sed ${SED_FIX_NOTE} ${.TARGET} 37 38gcrt1.o: gcrt1.s 39 ${CC} ${CFLAGS:N-g} ${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} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s 47 48.include <bsd.lib.mk> 49