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.2 2007/08/23 06:52:02 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. 21 22CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG} 23MKDEP= -DCRT_BEGIN 24 25BEGINSRC?= crtstuff.c 26ENDSRC?= crtstuff.c 27 28${NOBJS} ${SOBJS}: ${HDRS} 29 30crtbegin.o: ${BEGINSRC} 31 ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \ 32 -c -o ${.TARGET} ${.ALLSRC:N*.h} 33 34crtbeginS.o: ${BEGINSRC} 35 ${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \ 36 -c -o ${.TARGET} ${.ALLSRC:N*.h} 37 38crtend.o: ${ENDSRC} 39 ${CC} ${CFLAGS} -g0 -DCRT_END \ 40 -c -o ${.TARGET} ${.ALLSRC:N*.h} 41 42crtendS.o: ${ENDSRC} 43 ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \ 44 -c -o ${.TARGET} ${.ALLSRC:N*.h} 45 46CLEANFILES+= tm.h options.h auto-host.h 47beforedepend: tm.h options.h auto-host.h 48tm.h: ${CCDIR}/cc_prep/Makefile 49 ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET} 50 51options.h: 52 touch ${.TARGET} 53 54auto-host.h: 55 echo '#include "dragonfly-native.h"' > ${.TARGET} 56 57all: ${INSTALLOBJS} 58 59realinstall: 60 ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ 61 ${INSTALLOBJS} ${DESTDIR}${TARGET_LIBDIR} 62 63clean: 64 rm -f ${CLEANFILES} ${OBJS} ${OBJS:S/$/.tmp/} 65 66.include <bsd.lib.mk> 67