freebsd-nq/gnu/lib/csu/Makefile

59 lines
1.4 KiB
Makefile
Raw Normal View History

2001-12-18 03:11:35 +00:00
# $FreeBSD$
INTERNALLIB= true
GCCDIR= ${.CURDIR}/../../../contrib/gcc
2001-12-18 03:11:35 +00:00
.PATH: ${GCCDIR}
CCDIR= ${.CURDIR}/../../usr.bin/cc
.include "${CCDIR}/Makefile.tgt"
2001-12-18 03:11:35 +00:00
SRCS= crtstuff.c tconfig.h
2001-12-18 03:11:35 +00:00
OBJS= crtbegin.o crtend.o
SOBJS= crtbegin.So crtend.So
CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR
CFLAGS+= -finhibit-size-directive -fno-inline-functions \
2001-12-18 03:11:35 +00:00
-fno-exceptions -fno-omit-frame-pointer
CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. \
-I${CCDIR}/cc_tools
2001-12-18 03:11:35 +00:00
CRTS_CFLAGS= -DCRTSTUFFS_O ${PICFLAG}
MKDEPCMD= CC=${CC} MKDEP_CPP_OPTS="-M -DCRT_BEGIN" mkdep
2001-12-18 03:11:35 +00:00
.if ${TARGET_ARCH} == "sparc64"
.PATH: ${GCCDIR}/config/${GCC_CPU}
TGTOBJS= crtfastmath.o
SRCS+= crtfastmath.c
.endif
all: ${OBJS} ${SOBJS} ${TGTOBJS}
2001-12-18 03:11:35 +00:00
2002-04-05 08:54:28 +00:00
crtbegin.o crtbegin.So crtend.o crtend.So: ${SRCS}
2001-12-18 03:11:35 +00:00
crtbegin.o:
${CC} ${CFLAGS} -g0 -DCRT_BEGIN \
-c -o ${.TARGET} ${.ALLSRC:M*crtstuff*}
2001-12-18 03:11:35 +00:00
crtbegin.So:
${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \
-c -o ${.TARGET} ${.ALLSRC:M*crtstuff*}
2001-12-18 03:11:35 +00:00
crtend.o:
${CC} ${CFLAGS} -g0 -DCRT_END \
-c -o ${.TARGET} ${.ALLSRC:M*crtstuff*}
2001-12-18 03:11:35 +00:00
crtend.So:
${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \
-c -o ${.TARGET} ${.ALLSRC:M*crtstuff*}
2001-12-18 03:11:35 +00:00
CLEANFILES= tconfig.h
tconfig.h: ${CCDIR}/cc_tools/Makefile
${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}
2001-12-18 03:11:35 +00:00
realinstall:
.for file in ${OBJS} ${SOBJS} ${TGTOBJS}
2001-12-18 03:11:35 +00:00
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${file} ${DESTDIR}${LIBDIR}/${file:S/.So$/S.o/}
.endfor
.include <bsd.lib.mk>