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