1 # $FreeBSD: src/gnu/lib/csu/Makefile,v 1.1.2.8 2002/08/07 16:31:43 ru Exp $
2 # $DragonFly: src/gnu/lib/gcc2/csu/Attic/Makefile,v 1.1 2004/01/16 07:45:19 dillon Exp $
4 GCCDIR= ${.CURDIR}/../../../../contrib/gcc
6 .if ${MACHINE_ARCH} == "alpha"
7 .PATH: ${GCCDIR}/config/alpha
8 SRCS= crtbegin.s crtend.s
15 OBJS= crtbegin.o crtend.o
16 SOBJS= crtbegin.So crtend.So
17 CFLAGS+= -I${GCCDIR}/config -I. -DIN_GCC \
18 -finhibit-size-directive -fno-inline-functions \
19 -fno-exceptions -fno-omit-frame-pointer
22 CRTS_CFLAGS= -DCRTSTUFFS_O ${PICFLAG}
26 CLEANFILES+= ${OBJS} ${SOBJS}
28 .if ${MACHINE_ARCH} == "alpha"
29 crtbegin.o crtbegin.So: crtbegin.s
30 crtend.o crtend.So: crtend.s
31 .for PART in begin end
32 CLEANFILES+= crt${PART}.s
33 crt${PART}.s: crt${PART}.asm
34 ln -sf ${.ALLSRC} ${.TARGET}
37 crtbegin.o crtbegin.So crtend.o crtend.So: ${SRCS}
41 ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \
42 -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
45 ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \
46 -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
49 ${CC} ${CFLAGS} -g0 -DCRT_END \
50 -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
53 ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \
54 -c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
57 # KEEP THIS IN SYNC with src/gnu/usr.bin/cc/cc_tools/Makefile !!
59 echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"' > ${.TARGET}
60 .if ${MACHINE_ARCH} == "i386"
61 echo '#include "${MACHINE_ARCH}/att.h"' >> ${.TARGET}
63 echo '#include <dragonfly.h>' >> ${.TARGET}
64 echo '#include "${MACHINE_ARCH}/dragonfly.h"' >> ${.TARGET}
65 .if ${MACHINE_ARCH} == "i386"
66 echo '#include "${MACHINE_ARCH}/perform.h"' >> ${.TARGET}
70 .for file in ${OBJS} ${SOBJS}
71 ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
72 ${file} ${DESTDIR}${GCCLIBDIR}/${file:S/.So$/S.o/}