2000-04-19 23:46:21 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2000-05-24 02:17:12 +00:00
|
|
|
.PATH: ${.CURDIR}/../common
|
2000-04-19 23:46:21 +00:00
|
|
|
|
2010-12-10 08:53:06 +00:00
|
|
|
SRCS= crti.S crtn.S
|
2001-10-27 08:29:03 +00:00
|
|
|
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
|
2010-12-10 08:53:06 +00:00
|
|
|
OBJS+= crt1.o gcrt1.o Scrt1.o
|
2000-04-19 23:46:21 +00:00
|
|
|
|
2002-05-13 11:51:11 +00:00
|
|
|
all: ${OBJS}
|
2000-04-19 23:46:21 +00:00
|
|
|
|
2002-05-13 15:28:00 +00:00
|
|
|
CLEANFILES= ${OBJS}
|
2010-12-10 08:53:06 +00:00
|
|
|
CLEANFILES+= crt1_.o gcrt1_.o Scrt1_.o
|
|
|
|
CLEANFILES+= crtbrand.o gcrtbrand.o Scrtbrand.o
|
2011-01-13 20:44:31 +00:00
|
|
|
CLEANFILES+= crtbrand.s gcrtbrand.s Scrtbrand.s
|
2002-05-13 15:28:00 +00:00
|
|
|
|
2010-12-10 08:53:06 +00:00
|
|
|
crt1_.o: crt1.S
|
|
|
|
${CC} ${CFLAGS} -c -o ${.TARGET} ${.ALLSRC}
|
2000-04-19 23:46:21 +00:00
|
|
|
|
2011-01-13 20:44:31 +00:00
|
|
|
# See the comment in lib/csu/common/crtbrand.c for the reason crtbrand.c is not
|
|
|
|
# directly compiled to .o files.
|
|
|
|
|
|
|
|
crtbrand.s: crtbrand.c
|
|
|
|
${CC} ${CFLAGS} -S -o ${.TARGET} ${.ALLSRC}
|
|
|
|
sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET}
|
|
|
|
|
|
|
|
crtbrand.o: crtbrand.s
|
|
|
|
${CC} ${CFLAGS} -c -o ${.TARGET} crtbrand.s
|
2010-12-10 08:53:06 +00:00
|
|
|
|
|
|
|
crt1.o: crt1_.o crtbrand.o
|
|
|
|
${LD} ${LDFLAGS} -r -o ${.TARGET} crt1_.o crtbrand.o
|
|
|
|
|
|
|
|
gcrt1_.o: crt1.S
|
|
|
|
${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.ALLSRC}
|
|
|
|
|
2011-01-13 20:44:31 +00:00
|
|
|
gcrtbrand.s: crtbrand.c
|
|
|
|
${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.ALLSRC}
|
|
|
|
sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET}
|
|
|
|
|
|
|
|
gcrtbrand.o: gcrtbrand.s
|
|
|
|
${CC} ${CFLAGS} -c -o ${.TARGET} gcrtbrand.s
|
2010-12-10 08:53:06 +00:00
|
|
|
|
|
|
|
gcrt1.o: gcrt1_.o gcrtbrand.o
|
|
|
|
${LD} ${LDFLAGS} -r -o ${.TARGET} ${.ALLSRC}
|
|
|
|
|
|
|
|
Scrt1_.o: crt1.S
|
|
|
|
${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.ALLSRC}
|
|
|
|
|
2011-01-13 20:44:31 +00:00
|
|
|
Scrtbrand.s: crtbrand.c
|
|
|
|
${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.ALLSRC}
|
|
|
|
sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET}
|
|
|
|
|
|
|
|
Scrtbrand.o: Scrtbrand.s
|
|
|
|
${CC} ${CFLAGS} -c -o ${.TARGET} Scrtbrand.s
|
2010-12-10 08:53:06 +00:00
|
|
|
|
|
|
|
Scrt1.o: Scrt1_.o Scrtbrand.o
|
|
|
|
${LD} ${LDFLAGS} -r -o ${.TARGET} ${.ALLSRC}
|
2009-12-02 16:34:20 +00:00
|
|
|
|
2000-04-19 23:46:21 +00:00
|
|
|
realinstall:
|
2002-07-29 09:40:17 +00:00
|
|
|
${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
2002-05-13 11:51:11 +00:00
|
|
|
${OBJS} ${DESTDIR}${LIBDIR}
|
2000-04-19 23:46:21 +00:00
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|