Home | History | Annotate | Line # | Download | only in gmon
Makefile.inc revision 1.14.6.1
      1 #	$NetBSD: Makefile.inc,v 1.14.6.1 2021/05/31 22:15:07 cjep Exp $
      2 #	@(#)Makefile.inc	8.1 (Berkeley) 6/4/93
      3 
      4 # gmon sources
      5 .PATH: ${.CURDIR}/gmon ${ARCHDIR}/gmon
      6 
      7 .-include "${ARCHDIR}/gmon/Makefile.inc"
      8 
      9 SRCS+=	gmon.c mcount.c
     10 MAN+=	moncontrol.3
     11 MLINKS+=moncontrol.3 monstartup.3
     12 
     13 .if (${MACHINE_CPU} == "mips")
     14 # Turn off as(1) warnings on MIPS, since warnings are fatal with WARNS>0
     15 # and mcount.c causes warnings from as(1).
     16 # mcount.c should be fixed and this test removed.
     17 #
     18 COPTS.mcount.c+=${${ACTIVE_CXX} == "gcc":? -Wa,--no-warn :}
     19 .endif
     20 
     21 .if (${MACHINE_CPU} == "i386" || ${MACHINE_CPU} == "x86_64") && \
     22     ${HAVE_GCC:U0} >= 6
     23 # The usage of __builtin_frame_address(1) should be OK.
     24 COPTS.mcount.c+=${${ACTIVE_CXX} == "gcc":? -Wno-error=frame-address :}
     25 .endif
     26 COPTS.mcount.c+=${${ACTIVE_CC} == "clang":? -Wno-error=frame-address :}
     27 
     28 
     29 # mcount and gmon cannot be compiled with profiling
     30 GMONOBJEXT=${${MKPIC} != "no":?pico:o}
     31 mcount.po: mcount.${GMONOBJEXT}
     32 	cp mcount.${GMONOBJEXT} mcount.po
     33 
     34 gmon.po: gmon.${GMONOBJEXT}
     35 	cp gmon.${GMONOBJEXT} gmon.po
     36