1# $FreeBSD: head/gnu/lib/csu/Makefile 96778 2002-05-17 03:04:47Z obrien $
| 1# $FreeBSD: head/gnu/lib/csu/Makefile 96796 2002-05-17 07:55:08Z peter $
|
2 3GCCDIR= ${.CURDIR}/../../../contrib/gcc
| 2 3GCCDIR= ${.CURDIR}/../../../contrib/gcc
|
4.PATH: ${GCCDIR} 5
| |
6CCDIR= ${.CURDIR}/../../usr.bin/cc 7.include "${CCDIR}/Makefile.tgt" 8
| 4CCDIR= ${.CURDIR}/../../usr.bin/cc 5.include "${CCDIR}/Makefile.tgt" 6
|
| 7.PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR} 8
|
9SRCS= crtstuff.c tconfig.h 10OBJS= crtbegin.o crtend.o 11SOBJS= crtbegin.So crtend.So 12CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR 13CFLAGS+= -finhibit-size-directive -fno-inline-functions \ 14 -fno-exceptions -fno-omit-frame-pointer 15CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. \ 16 -I${CCDIR}/cc_tools
| 9SRCS= crtstuff.c tconfig.h 10OBJS= crtbegin.o crtend.o 11SOBJS= crtbegin.So crtend.So 12CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR 13CFLAGS+= -finhibit-size-directive -fno-inline-functions \ 14 -fno-exceptions -fno-omit-frame-pointer 15CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. \ 16 -I${CCDIR}/cc_tools
|
17CRTS_CFLAGS= -DCRTSTUFFS_O ${PICFLAG}
| 17CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG}
|
18MKDEPCMD= CC="${CC}" MKDEP_CPP_OPTS="-M -DCRT_BEGIN" mkdep 19
| 18MKDEPCMD= CC="${CC}" MKDEP_CPP_OPTS="-M -DCRT_BEGIN" mkdep 19
|
| 20.if ${TARGET_ARCH} == "ia64" 21BEGINSRC= crtbegin.asm 22ENDSRC= crtend.asm 23CFLAGS+= -x assembler-with-cpp # Ugly hack 24.undef SRCS # hack for 'make depend' 25.endif
|
20.if ${TARGET_ARCH} == "powerpc"
| 26.if ${TARGET_ARCH} == "powerpc"
|
21.PATH: ${GCCDIR}/config/${GCC_CPU}
| |
22TGTOBJS= crtsavres.o 23SRCS+= crtsavres.asm 24.endif 25.if ${TARGET_ARCH} == "sparc64"
| 27TGTOBJS= crtsavres.o 28SRCS+= crtsavres.asm 29.endif 30.if ${TARGET_ARCH} == "sparc64"
|
26.PATH: ${GCCDIR}/config/${GCC_CPU}
| |
27TGTOBJS= crtfastmath.o 28SRCS+= crtfastmath.c 29.endif
| 31TGTOBJS= crtfastmath.o 32SRCS+= crtfastmath.c 33.endif
|
| 34BEGINSRC?= crtstuff.c 35ENDSRC?= crtstuff.c
|
30 31all: ${OBJS} ${SOBJS} ${TGTOBJS} 32 33CLEANFILES= ${OBJS} ${SOBJS} ${TGTOBJS} 34
| 36 37all: ${OBJS} ${SOBJS} ${TGTOBJS} 38 39CLEANFILES= ${OBJS} ${SOBJS} ${TGTOBJS} 40
|
35crtbegin.o crtbegin.So crtend.o crtend.So: ${SRCS} 36 37crtbegin.o:
| 41crtbegin.o: ${BEGINSRC}
|
38 ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \
| 42 ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \
|
39 -c -o ${.TARGET} ${.ALLSRC:M*crtstuff*}
| 43 -c -o ${.TARGET} ${.ALLSRC}
|
40
| 44
|
41crtbegin.So:
| 45crtbegin.So: ${BEGINSRC}
|
42 ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \
| 46 ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \
|
43 -c -o ${.TARGET} ${.ALLSRC:M*crtstuff*}
| 47 -c -o ${.TARGET} ${.ALLSRC}
|
44
| 48
|
45crtend.o:
| 49crtend.o: ${ENDSRC}
|
46 ${CC} ${CFLAGS} -g0 -DCRT_END \
| 50 ${CC} ${CFLAGS} -g0 -DCRT_END \
|
47 -c -o ${.TARGET} ${.ALLSRC:M*crtstuff*}
| 51 -c -o ${.TARGET} ${.ALLSRC}
|
48
| 52
|
49crtend.So:
| 53crtend.So: ${ENDSRC}
|
50 ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \
| 54 ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \
|
51 -c -o ${.TARGET} ${.ALLSRC:M*crtstuff*}
| 55 -c -o ${.TARGET} ${.ALLSRC}
|
52 53CLEANFILES+= tconfig.h 54tconfig.h: ${CCDIR}/cc_tools/Makefile 55 ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET} 56 57realinstall: 58.for file in ${OBJS} ${SOBJS} ${TGTOBJS} 59 ${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 60 ${file} ${DESTDIR}${LIBDIR}/${file:S/.So$/S.o/} 61.endfor 62 63.include <bsd.lib.mk>
| 56 57CLEANFILES+= tconfig.h 58tconfig.h: ${CCDIR}/cc_tools/Makefile 59 ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET} 60 61realinstall: 62.for file in ${OBJS} ${SOBJS} ${TGTOBJS} 63 ${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 64 ${file} ${DESTDIR}${LIBDIR}/${file:S/.So$/S.o/} 65.endfor 66 67.include <bsd.lib.mk>
|