1 # $FreeBSD: src/gnu/lib/csu/Makefile,v 1.1.2.8 2002/08/07 16:31:43 ru Exp $
3 GCCDIR= ${.CURDIR}/../../../contrib/gcc
5 .if ${MACHINE_ARCH} == "alpha"
6 .PATH: ${GCCDIR}/config/alpha
7 SRCS= crtbegin.s crtend.s
14 OBJS= crtbegin.o crtend.o
15 SOBJS= crtbegin.So crtend.So
16 CFLAGS+= -I${GCCDIR}/config -I. -DIN_GCC \
17 -finhibit-size-directive -fno-inline-functions \
18 -fno-exceptions -fno-omit-frame-pointer
21 CRTS_CFLAGS= -DCRTSTUFFS_O ${PICFLAG}
25 CLEANFILES+= ${OBJS} ${SOBJS}
27 .if ${MACHINE_ARCH} == "alpha"
28 crtbegin.o crtbegin.So: crtbegin.s
29 crtend.o crtend.So: crtend.s
30 .for PART in begin end
31 CLEANFILES+= crt${PART}.s
32 crt${PART}.s: crt${PART}.asm
33 ln -sf ${.ALLSRC} ${.TARGET}
36 crtbegin.o crtbegin.So crtend.o crtend.So: ${SRCS}
40 ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \
41 -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
44 ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \
45 -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
48 ${CC} ${CFLAGS} -g0 -DCRT_END \
49 -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
52 ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \
53 -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
56 # KEEP THIS IN SYNC with src/gnu/usr.bin/cc/cc_tools/Makefile !!
58 echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"' > ${.TARGET}
59 .if ${MACHINE_ARCH} == "i386"
60 echo '#include "${MACHINE_ARCH}/att.h"' >> ${.TARGET}
62 echo '#include <freebsd.h>' >> ${.TARGET}
63 echo '#include "${MACHINE_ARCH}/freebsd.h"' >> ${.TARGET}
64 .if ${MACHINE_ARCH} == "i386"
65 echo '#include "${MACHINE_ARCH}/perform.h"' >> ${.TARGET}
69 .for file in ${OBJS} ${SOBJS}
70 ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
71 ${file} ${DESTDIR}${LIBDIR}/${file:S/.So$/S.o/}