gcc80: Shorten build time in libraries target.
[dragonfly.git] / gnu / lib / gcc50 / libgcov / Makefile
1 .include "../Makefile.inc"
2 .PATH: ${GCCDIR}/libgcc
3
4 LIB=            gcov
5
6 CFLAGS+=        -I.
7 CFLAGS+=        -I${GCCDIR}/libgcc
8 CFLAGS+=        -I${.OBJDIR}/../csu
9 CFLAGS+=        -fbuilding-libgcc
10 CFLAGS+=        -fno-stack-protector
11 CFLAGS+=        -DIN_LIBGCC2 -DHAVE_CC_TLS -DIN_GCC
12
13 # used by shared libs
14 INSTALL_PIC_ARCHIVE=    yes
15
16 # taken from build/x86_64-portbld-dragonfly4.1/libgcc/Makefile
17 LIBGCOV_MERGE = _gcov_merge_add _gcov_merge_single _gcov_merge_delta    \
18         _gcov_merge_ior _gcov_merge_time_profile _gcov_merge_icall_topn
19 LIBGCOV_PROFILER = _gcov_interval_profiler _gcov_pow2_profiler          \
20         _gcov_one_value_profiler _gcov_indirect_call_profiler           \
21         _gcov_average_profiler _gcov_ior_profiler                       \
22         _gcov_indirect_call_profiler_v2 _gcov_time_profiler             \
23         _gcov_indirect_call_topn_profiler
24 LIBGCOV_INTERFACE = _gcov_dump _gcov_flush _gcov_fork                   \
25         _gcov_execl _gcov_execlp                                        \
26         _gcov_execle _gcov_execv _gcov_execvp _gcov_execve _gcov_reset
27 LIBGCOV_DRIVER = _gcov
28
29 LIBGCOV=        ${LIBGCOV_MERGE} ${LIBGCOV_PROFILER} ${LIBGCOV_INTERFACE} \
30                 ${LIBGCOV_DRIVER}
31
32 OBJS=   ${LIBGCOV:S/$/.o/}
33
34 gthr-default.h: gthr-posix.h
35         cp ${.ALLSRC} ${.TARGET}
36
37 ${LIBGCOV_MERGE:S/$/.o/}: ${GCCDIR}/libgcc/libgcov-merge.c
38         ${CC} ${STATIC_CFLAGS} ${CFLAGS} -DL${.TARGET:R} -c ${.ALLSRC} \
39                 -o ${.TARGET}
40
41 ${LIBGCOV_PROFILER:S/$/.o/}: ${GCCDIR}/libgcc/libgcov-profiler.c
42         ${CC} ${STATIC_CFLAGS} ${CFLAGS} -DL${.TARGET:R} -c ${.ALLSRC} \
43                 -o ${.TARGET}
44
45 ${LIBGCOV_INTERFACE:S/$/.o/}: ${GCCDIR}/libgcc/libgcov-interface.c gthr-default.h
46         ${CC} ${STATIC_CFLAGS} ${CFLAGS} -DL${.TARGET:R} -c ${.ALLSRC:M*.c} \
47                 -o ${.TARGET}
48
49 ${LIBGCOV_DRIVER:S/$/.o/}: ${GCCDIR}/libgcc/libgcov-driver.c
50         ${CC} ${STATIC_CFLAGS} ${CFLAGS} -DL${.TARGET:R} -c ${.ALLSRC} \
51                 -o ${.TARGET}
52
53 # profile versions follow
54
55 ${LIBGCOV_MERGE:S/$/.po/}: ${GCCDIR}/libgcc/libgcov-merge.c
56         ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -DL${.TARGET:R} \
57                 -c ${.ALLSRC} -o ${.TARGET}
58
59 ${LIBGCOV_PROFILER:S/$/.po/}: ${GCCDIR}/libgcc/libgcov-profiler.c
60         ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -DL${.TARGET:R} \
61                 -c ${.ALLSRC} -o ${.TARGET}
62
63 ${LIBGCOV_INTERFACE:S/$/.po/}: ${GCCDIR}/libgcc/libgcov-interface.c gthr-default.h
64         ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -DL${.TARGET:R} \
65                 -c ${.ALLSRC:M*.c} -o ${.TARGET}
66
67 ${LIBGCOV_DRIVER:S/$/.po/}: ${GCCDIR}/libgcc/libgcov-driver.c
68         ${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -DL${.TARGET:R} \
69                 -c ${.ALLSRC} -o ${.TARGET}
70
71 # pic versions follow
72
73 ${LIBGCOV_MERGE:S/$/.So/}: ${GCCDIR}/libgcc/libgcov-merge.c
74         ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -DL${.TARGET:R} -c ${.ALLSRC} \
75                 -o ${.TARGET}
76
77 ${LIBGCOV_PROFILER:S/$/.So/}: ${GCCDIR}/libgcc/libgcov-profiler.c
78         ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -DL${.TARGET:R} -c ${.ALLSRC} \
79                 -o ${.TARGET}
80
81 ${LIBGCOV_INTERFACE:S/$/.So/}: ${GCCDIR}/libgcc/libgcov-interface.c gthr-default.h
82         ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -DL${.TARGET:R} -c ${.ALLSRC:M*.c} \
83                 -o ${.TARGET}
84
85 ${LIBGCOV_DRIVER:S/$/.So/}: ${GCCDIR}/libgcc/libgcov-driver.c
86         ${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -DL${.TARGET:R} -c ${.ALLSRC} \
87                 -o ${.TARGET}
88
89 CLEANFILES+=    gthr-default.h
90
91 .include <bsd.lib.mk>