6

When I make ffmpeg, I can see following lines

CC  ffmpeg.o
LD  ffmpeg_g
CP  ffmpeg
STRIP   ffmpeg

What is a quick way to find the commands for CC, LD etc. with as less modification to the Makefile?

S B
  • 8,134
  • 10
  • 54
  • 108

2 Answers2

8

This should do it:

$ make V=1

Loot at the common.mak file for the magic that does the silencing.

holygeek
  • 15,653
  • 1
  • 40
  • 50
2

While its output is not well-formatted, you can use strace on any program to find out what it is executing:

$ strace -f -s 1000 -e execve make 2>&1 | grep execve
execve("/usr/bin/make", ["make"], [/* 39 vars */]) = 0
[pid 22076] execve("/bin/sh", ["/bin/sh", "-c", "printf \"CC\\t%s\\n\" libavdevic
e/alsa-audio-common.o; gcc -I. -I./ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LA
RGE FILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DHAVE_AV_CONFIG_H -
std=c99 -fomit-frame-pointer -pthread -g -Wdeclaration-after-statement -Wall -Wno
-parentheses -Wno-switch -Wno-format-zero-length -Wdisabled-optimization -Wpointe
r-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-li
mits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -O
3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function
-declaration -Werror=missing-prototypes  -MMD -MF libavdevice/alsa-audio-common.d
-MT libavdevice/alsa-audio-common.o -c -o libavdevice/alsa-audio-common.o libavde
vice/alsa-audio-common.c"], [/* 42 vars */]
phihag
  • 278,196
  • 72
  • 453
  • 469