From 82b8b8dbe7202b22026cec6081769525c1d2cf03 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 9 May 2008 17:47:19 +0000 Subject: [PATCH] cosmetics: Move some stuff around for more logical grouping. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26707 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Makefile | 142 +++++++++++++++++++++++++++---------------------------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/Makefile b/Makefile index 0783f866d9..b35e4ded37 100644 --- a/Makefile +++ b/Makefile @@ -638,12 +638,6 @@ INSTALL_TARGETS-$(MENCODER) += install-mencoder install-mplayer-man INSTALL_TARGETS-$(GUI) += install-gui INSTALL_TARGETS += $(INSTALL_TARGETS-yes) -PARTS = libavcodec \ - libavformat \ - libavutil \ - libpostproc \ - libswscale \ - DIRS = . \ dvdread \ gui \ @@ -691,6 +685,12 @@ DIRS = . \ TOOLS \ vidix \ +PARTS = libavcodec \ + libavformat \ + libavutil \ + libpostproc \ + libswscale \ + all: $(ALL_PRG) %.d: %.c @@ -702,44 +702,18 @@ all: $(ALL_PRG) %.d: %.m $(MPDEPEND_CMD) > $@ -%.ho: %.h - $(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $< - %.o: %.m $(CC) $(CFLAGS) -c -o $@ $< -codec-cfg.d: codecs.conf.h -mencoder.d mplayer.d vobsub.d gui/win32/gui.d libmpdemux/muxer_avi.d stream/network.d stream/stream_cddb.d: version.h -DEPS = $(filter-out %.S,$(patsubst %.cpp,%.d,$(patsubst %.c,%.d,$(SRCS_COMMON) $(SRCS_MPLAYER:.m=.d) $(SRCS_MENCODER)))) -$(DEPS): help_mp.h +%.ho: %.h + $(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $< + +ALLHEADERS = $(foreach dir,$(DIRS),$(wildcard $(dir)/*.h)) +checkheaders: $(ALLHEADERS:.h=.ho) dep depend: $(DEPS) for part in $(PARTS); do $(MAKE) -C $$part depend; done -# rebuild version.h each time the working copy is updated -ifeq ($(wildcard .svn/entries),.svn/entries) -version.h: .svn/entries -endif -version.h: - ./version.sh `$(CC) -dumpversion` - -help_mp.h: help/help_mp-en.h $(HELP_FILE) - @echo '// WARNING! This is a generated file. Do NOT edit.' > help_mp.h - @echo '// See the help/ subdir for the editable files.' >> help_mp.h - @echo '#ifndef MPLAYER_HELP_MP_H' >> help_mp.h - @echo '#define MPLAYER_HELP_MP_H' >> help_mp.h -ifeq ($(CHARSET),) - @echo '#include "$(HELP_FILE)"' >> help_mp.h -else - iconv -f UTF-8 -t $(CHARSET) "$(HELP_FILE)" >> help_mp.h -endif - @echo '#endif /* MPLAYER_HELP_MP_H */' >> help_mp.h - -ifneq ($(HELP_FILE),help/help_mp-en.h) - @echo '// untranslated messages from the English master file:' >> help_mp.h - @help/help_diff.sh $(HELP_FILE) < help/help_mp-en.h >> help_mp.h -endif - define RECURSIVE_RULE $(part)/$(part).a: recurse $(MAKE) -C $(part) @@ -768,6 +742,41 @@ codec-cfg-test$(EXESUF): codecs.conf.h codec-cfg.h mp_msg.o osdep/getch2.o osdep/mplayer-rc.o: osdep/mplayer.rc version.h $(WINDRES) -o $@ $< +# ./configure must be rerun if it changed +config.mak: configure + @echo "############################################################" + @echo "####### Please run ./configure again - it's changed! #######" + @echo "############################################################" + +# rebuild version.h each time the working copy is updated +ifeq ($(wildcard .svn/entries),.svn/entries) +version.h: .svn/entries +endif +version.h: + ./version.sh `$(CC) -dumpversion` + +help_mp.h: help/help_mp-en.h $(HELP_FILE) + @echo '// WARNING! This is a generated file. Do NOT edit.' > help_mp.h + @echo '// See the help/ subdir for the editable files.' >> help_mp.h + @echo '#ifndef MPLAYER_HELP_MP_H' >> help_mp.h + @echo '#define MPLAYER_HELP_MP_H' >> help_mp.h +ifeq ($(CHARSET),) + @echo '#include "$(HELP_FILE)"' >> help_mp.h +else + iconv -f UTF-8 -t $(CHARSET) "$(HELP_FILE)" >> help_mp.h +endif + @echo '#endif /* MPLAYER_HELP_MP_H */' >> help_mp.h + +ifneq ($(HELP_FILE),help/help_mp-en.h) + @echo '// untranslated messages from the English master file:' >> help_mp.h + @help/help_diff.sh $(HELP_FILE) < help/help_mp-en.h >> help_mp.h +endif + +codec-cfg.d: codecs.conf.h +mencoder.d mplayer.d vobsub.d gui/win32/gui.d libmpdemux/muxer_avi.d stream/network.d stream/stream_cddb.d: version.h +DEPS = $(filter-out %.S,$(patsubst %.cpp,%.d,$(patsubst %.c,%.d,$(SRCS_COMMON) $(SRCS_MPLAYER:.m=.d) $(SRCS_MENCODER)))) +$(DEPS): help_mp.h + dvdread/%.o dvdread/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE $(LIBDVDCSS_DVDREAD_FLAGS) libdvdcss/%.o libdvdcss/%.d: CFLAGS += -D__USE_UNIX98 -D_GNU_SOURCE -DVERSION=\"1.2.9\" libfaad2/%.o libfaad2/%.d: CFLAGS += -Ilibfaad2 -D_GNU_SOURCE @@ -789,29 +798,6 @@ VIDIX_OBJS = $(filter vidix/%,$(SRCS_MPLAYER:.c=.o)) $(VIDIX_DEPS) $(VIDIX_OBJS): $(VIDIX_PCI_FILES) -TEST_OBJS = mp_msg-mencoder.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm - -liba52/test$(EXESUF): liba52/test.c cpudetect.o $(filter liba52/%,$(SRCS_COMMON:.c=.o)) - -libvo/aspecttest$(EXESUF): libvo/aspecttest.c libvo/aspect.o libvo/geometry.o $(TEST_OBJS) - -LOADER_TEST_OBJS = $(filter loader/%,$(SRCS_COMMON:.c=.o)) libmpdemux/aviprint.o osdep/mmap_anon.o cpudetect.o $(TEST_OBJS) - -loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): CFLAGS += -g -loader/qtx/list$(EXESUF): loader/qtx/list.c $(LOADER_TEST_OBJS) -loader/qtx/qtxload$(EXESUF): loader/qtx/qtxload.c $(LOADER_TEST_OBJS) - -mp3lib/test$(EXESUF): mp3lib/test.c $(filter mp3lib/%,$(SRCS_COMMON:.c=.o)) libvo/aclib.o cpudetect.o $(TEST_OBJS) -mp3lib/test2$(EXESUF): mp3lib/test2.c $(filter mp3lib/%,$(SRCS_COMMON:.c=.o)) libvo/aclib.o cpudetect.o $(TEST_OBJS) - -TESTS = liba52/test$(EXESUF) libvo/aspecttest$(EXESUF) \ - loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF) \ - mp3lib/test$(EXESUF) mp3lib/test2$(EXESUF) - -tests: $(TESTS) - -testsclean: - rm -f $(TESTS) install: install-dirs $(INSTALL_TARGETS) @@ -880,6 +866,11 @@ distclean: clean doxygen_clean testsclean toolsclean codec-cfg$(EXESUF) codecs2html$(EXESUF) codec-cfg-test$(EXESUF) \ cpuinfo$(EXESUF) TAGS tags +doxygen: + doxygen DOCS/tech/Doxyfile + +doxygen_clean: + -rm -rf DOCS/tech/doxygen strip: strip -s $(ALL_PRG) @@ -889,21 +880,30 @@ TAGS: tags: rm -f $@; ( find -name '*.[chS]' -print ) | xargs ctags -a -ALLHEADERS = $(foreach dir,$(DIRS),$(wildcard $(dir)/*.h)) -checkheaders: $(ALLHEADERS:.h=.ho) -# ./configure must be rerun if it changed -config.mak: configure - @echo "############################################################" - @echo "####### Please run ./configure again - it's changed! #######" - @echo "############################################################" +TEST_OBJS = mp_msg-mencoder.o mp_fifo.o osdep/$(GETCH) osdep/$(TIMER) -ltermcap -lm -doxygen: - doxygen DOCS/tech/Doxyfile +liba52/test$(EXESUF): liba52/test.c cpudetect.o $(filter liba52/%,$(SRCS_COMMON:.c=.o)) -doxygen_clean: - -rm -rf DOCS/tech/doxygen +libvo/aspecttest$(EXESUF): libvo/aspecttest.c libvo/aspect.o libvo/geometry.o $(TEST_OBJS) +LOADER_TEST_OBJS = $(filter loader/%,$(SRCS_COMMON:.c=.o)) libmpdemux/aviprint.o osdep/mmap_anon.o cpudetect.o $(TEST_OBJS) + +loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF): CFLAGS += -g +loader/qtx/list$(EXESUF): loader/qtx/list.c $(LOADER_TEST_OBJS) +loader/qtx/qtxload$(EXESUF): loader/qtx/qtxload.c $(LOADER_TEST_OBJS) + +mp3lib/test$(EXESUF): mp3lib/test.c $(filter mp3lib/%,$(SRCS_COMMON:.c=.o)) libvo/aclib.o cpudetect.o $(TEST_OBJS) +mp3lib/test2$(EXESUF): mp3lib/test2.c $(filter mp3lib/%,$(SRCS_COMMON:.c=.o)) libvo/aclib.o cpudetect.o $(TEST_OBJS) + +TESTS = liba52/test$(EXESUF) libvo/aspecttest$(EXESUF) \ + loader/qtx/list$(EXESUF) loader/qtx/qtxload$(EXESUF) \ + mp3lib/test$(EXESUF) mp3lib/test2$(EXESUF) + +tests: $(TESTS) + +testsclean: + rm -f $(TESTS) TOOLS = TOOLS/alaw-gen$(EXESUF) \ TOOLS/asfinfo$(EXESUF) \