62f6e91e657a2c13bebd4b8f32c1f6e14741a106
[dragonfly.git] / lib / csu / i386 / Makefile.csu
1 # $FreeBSD: src/lib/csu/i386-elf/Makefile,v 1.6.2.5 2002/11/23 17:44:29 ru Exp $
2
3 SRCS+=          crti.S crtn.S
4 OBJS+=          gcrt1.o crt1.o Scrt1.o
5 INSTALLOBJS+=   crt1.o crti.o crtn.o gcrt1.o Scrt1.o
6 CLEANFILES+=    crt1.o crti.o crtn.o gcrt1.o Scrt1.o \
7                 crt1_c.o crt1_s.o gcrtl_c.o Scrt1_c.o
8 WARNS?=         2
9
10 CFLAGS+=        -I${CSUDIR}/../common \
11                 -I${CSUDIR}/../../libc/include
12
13 .PATH:          ${CSUDIR} ${CSUDIR}/../common
14
15 gcrt1_c.o:      crt1_c.c
16         ${CC} ${CFLAGS} -DGCRT -c -o gcrt1_c.o ${CSUDIR}/crt1_c.c
17
18 gcrt1.o:        gcrt1_c.o crt1_s.o
19         ${LD} ${LDFLAGS} -o gcrt1.o -r crt1_s.o gcrt1_c.o
20
21 crt1.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
25 Scrt1_c.o:      crt1_c.c
26         ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1_c.o ${CSUDIR}/crt1_c.c
27
28 Scrt1.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