2004-08-14 03:23:24 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2014-04-25 19:25:26 +00:00
|
|
|
MK_PROFILE= no
|
2009-10-25 15:52:31 +00:00
|
|
|
MK_SSP= no
|
2014-04-25 19:25:26 +00:00
|
|
|
|
2014-05-06 04:22:01 +00:00
|
|
|
.include <src.opts.mk>
|
2004-08-14 03:23:24 +00:00
|
|
|
|
2017-03-12 18:59:16 +00:00
|
|
|
GCCDIR= ${SRCTOP}/contrib/gcc
|
|
|
|
GCCLIB= ${SRCTOP}/contrib/gcclibs
|
|
|
|
CCDIR= ${SRCTOP}/gnu/usr.bin/cc
|
2016-04-18 18:13:58 +00:00
|
|
|
.include "${CCDIR}/Makefile.tgt"
|
|
|
|
.include "${CCDIR}/cc_tools/Makefile.hdrs"
|
|
|
|
|
2004-08-14 03:23:24 +00:00
|
|
|
.PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}
|
|
|
|
|
|
|
|
LIB= gcov
|
|
|
|
|
|
|
|
CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
|
|
|
|
CFLAGS+= -D_PTHREADS -DGTHREAD_USE_WEAK
|
2016-04-18 18:13:58 +00:00
|
|
|
CFLAGS+= -I${CCDIR}/cc_tools \
|
2007-05-19 04:25:59 +00:00
|
|
|
-I${GCCLIB}/include -I${GCCDIR}/config -I${GCCDIR} -I.
|
2013-01-17 05:56:28 +00:00
|
|
|
|
2014-10-01 08:26:51 +00:00
|
|
|
.if ${TARGET_CPUARCH} == "arm"
|
2013-01-17 05:56:28 +00:00
|
|
|
CFLAGS+= -DTARGET_ARM_EABI
|
|
|
|
.endif
|
|
|
|
|
2004-08-14 03:23:24 +00:00
|
|
|
#
|
|
|
|
# Library members defined in libgcov.c.
|
2007-05-19 04:25:59 +00:00
|
|
|
# Defined in libgcov.c, included only in gcov library
|
|
|
|
SYMS = _gcov _gcov_merge_add _gcov_merge_single _gcov_merge_delta \
|
|
|
|
_gcov_fork _gcov_execl _gcov_execlp _gcov_execle \
|
|
|
|
_gcov_execv _gcov_execvp _gcov_execve \
|
|
|
|
_gcov_interval_profiler _gcov_pow2_profiler _gcov_one_value_profiler
|
2004-08-14 03:23:24 +00:00
|
|
|
|
|
|
|
OBJS= ${SYMS:S/$/.o/}
|
|
|
|
OBJS_T= ${SYMS:S/$/.o/}
|
|
|
|
OBJS_P= ${SYMS:S/$/.po/}
|
2016-09-24 15:11:27 +00:00
|
|
|
OBJS_S= ${SYMS:S/$/.pico/}
|
2004-08-14 03:23:24 +00:00
|
|
|
|
2009-06-21 01:54:47 +00:00
|
|
|
#-----------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Helpful shortcuts for compiler invocations.
|
|
|
|
#
|
|
|
|
CC_T = ${CC} -c ${CFLAGS} -fPIC
|
|
|
|
CC_P = ${CC} -c ${CFLAGS} -p -fPIC
|
|
|
|
CC_S = ${CC} -c ${CFLAGS} ${PICFLAG} -DSHARED
|
|
|
|
|
|
|
|
COMMONHDRS= tm.h tconfig.h gcov-iov.h options.h
|
2007-05-19 04:25:59 +00:00
|
|
|
CLEANFILES+= ${COMMONHDRS} cs-tm.h cs-tconfig.h options.h optionlist
|
2004-08-14 03:23:24 +00:00
|
|
|
|
|
|
|
${OBJS} beforedepend: ${COMMONHDRS}
|
|
|
|
|
|
|
|
${OBJS_T}: libgcov.c
|
2009-06-21 01:54:47 +00:00
|
|
|
${CC_T} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
2004-08-14 03:23:24 +00:00
|
|
|
|
2004-12-21 09:33:47 +00:00
|
|
|
.if !defined(NO_PIC)
|
2004-08-14 03:23:24 +00:00
|
|
|
${OBJS_S}: libgcov.c
|
2009-06-21 01:54:47 +00:00
|
|
|
${CC_S} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
2004-08-14 03:23:24 +00:00
|
|
|
.endif
|
|
|
|
|
2006-03-18 21:37:05 +00:00
|
|
|
.if ${MK_PROFILE} != "no"
|
2007-05-19 04:25:59 +00:00
|
|
|
${OBJS_P}: libgcov.c
|
2009-06-21 01:54:47 +00:00
|
|
|
${CC_P} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
2004-08-14 03:23:24 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|