1# $FreeBSD: head/lib/csu/i386-elf/Makefile 205398 2010-03-20 22:58:54Z jilles $
| 1# $FreeBSD: head/lib/csu/i386-elf/Makefile 217375 2011-01-13 20:44:31Z dim $
|
2 3.PATH: ${.CURDIR}/../common 4 5SRCS= crti.S crtn.S 6FILES= ${SRCS:N*.h:R:S/$/.o/g} gcrt1.o crt1.o Scrt1.o 7FILESOWN= ${LIBOWN} 8FILESGRP= ${LIBGRP} 9FILESMODE= ${LIBMODE} 10FILESDIR= ${LIBDIR} 11CFLAGS+= -I${.CURDIR}/../common \ 12 -I${.CURDIR}/../../libc/include 13CLEANFILES= ${FILES} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o
| 2 3.PATH: ${.CURDIR}/../common 4 5SRCS= crti.S crtn.S 6FILES= ${SRCS:N*.h:R:S/$/.o/g} gcrt1.o crt1.o Scrt1.o 7FILESOWN= ${LIBOWN} 8FILESGRP= ${LIBGRP} 9FILESMODE= ${LIBMODE} 10FILESDIR= ${LIBDIR} 11CFLAGS+= -I${.CURDIR}/../common \ 12 -I${.CURDIR}/../../libc/include 13CLEANFILES= ${FILES} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o
|
| 14CLEANFILES+= crt1_c.s gcrt1_c.s Scrt1_c.s
|
14
| 15
|
15gcrt1_c.o: crt1_c.c 16 ${CC} ${CFLAGS} -DGCRT -c -o gcrt1_c.o ${.CURDIR}/crt1_c.c
| 16# See the comment in lib/csu/common/crtbrand.c for the reason crt1_c.c is not 17# directly compiled to .o files.
|
17
| 18
|
| 19gcrt1_c.s: crt1_c.c 20 ${CC} ${CFLAGS} -DGCRT -S -o ${.TARGET} ${.CURDIR}/crt1_c.c 21 sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} 22 23gcrt1_c.o: gcrt1_c.s 24 ${CC} ${CFLAGS} -c -o ${.TARGET} gcrt1_c.s 25
|
18gcrt1.o: gcrt1_c.o crt1_s.o 19 ${LD} ${LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o 20
| 26gcrt1.o: gcrt1_c.o crt1_s.o 27 ${LD} ${LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o 28
|
| 29crt1_c.s: crt1_c.c 30 ${CC} ${CFLAGS} -S -o ${.TARGET} ${.CURDIR}/crt1_c.c 31 sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET} 32 33crt1_c.o: crt1_c.s 34 ${CC} ${CFLAGS} -c -o ${.TARGET} crt1_c.s 35
|
21crt1.o: crt1_c.o crt1_s.o 22 ${LD} ${LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o 23 objcopy --localize-symbol _start1 crt1.o 24
| 36crt1.o: crt1_c.o crt1_s.o 37 ${LD} ${LDFLAGS} -o crt1.o -r crt1_s.o crt1_c.o 38 objcopy --localize-symbol _start1 crt1.o 39
|
25Scrt1_c.o: crt1_c.c 26 ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1_c.o ${.CURDIR}/crt1_c.c
| 40Scrt1_c.s: crt1_c.c 41 ${CC} ${CFLAGS} -fPIC -DPIC -S -o ${.TARGET} ${.CURDIR}/crt1_c.c 42 sed -i "" -e '/\.note\.ABI-tag/s/progbits/note/' ${.TARGET}
|
27
| 43
|
| 44Scrt1_c.o: Scrt1_c.s 45 ${CC} ${CFLAGS} -c -o ${.TARGET} Scrt1_c.s 46
|
28Scrt1.o: Scrt1_c.o crt1_s.o 29 ${LD} ${LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o 30 objcopy --localize-symbol _start1 Scrt1.o 31 32.include <bsd.prog.mk>
| 47Scrt1.o: Scrt1_c.o crt1_s.o 48 ${LD} ${LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o 49 objcopy --localize-symbol _start1 Scrt1.o 50 51.include <bsd.prog.mk>
|