Mercurial > mplayer.hg
comparison Makefile @ 23182:8749e6b047ef
Reuse common Makefile infrastructure.
author | diego |
---|---|
date | Tue, 01 May 2007 19:16:35 +0000 |
parents | 802db540ff83 |
children | db5d7b8e3e81 |
comparison
equal
deleted
inserted
replaced
23181:802db540ff83 | 23182:8749e6b047ef |
---|---|
3 # * for loops instead of linear sequence of make directories | 3 # * for loops instead of linear sequence of make directories |
4 # * some minor problems with make clean and distclean were corrected | 4 # * some minor problems with make clean and distclean were corrected |
5 # * DVD support | 5 # * DVD support |
6 | 6 |
7 include config.mak | 7 include config.mak |
8 | |
9 CFLAGS = -I. -I./libavutil $(OPTFLAGS) | |
10 | |
11 CFLAGS-$(LIBAVCODEC) += -I./libavcodec | |
12 CFLAGS += $(CFLAGS-yes) | |
13 | 8 |
14 COMMON_LDFLAGS += $(EXTRA_LIB)\ | 9 COMMON_LDFLAGS += $(EXTRA_LIB)\ |
15 $(EXTRALIBS) \ | 10 $(EXTRALIBS) \ |
16 | 11 |
17 LDFLAGS_MPLAYER = $(EXTRALIBS_MPLAYER) \ | 12 LDFLAGS_MPLAYER = $(EXTRALIBS_MPLAYER) \ |
89 OBJS_MPLAYER-$(TARGET_WIN32) += osdep/mplayer-rc.o | 84 OBJS_MPLAYER-$(TARGET_WIN32) += osdep/mplayer-rc.o |
90 | 85 |
91 ALL_PRG-$(MPLAYER) += mplayer$(EXESUF) | 86 ALL_PRG-$(MPLAYER) += mplayer$(EXESUF) |
92 ALL_PRG-$(MENCODER) += mencoder$(EXESUF) | 87 ALL_PRG-$(MENCODER) += mencoder$(EXESUF) |
93 | 88 |
94 OBJS_COMMON = $(SRCS_COMMON:.c=.o) | |
95 OBJS_MPLAYER = $(SRCS_MPLAYER:.c=.o) | |
96 OBJS_MENCODER = $(SRCS_MENCODER:.c=.o) | |
97 | |
98 SRCS_COMMON += $(SRCS_COMMON-yes) | |
99 COMMON_LIBS += $(COMMON_LIBS-yes) | 89 COMMON_LIBS += $(COMMON_LIBS-yes) |
100 LIBS_MPLAYER += $(LIBS_MPLAYER-yes) | 90 LIBS_MPLAYER += $(LIBS_MPLAYER-yes) |
101 OBJS_MPLAYER += $(OBJS_MPLAYER-yes) | 91 OBJS_MPLAYER += $(OBJS_MPLAYER-yes) |
102 PARTS += $(PARTS-yes) | 92 PARTS += $(PARTS-yes) |
103 ALL_PRG += $(ALL_PRG-yes) | 93 ALL_PRG += $(ALL_PRG-yes) |
139 vidix \ | 129 vidix \ |
140 | 130 |
141 | 131 |
142 all: $(ALL_PRG) | 132 all: $(ALL_PRG) |
143 | 133 |
144 dep depend: help_mp.h version.h codecs.conf.h | 134 dep depend:: help_mp.h version.h codecs.conf.h |
145 $(CC) -MM $(CFLAGS) $(SRCS_MPLAYER) $(SRCS_MENCODER) $(SRCS_COMMON) 1>.depend | |
146 @for a in $(PARTS); do $(MAKE) -C $$a dep; done | 135 @for a in $(PARTS); do $(MAKE) -C $$a dep; done |
136 | |
137 include mpcommon.mak | |
138 | |
139 CFLAGS := $(subst -I..,-I.,$(CFLAGS)) | |
147 | 140 |
148 libaf/libaf.a: | 141 libaf/libaf.a: |
149 $(MAKE) -C libaf | 142 $(MAKE) -C libaf |
150 | 143 |
151 dvdread/libdvdread.a: | 144 dvdread/libdvdread.a: |
303 $(MANDIR)/$$l/man1/mencoder.1 \ | 296 $(MANDIR)/$$l/man1/mencoder.1 \ |
304 $(MANDIR)/$$l/man1/gmplayer.1 ; \ | 297 $(MANDIR)/$$l/man1/gmplayer.1 ; \ |
305 fi ; \ | 298 fi ; \ |
306 done | 299 done |
307 | 300 |
308 clean: | 301 clean:: |
309 -rm -f *.o *.a *~ | |
310 -rm -f mplayer$(EXESUF) mencoder$(EXESUF) codec-cfg$(EXESUF) \ | 302 -rm -f mplayer$(EXESUF) mencoder$(EXESUF) codec-cfg$(EXESUF) \ |
311 codecs2html$(EXESUF) codec-cfg-test$(EXESUF) cpuinfo$(EXESUF) \ | 303 codecs2html$(EXESUF) codec-cfg-test$(EXESUF) cpuinfo$(EXESUF) \ |
312 codecs.conf.h help_mp.h version.h | 304 codecs.conf.h help_mp.h version.h |
313 @for a in $(PARTS); do $(MAKE) -C $$a clean; done | 305 @for a in $(PARTS); do $(MAKE) -C $$a clean; done |
314 | 306 |
315 distclean: clean doxygen_clean | 307 distclean:: doxygen_clean |
316 @for a in $(PARTS); do $(MAKE) -C $$a distclean; done | 308 @for a in $(PARTS); do $(MAKE) -C $$a distclean; done |
317 -rm -f .depend configure.log config.mak config.h | 309 -rm -f configure.log config.mak config.h |
318 | 310 |
319 strip: | 311 strip: |
320 strip -s $(ALL_PRG) | 312 strip -s $(ALL_PRG) |
321 | 313 |
322 # ./configure must be rerun if it changed | 314 # ./configure must be rerun if it changed |
403 vidix/libvidix.a: .norecurse $(wildcard vidix/*.[ch]) | 395 vidix/libvidix.a: .norecurse $(wildcard vidix/*.[ch]) |
404 gui/libgui.a: .norecurse $(wildcard gui/*.[ch] gui/*/*.[ch] gui/*/*/*.[ch]) | 396 gui/libgui.a: .norecurse $(wildcard gui/*.[ch] gui/*/*.[ch] gui/*/*/*.[ch]) |
405 | 397 |
406 libass/libass.a: .norecurse $(wildcard libass/*.[ch]) | 398 libass/libass.a: .norecurse $(wildcard libass/*.[ch]) |
407 | 399 |
408 -include .depend | 400 .PHONY: all install* uninstall strip doxygen doxygen_clean |
409 | |
410 .PHONY: all install* uninstall clean distclean strip dep depend | |
411 .PHONY: doxygen doxygen_clean |