annotate common.mak @ 32064:a735105a66b6

Move all MEncoder-related extern variable declarations to mencoder.h.
author diego
date Sat, 11 Sep 2010 11:47:07 +0000
parents 1b924c910cfe
children 7704ea4d6839
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17627
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
1 #
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
2 # common bits used by all libraries
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
3 #
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
4
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
5 # first so "all" becomes default target
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
6 all: all-yes
26155
ba3e34112e47 sync with FFmpeg r12354
diego
parents: 24858
diff changeset
7
26317
955f4b8ac094 Merge simplifications from FFmpeg r12764.
diego
parents: 26315
diff changeset
8 ifndef SUBDIR
29136
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28444
diff changeset
9 vpath %.c $(SRC_DIR)
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28444
diff changeset
10 vpath %.h $(SRC_DIR)
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28444
diff changeset
11 vpath %.S $(SRC_DIR)
27868
c4913507c4ba Sync with latest FFmpeg changes.
diego
parents: 26671
diff changeset
12 vpath %.asm $(SRC_DIR)
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
13 vpath %.v $(SRC_DIR)
27868
c4913507c4ba Sync with latest FFmpeg changes.
diego
parents: 26671
diff changeset
14
c4913507c4ba Sync with latest FFmpeg changes.
diego
parents: 26671
diff changeset
15 ifeq ($(SRC_DIR),$(SRC_PATH_BARE))
c4913507c4ba Sync with latest FFmpeg changes.
diego
parents: 26671
diff changeset
16 BUILD_ROOT_REL = .
c4913507c4ba Sync with latest FFmpeg changes.
diego
parents: 26671
diff changeset
17 else
c4913507c4ba Sync with latest FFmpeg changes.
diego
parents: 26671
diff changeset
18 BUILD_ROOT_REL = ..
c4913507c4ba Sync with latest FFmpeg changes.
diego
parents: 26671
diff changeset
19 endif
26155
ba3e34112e47 sync with FFmpeg r12354
diego
parents: 24858
diff changeset
20
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
21 ifndef V
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
22 Q = @
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
23 ECHO = printf "$(1)\t%s\n" $(2)
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
24 BRIEF = CC AS YASM AR LD HOSTCC STRIP CP
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
25 SILENT = DEPCC YASMDEP RM RANLIB
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
26 MSG = $@
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
27 M = @$(call ECHO,$(TAG),$@);
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
28 $(foreach VAR,$(BRIEF), \
31870
e061d5d981ba Sync with current FFmpeg HEAD.
diego
parents: 31273
diff changeset
29 $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
e061d5d981ba Sync with current FFmpeg HEAD.
diego
parents: 31273
diff changeset
30 $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
31 $(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
32 endif
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
33
31870
e061d5d981ba Sync with current FFmpeg HEAD.
diego
parents: 31273
diff changeset
34 ALLFFLIBS = avcodec avcore avdevice avfilter avformat avutil postproc swscale
17627
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
35
31870
e061d5d981ba Sync with current FFmpeg HEAD.
diego
parents: 31273
diff changeset
36 IFLAGS := -I$(BUILD_ROOT_REL) -I$(SRC_PATH)
e061d5d981ba Sync with current FFmpeg HEAD.
diego
parents: 31273
diff changeset
37 CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
38 CFLAGS += $(ECFLAGS)
17627
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
39
31870
e061d5d981ba Sync with current FFmpeg HEAD.
diego
parents: 31273
diff changeset
40 HOSTCFLAGS += $(IFLAGS)
e061d5d981ba Sync with current FFmpeg HEAD.
diego
parents: 31273
diff changeset
41
17627
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
42 %.o: %.c
29672
bc094de7968e Sync with current FFmpeg HEAD.
diego
parents: 29136
diff changeset
43 $(CCDEP)
bc094de7968e Sync with current FFmpeg HEAD.
diego
parents: 29136
diff changeset
44 $(CC) $(CPPFLAGS) $(CFLAGS) $(CC_DEPFLAGS) -c $(CC_O) $<
17627
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
45
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
46 %.o: %.S
29672
bc094de7968e Sync with current FFmpeg HEAD.
diego
parents: 29136
diff changeset
47 $(ASDEP)
bc094de7968e Sync with current FFmpeg HEAD.
diego
parents: 29136
diff changeset
48 $(AS) $(CPPFLAGS) $(ASFLAGS) $(AS_DEPFLAGS) -c -o $@ $<
17627
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
49
24775
16f77f3eb187 Sync with FFmpeg r10774.
diego
parents: 23524
diff changeset
50 %.ho: %.h
29672
bc094de7968e Sync with current FFmpeg HEAD.
diego
parents: 29136
diff changeset
51 $(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
27868
c4913507c4ba Sync with latest FFmpeg changes.
diego
parents: 26671
diff changeset
52
26671
24e6708e030c Sync with latest FFmpeg changes.
diego
parents: 26403
diff changeset
53 %$(EXESUF): %.c
24e6708e030c Sync with latest FFmpeg changes.
diego
parents: 26403
diff changeset
54
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
55 %.ver: %.v
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
56 $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@
27868
c4913507c4ba Sync with latest FFmpeg changes.
diego
parents: 26671
diff changeset
57
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
58 %.c %.h: TAG = GEN
27868
c4913507c4ba Sync with latest FFmpeg changes.
diego
parents: 26671
diff changeset
59
31870
e061d5d981ba Sync with current FFmpeg HEAD.
diego
parents: 31273
diff changeset
60 # Dummy rule to stop make trying to rebuild removed or renamed headers
e061d5d981ba Sync with current FFmpeg HEAD.
diego
parents: 31273
diff changeset
61 %.h:
e061d5d981ba Sync with current FFmpeg HEAD.
diego
parents: 31273
diff changeset
62 @:
e061d5d981ba Sync with current FFmpeg HEAD.
diego
parents: 31273
diff changeset
63
17627
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
64 install: install-libs install-headers
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
65 install-libs: install-libs-yes
17627
24238abbd150 Import common.mak v1.1 from ffmpeg cvs, now it's needed by the building
rtognimp
parents:
diff changeset
66
19016
837e543350b3 sync with FFmpeg r5718
diego
parents: 18311
diff changeset
67 uninstall: uninstall-libs uninstall-headers
837e543350b3 sync with FFmpeg r5718
diego
parents: 18311
diff changeset
68
29136
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28444
diff changeset
69 .PHONY: all depend dep *clean install* uninstall* examples testprogs
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
70
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
71 # Disable suffix rules. Most of the builtin rules are suffix rules,
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
72 # so this saves some time on slow systems.
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
73 .SUFFIXES:
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
74
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
75 # Do not delete intermediate files from chains of implicit rules
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
76 $(OBJS):
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents: 26246
diff changeset
77 endif
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents: 26246
diff changeset
78
29136
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28444
diff changeset
79 OBJS-$(HAVE_MMX) += $(MMX-OBJS-yes)
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28444
diff changeset
80
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28444
diff changeset
81 CFLAGS += $(CFLAGS-yes)
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28444
diff changeset
82 OBJS += $(OBJS-yes)
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28444
diff changeset
83 FFLIBS := $(FFLIBS-yes) $(FFLIBS)
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28444
diff changeset
84 TESTPROGS += $(TESTPROGS-yes)
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents: 26246
diff changeset
85
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents: 26246
diff changeset
86 FFEXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS)
29136
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28444
diff changeset
87 FFLDFLAGS := $(addprefix -L$(BUILD_ROOT)/lib,$(ALLFFLIBS)) $(LDFLAGS)
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents: 26246
diff changeset
88
29136
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28444
diff changeset
89 EXAMPLES := $(addprefix $(SUBDIR),$(addsuffix -example$(EXESUF),$(EXAMPLES)))
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
90 OBJS := $(addprefix $(SUBDIR),$(sort $(OBJS)))
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
91 TESTOBJS := $(addprefix $(SUBDIR),$(TESTOBJS))
29136
cfdba9b5abba Sync with latest FFmpeg changes.
diego
parents: 28444
diff changeset
92 TESTPROGS := $(addprefix $(SUBDIR),$(addsuffix -test$(EXESUF),$(TESTPROGS)))
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
93 HOSTOBJS := $(addprefix $(SUBDIR),$(addsuffix .o,$(HOSTPROGS)))
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
94 HOSTPROGS := $(addprefix $(SUBDIR),$(addsuffix $(HOSTEXESUF),$(HOSTPROGS)))
26315
a80f0a7d73f4 Sync with FFmpeg's shiny new non-recursive build system.
diego
parents: 26246
diff changeset
95
29672
bc094de7968e Sync with current FFmpeg HEAD.
diego
parents: 29136
diff changeset
96 DEP_LIBS := $(foreach NAME,$(FFLIBS),$(BUILD_ROOT_REL)/lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
26403
c7c1cc069961 Sync with latest FFmpeg changes.
diego
parents: 26317
diff changeset
97
28444
bffc31262b0e Sync with latest FFmpeg changes.
diego
parents: 28143
diff changeset
98 ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
99 SKIPHEADERS += $(addprefix $(ARCH)/,$(ARCH_HEADERS))
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
100 SKIPHEADERS := $(addprefix $(SUBDIR),$(SKIPHEADERS-) $(SKIPHEADERS))
29672
bc094de7968e Sync with current FFmpeg HEAD.
diego
parents: 29136
diff changeset
101 checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho))
19016
837e543350b3 sync with FFmpeg r5718
diego
parents: 18311
diff changeset
102
31273
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
103 $(HOSTOBJS): %.o: %.c
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
104 $(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
105
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
106 $(HOSTPROGS): %$(HOSTEXESUF): %.o
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
107 $(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
108
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
109 CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
0f9c3f446fc6 Update common.mak and subdir.mak to latest FFmpeg versions.
reimar
parents: 29672
diff changeset
110 DISTCLEANSUFFIXES = *.pc
29672
bc094de7968e Sync with current FFmpeg HEAD.
diego
parents: 29136
diff changeset
111 LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp
26155
ba3e34112e47 sync with FFmpeg r12354
diego
parents: 24858
diff changeset
112
31886
1b924c910cfe Sync with current FFmpeg HEAD.
diego
parents: 31870
diff changeset
113 -include $(wildcard $(OBJS:.o=.d))