2008-05-03 11:16:32 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2017-01-20 03:52:16 +00:00
|
|
|
.PATH: ${.CURDIR:H}/common
|
2008-05-03 11:16:32 +00:00
|
|
|
|
|
|
|
SRCS= crt1.c crti.S crtn.S
|
|
|
|
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
|
2009-12-02 16:34:20 +00:00
|
|
|
OBJS+= Scrt1.o gcrt1.o
|
2017-01-20 03:52:16 +00:00
|
|
|
CFLAGS+= -I${.CURDIR:H}/common \
|
|
|
|
-I${SRCTOP}/lib/libc/include
|
2018-10-13 23:52:55 +00:00
|
|
|
CFLAGS+= -DCRT_IRELOC_SUPPRESS
|
2008-05-03 11:16:32 +00:00
|
|
|
|
2015-09-21 18:39:13 +00:00
|
|
|
FILES= ${OBJS}
|
|
|
|
FILESMODE= ${LIBMODE}
|
|
|
|
FILESOWN= ${LIBOWN}
|
|
|
|
FILESGRP= ${LIBGRP}
|
|
|
|
FILESDIR= ${LIBDIR}
|
2015-09-21 21:44:02 +00:00
|
|
|
# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY.
|
|
|
|
.undef LIBRARIES_ONLY
|
2008-05-03 11:16:32 +00:00
|
|
|
|
|
|
|
CLEANFILES= ${OBJS}
|
2011-01-13 20:44:31 +00:00
|
|
|
CLEANFILES+= crt1.s gcrt1.s Scrt1.s
|
2008-05-03 11:16:32 +00:00
|
|
|
|
2011-01-13 20:44:31 +00:00
|
|
|
# See the comment in lib/csu/common/crtbrand.c for the reason crt1.c is not
|
|
|
|
# directly compiled to .o files.
|
2008-05-03 11:16:32 +00:00
|
|
|
|
2011-01-13 20:44:31 +00:00
|
|
|
crt1.s: crt1.c
|
|
|
|
${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1.c
|
2012-03-11 20:04:09 +00:00
|
|
|
sed ${SED_FIX_NOTE} ${.TARGET}
|
2011-01-13 20:44:31 +00:00
|
|
|
|
|
|
|
crt1.o: crt1.s
|
2017-04-07 19:53:14 +00:00
|
|
|
${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} crt1.s
|
2011-01-13 20:44:31 +00:00
|
|
|
|
|
|
|
gcrt1.s: crt1.c
|
|
|
|
${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1.c
|
2012-03-11 20:04:09 +00:00
|
|
|
sed ${SED_FIX_NOTE} ${.TARGET}
|
2011-01-13 20:44:31 +00:00
|
|
|
|
|
|
|
gcrt1.o: gcrt1.s
|
2017-04-07 19:53:14 +00:00
|
|
|
${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} gcrt1.s
|
2011-01-13 20:44:31 +00:00
|
|
|
|
|
|
|
Scrt1.s: crt1.c
|
|
|
|
${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1.c
|
2012-03-11 20:04:09 +00:00
|
|
|
sed ${SED_FIX_NOTE} ${.TARGET}
|
2011-01-13 20:44:31 +00:00
|
|
|
|
|
|
|
Scrt1.o: Scrt1.s
|
2017-04-07 19:53:14 +00:00
|
|
|
${CC} ${CFLAGS:N-g} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
|
2009-12-02 16:34:20 +00:00
|
|
|
|
2008-05-03 11:16:32 +00:00
|
|
|
.include <bsd.lib.mk>
|