1# $FreeBSD: src/gnu/lib/csu/Makefile,v 1.24 2004/09/10 06:48:04 ru Exp $ 2# $DragonFly: src/gnu/lib/csu/Makefile.csu,v 1.1 2007/01/15 18:01:44 corecode Exp $ 3 4.include "${CSUDIR}/Makefile.csu" 5 6SRCS+= crtstuff.c 7HDRS+= tm.h 8 9NOBJS= crtbegin.o crtend.o 10SOBJS= crtbeginS.o crtendS.o 11 12OBJS+= ${NOBJS} ${SOBJS} 13INSTALLOBJS+= ${NOBJS} ${SOBJS} 14 15OBJS+= ${SRCS:N*.h:R:S/$/.o/g} 16 17CFLAGS+= -finhibit-size-directive -fno-inline-functions \ 18 -fno-exceptions -fno-zero-initialized-in-bss \ 19 -fno-omit-frame-pointer -fno-unit-at-a-time 20CFLAGS+= -I. 21CFLAGS+= -DUSED_FOR_TARGET 22 23CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} 24MKDEP= -DCRT_BEGIN 25 26BEGINSRC?= crtstuff.c 27ENDSRC?= crtstuff.c 28 29${NOBJS} ${SOBJS}: ${HDRS} 30 31crtbegin.o: ${BEGINSRC} 32 ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \ 33 -c -o ${.TARGET} ${.ALLSRC:N*.h} 34 35crtbeginS.o: ${BEGINSRC} 36 ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \ 37 -c -o ${.TARGET} ${.ALLSRC:N*.h} 38 39crtend.o: ${ENDSRC} 40 ${CC} ${CFLAGS} -g0 -DCRT_END \ 41 -c -o ${.TARGET} ${.ALLSRC:N*.h} 42 43crtendS.o: ${ENDSRC} 44 ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \ 45 -c -o ${.TARGET} ${.ALLSRC:N*.h} 46 47CLEANFILES+= tm.h options.h auto-host.h 48beforedepend: tm.h options.h auto-host.h 49tm.h: ${CCDIR}/cc_prep/Makefile 50 ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET} 51 52options.h: 53 touch ${.TARGET} 54 55auto-host.h: 56 echo '#include "dragonfly-native.h"' > ${.TARGET} 57 58all: ${INSTALLOBJS} 59 60realinstall: 61 ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 62 ${INSTALLOBJS} ${DESTDIR}${TARGET_LIBDIR} 63 64clean: 65 rm -f ${CLEANFILES} ${OBJS} ${OBJS:S/$/.tmp/} 66 67.include <bsd.lib.mk> 68