Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 200 lines (148 sloc) 6.015 kb
e1a5430 Move SRC_PATH hack around to allow compilation from subdir again.
Reimar Döffinger authored
1 MAIN_MAKEFILE=1
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
2 include config.mak
3
f038cf3 @mansr build: remove SRC_PATH_BARE variable
mansr authored
4 vpath %.c $(SRC_PATH)
006d2ab @hexene C++ Support ;)
hexene authored
5 vpath %.cpp $(SRC_PATH)
f038cf3 @mansr build: remove SRC_PATH_BARE variable
mansr authored
6 vpath %.h $(SRC_PATH)
9595f36 @michaelni Makefile: fix out of tree builds of .m files
michaelni authored
7 vpath %.m $(SRC_PATH)
f038cf3 @mansr build: remove SRC_PATH_BARE variable
mansr authored
8 vpath %.S $(SRC_PATH)
9 vpath %.asm $(SRC_PATH)
5657278 @jamrial Add Windows resource file support for shared libraries
jamrial authored
10 vpath %.rc $(SRC_PATH)
f038cf3 @mansr build: remove SRC_PATH_BARE variable
mansr authored
11 vpath %.v $(SRC_PATH)
12 vpath %.texi $(SRC_PATH)
bd9d4a6 @beastd build: Try to find fate_config.sh.template in source path
beastd authored
13 vpath %/fate_config.sh.template $(SRC_PATH)
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
14
5ded433 @michaelni Merge commit '14abeaa43d021afdce9119d906891abe89c03b88'
michaelni authored
15 AVPROGS-$(CONFIG_FFMPEG) += ffmpeg
16 AVPROGS-$(CONFIG_FFPLAY) += ffplay
17 AVPROGS-$(CONFIG_FFPROBE) += ffprobe
18 AVPROGS-$(CONFIG_FFSERVER) += ffserver
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
19
5ded433 @michaelni Merge commit '14abeaa43d021afdce9119d906891abe89c03b88'
michaelni authored
20 AVPROGS := $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF))
21 INSTPROGS = $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF))
14abeaa @DonDiego build: Separate building programs linking against libav* from building a...
DonDiego authored
22 PROGS += $(AVPROGS)
c262649 @mansr build: add rules to generate preprocessed source files
mansr authored
23
5ded433 @michaelni Merge commit '14abeaa43d021afdce9119d906891abe89c03b88'
michaelni authored
24 AVBASENAMES = ffmpeg ffplay ffprobe ffserver
25 ALLAVPROGS = $(AVBASENAMES:%=%$(PROGSSUF)$(EXESUF))
26 ALLAVPROGS_G = $(AVBASENAMES:%=%$(PROGSSUF)_g$(EXESUF))
c262649 @mansr build: add rules to generate preprocessed source files
mansr authored
27
5ded433 @michaelni Merge commit '14abeaa43d021afdce9119d906891abe89c03b88'
michaelni authored
28 $(foreach prog,$(AVBASENAMES),$(eval OBJS-$(prog) += cmdutils.o))
64f73ac cmdutils & opencl: add -opencl_bench option to test and show available O...
Lenny Wang authored
29 $(foreach prog,$(AVBASENAMES),$(eval OBJS-$(prog)-$(CONFIG_OPENCL) += cmdutils_opencl.o))
bb52492 @mansr build: move basic rules and variables to main Makefile
mansr authored
30
5ded433 @michaelni Merge commit '14abeaa43d021afdce9119d906891abe89c03b88'
michaelni authored
31 OBJS-ffmpeg += ffmpeg_opt.o ffmpeg_filter.o
3e641b4 @michaelni Merge commit '7671dd7cd7d51bbd637cc46d8f104a141bc355ea'
michaelni authored
32 OBJS-ffmpeg-$(HAVE_VDPAU_X11) += ffmpeg_vdpau.o
21c7e99 @michaelni Merge commit 'a61c2115fb936d50b8b0328d00562fe529a7c46a'
michaelni authored
33 OBJS-ffmpeg-$(HAVE_DXVA2_LIB) += ffmpeg_dxva2.o
5460ab7 @michaelni Merge commit '1839fafa951308237c4672ffd9a94f927b26eac7'
michaelni authored
34 OBJS-ffmpeg-$(CONFIG_VDA) += ffmpeg_vda.o
f524d2e ffserver: move configuration code to separate file
Lukasz Marek authored
35 OBJS-ffserver += ffserver_config.o
7671dd7 @elenril avconv: add support for VDPAU decoding
elenril authored
36
0641464 tools: add tiny_ssim
Loren Merritt authored
37 TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64
0d0b81f @elenril Generate manpages for AV{Format,Codec}Context AVOptions.
elenril authored
38 HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
8400368 @Cigaes tools: add uncoded_frame test program.
Cigaes authored
39 TOOLS = qt-faststart trasher uncoded_frame
28e1c97 @mansr build: rework rules for things in the tools dir
mansr authored
40 TOOLS-$(CONFIG_ZLIB) += cws2fws
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
41
5e2ba41 build: add avresample after avcodec to FFLIBS
Janne Grunau authored
42 # $(FFLIBS-yes) needs to be in linking order
43 FFLIBS-$(CONFIG_AVDEVICE) += avdevice
44 FFLIBS-$(CONFIG_AVFILTER) += avfilter
45 FFLIBS-$(CONFIG_AVFORMAT) += avformat
46 FFLIBS-$(CONFIG_AVCODEC) += avcodec
c8af852 @justinruggles Add libavresample
justinruggles authored
47 FFLIBS-$(CONFIG_AVRESAMPLE) += avresample
fcb5849 @michaelni Merge commit '5e2ba41d4b94de1fa5267081d6c4b6b262c8d86f'
michaelni authored
48 FFLIBS-$(CONFIG_POSTPROC) += postproc
49 FFLIBS-$(CONFIG_SWRESAMPLE) += swresample
5e2ba41 build: add avresample after avcodec to FFLIBS
Janne Grunau authored
50 FFLIBS-$(CONFIG_SWSCALE) += swscale
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
51
5a0f713 @mansr Allow disabling of lavc, lavf, lavd, and lsws
mansr authored
52 FFLIBS := avutil
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
53
29c1b25 @michaelni Makefile: fix path to ffprobe.xsd
michaelni authored
54 DATA_FILES := $(wildcard $(SRC_PATH)/presets/*.ffpreset) $(SRC_PATH)/doc/ffprobe.xsd
7ca102a @saste examples: add README file with simple compilation instructions
saste authored
55 EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) $(SRC_PATH)/doc/examples/Makefile $(SRC_PATH)/doc/examples/README
a1a84f6 @superdump Add (un)installation targets for ffpresets using the new DATADIR variabl...
superdump authored
56
90f9a58 @elenril w32pthreads: move from lavc to compat/
elenril authored
57 SKIPHEADERS = cmdutils_common_opts.h compat/w32pthreads.h
9b55e2e @mansr Skip cmdutils_common_opts.h fragment in checkheaders
mansr authored
58
57b4a3d @mansr build: include sub-makefiles using full path instead of symlinks
mansr authored
59 include $(SRC_PATH)/common.mak
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
60
61 FF_EXTRALIBS := $(FFEXTRALIBS)
62 FF_DEP_LIBS := $(DEP_LIBS)
63
14abeaa @DonDiego build: Separate building programs linking against libav* from building a...
DonDiego authored
64 all: $(AVPROGS)
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
65
80521c1 @mansr build: allow targets to specify extra objects to link with executables
mansr authored
66 $(TOOLS): %$(EXESUF): %.o $(EXEOBJS)
bb0babd @lu-zero build: Support executable only ldflags
lu-zero authored
67 $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $^ $(ELIBS)
28e1c97 @mansr build: rework rules for things in the tools dir
mansr authored
68
7baa115 @mansr build: export filtered -lz flag in config.mak
mansr authored
69 tools/cws2fws$(EXESUF): ELIBS = $(ZLIB)
8400368 @Cigaes tools: add uncoded_frame test program.
Cigaes authored
70 tools/uncoded_frame$(EXESUF): $(FF_DEP_LIBS)
71 tools/uncoded_frame$(EXESUF): ELIBS = $(FF_EXTRALIBS)
28e1c97 @mansr build: rework rules for things in the tools dir
mansr authored
72
8660191 @mansr Rerun configure when all*.c files have changed
mansr authored
73 config.h: .config
f038cf3 @mansr build: remove SRC_PATH_BARE variable
mansr authored
74 .config: $(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c))
9d0b304 @mansr Do not automatically run configure
mansr authored
75 @-tput bold 2>/dev/null
76 @-printf '\nWARNING: $(?F) newer than config.h, rerun configure\n\n'
77 @-tput sgr0 2>/dev/null
8660191 @mansr Rerun configure when all*.c files have changed
mansr authored
78
e7e19b1 @DonDiego build: Only clean the architecture subdirectory we build for.
DonDiego authored
79 SUBDIR_VARS := CLEANFILES EXAMPLES FFLIBS HOSTPROGS TESTPROGS TOOLS \
121604b @mstorsjo build: Include HEADERS-yes in the HEADERS variable
mstorsjo authored
80 HEADERS ARCH_HEADERS BUILT_HEADERS SKIPHEADERS \
8675bcb @jannau aarch64: add armv8 CPU flag
jannau authored
81 ARMV5TE-OBJS ARMV6-OBJS ARMV8-OBJS VFP-OBJS NEON-OBJS \
b4dd424 @DonDiego Remove all SPARC architecture optimizations
DonDiego authored
82 ALTIVEC-OBJS MMX-OBJS YASM-OBJS \
3827a86 @nbabic Optimization of AMR NB and WB decoders for MIPS
nbabic authored
83 MIPSFPU-OBJS MIPSDSPR2-OBJS MIPSDSPR1-OBJS MIPS32R2-OBJS \
5657278 @jamrial Add Windows resource file support for shared libraries
jamrial authored
84 OBJS SLIBOBJS HOSTOBJS TESTOBJS
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
85
86 define RESET
87 $(1) :=
88 $(1)-yes :=
89 endef
90
91 define DOSUBDIR
92 $(foreach V,$(SUBDIR_VARS),$(eval $(call RESET,$(V))))
93 SUBDIR := $(1)/
57b4a3d @mansr build: include sub-makefiles using full path instead of symlinks
mansr authored
94 include $(SRC_PATH)/$(1)/Makefile
07a873a @DonDiego build: Automatically include architecture-specific library Makefile snip...
DonDiego authored
95 -include $(SRC_PATH)/$(1)/$(ARCH)/Makefile
d45ebd4 configure: add support for neon intrinsics
Janne Grunau authored
96 -include $(SRC_PATH)/$(1)/$(INTRINSICS)/Makefile
144904e @DonDiego build: rename subdir.mak ---> library.mak
DonDiego authored
97 include $(SRC_PATH)/library.mak
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
98 endef
99
100 $(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
101
ab81f24 @DonDiego build: Integrate multilibrary examples into the build system
DonDiego authored
102 include $(SRC_PATH)/doc/Makefile
103
baac24e @mansr build: generalise rules and variable settings for av* programs
mansr authored
104 define DOPROG
14abeaa @DonDiego build: Separate building programs linking against libav* from building a...
DonDiego authored
105 OBJS-$(1) += $(1).o $(EXEOBJS) $(OBJS-$(1)-yes)
8227d36 @michaelni Merge remote-tracking branch 'qatar/master'
michaelni authored
106 $(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
baac24e @mansr build: generalise rules and variable settings for av* programs
mansr authored
107 $$(OBJS-$(1)): CFLAGS += $(CFLAGS-$(1))
95d1af1 @jamrial build: Fix compilation when configuring with a prog suffix
jamrial authored
108 $(1)$(PROGSSUF)_g$(EXESUF): LDFLAGS += $(LDFLAGS-$(1))
109 $(1)$(PROGSSUF)_g$(EXESUF): FF_EXTRALIBS += $(LIBS-$(1))
baac24e @mansr build: generalise rules and variable settings for av* programs
mansr authored
110 -include $$(OBJS-$(1):.o=.d)
111 endef
112
875f9ae @michaelni Merge commit 'dc80e2f7a529d6e4416b40b68699be16fed62d6c'
michaelni authored
113 $(foreach P,$(PROGS),$(eval $(call DOPROG,$(P:$(PROGSSUF)$(EXESUF)=))))
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
114
4ae8755 @michaelni Makefile: add dependencies which require ffversion.h
michaelni authored
115 ffprobe.o cmdutils.o libavcodec/utils.o libavformat/utils.o libavdevice/avdevice.o libavfilter/avfilter.o libavutil/utils.o libpostproc/postprocess.o libswresample/swresample.o libswscale/utils.o : libavutil/ffversion.h
4d0ac9a @michaelni Makefile: add dependancies for ffversion.h
michaelni authored
116
875f9ae @michaelni Merge commit 'dc80e2f7a529d6e4416b40b68699be16fed62d6c'
michaelni authored
117 $(PROGS): %$(PROGSSUF)$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
325c918 @michaelni Makefile: Fix building progs out of progs_g
michaelni authored
118 $(CP) $< $@
119 $(STRIP) $@
120
8227d36 @michaelni Merge remote-tracking branch 'qatar/master'
michaelni authored
121 %$(PROGSSUF)_g$(EXESUF): %.o $(FF_DEP_LIBS)
bb0babd @lu-zero build: Support executable only ldflags
lu-zero authored
122 $(LD) $(LDFLAGS) $(LDEXEFLAGS) $(LD_O) $(OBJS-$*) $(FF_EXTRALIBS)
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
123
5e27ec2 @mansr build: create output directories as needed
mansr authored
124 OBJDIRS += tools
125
08df7f8 @mansr Makefile: include deps from tools directory
mansr authored
126 -include $(wildcard tools/*.d)
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
127
f038cf3 @mansr build: remove SRC_PATH_BARE variable
mansr authored
128 VERSION_SH = $(SRC_PATH)/version.sh
129 GIT_LOG = $(SRC_PATH)/.git/logs/HEAD
6a53fff @mansr Improve version.h generation
mansr authored
130
faa6f1c get rid of the last svn mentions
Janne Grunau authored
131 .version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak
6a53fff @mansr Improve version.h generation
mansr authored
132 .version: M=@
133
82b2e9c @TimothyGu build: rename version.h to libavutil/ffversion.h
TimothyGu authored
134 libavutil/ffversion.h .version:
135 $(M)$(VERSION_SH) $(SRC_PATH) libavutil/ffversion.h $(EXTRA_VERSION)
6a53fff @mansr Improve version.h generation
mansr authored
136 $(Q)touch .version
137
138 # force version.sh to run whenever version might have changed
139 -include .version
36798f1 @mansr Declare version.h dependencies explicitly
mansr authored
140
14abeaa @DonDiego build: Separate building programs linking against libav* from building a...
DonDiego authored
141 ifdef AVPROGS
623ffe8 @mansr build: simplify some conditional targets
mansr authored
142 install: install-progs install-data
143 endif
144
145 install: install-libs install-headers
d7a72d2 @mansr build: move all (un)install* target aliases to toplevel Makefile
mansr authored
146
147 install-libs: install-libs-yes
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
148
151c584 @mansr build: fix "make install" with documentation disabled
mansr authored
149 install-progs-yes:
623ffe8 @mansr build: simplify some conditional targets
mansr authored
150 install-progs-$(CONFIG_SHARED): install-libs
151
14abeaa @DonDiego build: Separate building programs linking against libav* from building a...
DonDiego authored
152 install-progs: install-progs-yes $(AVPROGS)
63611f3 @mansr Prettify make output
mansr authored
153 $(Q)mkdir -p "$(BINDIR)"
c975cfa @ubitux build: fix install rule with --progs-suffix.
ubitux authored
154 $(INSTALL) -c -m 755 $(INSTPROGS) "$(BINDIR)"
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
155
0cc9ee5 @ubitux doc/examples: install them with the shared data.
ubitux authored
156 install-data: $(DATA_FILES) $(EXAMPLES_FILES)
157 $(Q)mkdir -p "$(DATADIR)/examples"
fd676de @mansr Add INSTALL makefile variable
mansr authored
158 $(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
0cc9ee5 @ubitux doc/examples: install them with the shared data.
ubitux authored
159 $(INSTALL) -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples"
a1a84f6 @superdump Add (un)installation targets for ffpresets using the new DATADIR variabl...
superdump authored
160
f87b03b @mansr build: move documentation rules to doc/Makefile
mansr authored
161 uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data
d3cb93b @ramiropolla Revert r21226, it was a joke:
ramiropolla authored
162
163 uninstall-progs:
14abeaa @DonDiego build: Separate building programs linking against libav* from building a...
DonDiego authored
164 $(RM) $(addprefix "$(BINDIR)/", $(ALLAVPROGS))
d3cb93b @ramiropolla Revert r21226, it was a joke:
ramiropolla authored
165
166 uninstall-data:
50e10cb @mansr Use $(RM) to delete files
mansr authored
167 $(RM) -r "$(DATADIR)"
d3cb93b @ramiropolla Revert r21226, it was a joke:
ramiropolla authored
168
698a183 @mansr build: move test rules to tests/Makefile
mansr authored
169 clean::
5ded433 @michaelni Merge commit '14abeaa43d021afdce9119d906891abe89c03b88'
michaelni authored
170 $(RM) $(ALLAVPROGS) $(ALLAVPROGS_G)
50e10cb @mansr Use $(RM) to delete files
mansr authored
171 $(RM) $(CLEANSUFFIXES)
4032137 Allow "make clean" to clean files in tools
Stefano Sabatini authored
172 $(RM) $(CLEANSUFFIXES:%=tools/%)
840ecc9 Add coverage support.
Reimar Döffinger authored
173 $(RM) -r coverage-html
a862c7d Integrate lcov/gcov into Libav
Reinhard Tartler authored
174 $(RM) -rf coverage.info lcov
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
175
176 distclean::
50e10cb @mansr Use $(RM) to delete files
mansr authored
177 $(RM) $(DISTCLEANSUFFIXES)
16f4e2a @michaelni Makefile: remove version.h on distclean
michaelni authored
178 $(RM) config.* .config libavutil/avconfig.h .version version.h libavutil/ffversion.h libavcodec/codec_names.h
bde51e6 @justinruggles restore accidently deleted file
justinruggles authored
179
9d0b304 @mansr Do not automatically run configure
mansr authored
180 config:
e528cda @michaelni Revert "replace FFMPEG with LIBAV in FFMPEG_CONFIGURATION"
michaelni authored
181 $(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION)
0c3b2d6 @mansr Add "config" make target to rerun configure with old options
mansr authored
182
7c8b5d1 @michaelni Makefile: remove checkheaders from the main check target
michaelni authored
183 check: all alltools examples testprogs fate
4982e1d @DonDiego build: Add 'check' target to run all compile and test targets.
DonDiego authored
184
57b4a3d @mansr build: include sub-makefiles using full path instead of symlinks
mansr authored
185 include $(SRC_PATH)/tests/Makefile
d29d9cc @mansr fate: print list of tests with "make fate-list"
mansr authored
186
5e27ec2 @mansr build: create output directories as needed
mansr authored
187 $(sort $(OBJDIRS)):
188 $(Q)mkdir -p $@
189
8d853ef @mansr build: move special targets to end of main Makefile
mansr authored
190 # Dummy rule to stop make trying to rebuild removed or renamed headers
191 %.h:
192 @:
193
194 # Disable suffix rules. Most of the builtin rules are suffix rules,
195 # so this saves some time on slow systems.
196 .SUFFIXES:
197
06e4b98 @ubitux build: remove non-existant examples rule.
ubitux authored
198 .PHONY: all all-yes alltools check *clean config install*
698a183 @mansr build: move test rules to tests/Makefile
mansr authored
199 .PHONY: testprogs uninstall*
Something went wrong with that request. Please try again.