freebsd-nq/gnu/lib/csu/Makefile

78 lines
2.0 KiB
Makefile
Raw Normal View History

2001-12-18 03:11:35 +00:00
# $FreeBSD$
.include <src.opts.mk>
MK_SSP= no
GCCDIR= ${.CURDIR}/../../../contrib/gcc
GCCLIB= ${.CURDIR}/../../../contrib/gcclibs
CCDIR= ${.CURDIR}/../../usr.bin/cc
.include "${CCDIR}/Makefile.tgt"
2001-12-18 03:11:35 +00:00
.PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}
SRCS= crtstuff.c tconfig.h tm.h options.h
OBJS= crtbegin.o crtend.o crtbeginT.o
SOBJS= crtbeginS.o crtendS.o
2003-06-02 02:29:26 +00:00
CSTD?= gnu89
CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3
CFLAGS.gcc+= -finhibit-size-directive -fno-toplevel-reorder
CFLAGS+= -fno-inline-functions -fno-exceptions \
-fno-zero-initialized-in-bss -fno-asynchronous-unwind-tables \
-fno-omit-frame-pointer
CFLAGS+= -I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I. \
-I${CCDIR}/cc_tools
CRTS_CFLAGS= -DCRTSTUFFS_O -DSHARED ${PICFLAG}
2001-12-18 03:11:35 +00:00
.if ${TARGET_CPUARCH} == "arm"
CFLAGS+= -DTARGET_ARM_EABI
.endif
.if ${MACHINE_CPUARCH} == "powerpc"
TGTOBJS= crtsavres.o
SRCS+= crtsavres.asm
.endif
.if ${MACHINE_CPUARCH} == "sparc64"
TGTOBJS= crtfastmath.o
SRCS+= crtfastmath.c
.endif
BEGINSRC?= crtstuff.c
ENDSRC?= crtstuff.c
FILES= ${OBJS} ${SOBJS} ${TGTOBJS}
FILESMODE= ${LIBMODE}
FILESOWN= ${LIBOWN}
FILESGRP= ${LIBGRP}
FILESDIR= ${LIBDIR}
# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY.
.undef LIBRARIES_ONLY
${OBJS} ${SOBJS}: ${SRCS:M*.h}
2001-12-18 03:11:35 +00:00
CLEANFILES= ${OBJS} ${SOBJS} ${TGTOBJS}
crtbegin.o: ${BEGINSRC}
2001-12-18 03:11:35 +00:00
${CC} ${CFLAGS} -g0 -DCRT_BEGIN \
-c -o ${.TARGET} ${.ALLSRC:N*.h}
2001-12-18 03:11:35 +00:00
crtbeginT.o: ${BEGINSRC}
${CC} ${CFLAGS} -g0 -DCRT_BEGIN -DCRTSTUFFT_O \
-c -o ${.TARGET} ${.ALLSRC:N*.h}
crtbeginS.o: ${BEGINSRC}
2001-12-18 03:11:35 +00:00
${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \
-c -o ${.TARGET} ${.ALLSRC:N*.h}
2001-12-18 03:11:35 +00:00
crtend.o: ${ENDSRC}
2001-12-18 03:11:35 +00:00
${CC} ${CFLAGS} -g0 -DCRT_END \
-c -o ${.TARGET} ${.ALLSRC:N*.h}
2001-12-18 03:11:35 +00:00
crtendS.o: ${ENDSRC}
2001-12-18 03:11:35 +00:00
${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \
-c -o ${.TARGET} ${.ALLSRC:N*.h}
2001-12-18 03:11:35 +00:00
CLEANFILES+= tm.h tconfig.h options.h optionlist cs-tconfig.h cs-tm.h
2016-04-12 02:45:19 +00:00
tm.h tconfig.h options.h: ${CCDIR}/cc_tools/Makefile .PHONY
(cd ${.CURDIR}; ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET})
2001-12-18 03:11:35 +00:00
.include <bsd.lib.mk>