comparison Makefile @ 26563:098e4774b951

Merge mpcommon.mak into Makefile.
author diego
date Tue, 29 Apr 2008 08:53:08 +0000
parents 36a4064bba4f
children 2603eac4aaa4
comparison
equal deleted inserted replaced
26562:36a4064bba4f 26563:098e4774b951
626 ALL_PRG += $(ALL_PRG-yes) 626 ALL_PRG += $(ALL_PRG-yes)
627 627
628 MPLAYER_DEPS = $(OBJS_MPLAYER) $(OBJS_COMMON) $(COMMON_LIBS) 628 MPLAYER_DEPS = $(OBJS_MPLAYER) $(OBJS_COMMON) $(COMMON_LIBS)
629 MENCODER_DEPS = $(OBJS_MENCODER) $(OBJS_COMMON) $(COMMON_LIBS) 629 MENCODER_DEPS = $(OBJS_MENCODER) $(OBJS_COMMON) $(COMMON_LIBS)
630 630
631 SRCS_COMMON += $(SRCS_COMMON-yes) $(SRCS_COMMON-yes-yes) $(SRCS_COMMON-yes-yes-yes)
632 SRCS_MENCODER += $(SRCS_MENCODER-yes)
633 SRCS_MPLAYER += $(SRCS_MPLAYER-yes)
634
635 OBJS_COMMON += $(addsuffix .o, $(basename $(SRCS_COMMON)) )
636 OBJS_MENCODER += $(addsuffix .o, $(basename $(SRCS_MENCODER)) )
637 OBJS_MPLAYER += $(addsuffix .o, $(basename $(SRCS_MPLAYER)) )
638
639 CFLAGS += $(CFLAGS-yes) $(OPTFLAGS)
640
631 INSTALL_TARGETS-$(MPLAYER) += install-mplayer install-mplayer-man 641 INSTALL_TARGETS-$(MPLAYER) += install-mplayer install-mplayer-man
632 INSTALL_TARGETS-$(MENCODER) += install-mencoder install-mplayer-man 642 INSTALL_TARGETS-$(MENCODER) += install-mencoder install-mplayer-man
633 INSTALL_TARGETS-$(GUI) += install-gui 643 INSTALL_TARGETS-$(GUI) += install-gui
634 INSTALL_TARGETS += $(INSTALL_TARGETS-yes) 644 INSTALL_TARGETS += $(INSTALL_TARGETS-yes)
635 645
689 all: $(ALL_PRG) 699 all: $(ALL_PRG)
690 700
691 recurse: 701 recurse:
692 for part in $(PARTS); do $(MAKE) -C $$part; done 702 for part in $(PARTS); do $(MAKE) -C $$part; done
693 703
694 include mpcommon.mak 704 %.d: %.c
705 $(MPDEPEND_CMD) > $@
706
707 %.d: %.cpp
708 $(MPDEPEND_CMD_CXX) > $@
709
710 %.d: %.m
711 $(MPDEPEND_CMD) > $@
712
713 %.ho: %.h
714 $(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
715
716 %.o: %.m
717 $(CC) $(CFLAGS) -c -o $@ $<
695 718
696 DEPS = $(filter-out %.S,$(patsubst %.cpp,%.d,$(patsubst %.c,%.d,$(SRCS_COMMON) $(SRCS_MPLAYER:.m=.d) $(SRCS_MENCODER)))) 719 DEPS = $(filter-out %.S,$(patsubst %.cpp,%.d,$(patsubst %.c,%.d,$(SRCS_COMMON) $(SRCS_MPLAYER:.m=.d) $(SRCS_MENCODER))))
697 $(DEPS) recurse: help_mp.h version.h codecs.conf.h 720 $(DEPS) recurse: help_mp.h version.h codecs.conf.h
698 dep depend: $(DEPS) 721 dep depend: $(DEPS)
699 for part in $(PARTS); do $(MAKE) -C $$part depend; done 722 for part in $(PARTS); do $(MAKE) -C $$part depend; done
861 rm -f $@; ( find -name '*.[chS]' -print ) | xargs etags -a 884 rm -f $@; ( find -name '*.[chS]' -print ) | xargs etags -a
862 885
863 tags: 886 tags:
864 rm -f $@; ( find -name '*.[chS]' -print ) | xargs ctags -a 887 rm -f $@; ( find -name '*.[chS]' -print ) | xargs ctags -a
865 888
889 ALLHEADERS = $(wildcard *.h)
890 checkheaders: $(ALLHEADERS:.h=.ho)
891
866 # ./configure must be rerun if it changed 892 # ./configure must be rerun if it changed
867 config.mak: configure 893 config.mak: configure
868 @echo "############################################################" 894 @echo "############################################################"
869 @echo "####### Please run ./configure again - it's changed! #######" 895 @echo "####### Please run ./configure again - it's changed! #######"
870 @echo "############################################################" 896 @echo "############################################################"
945 rm -f $(ALLTOOLS) TOOLS/fastmem*-* TOOLS/realcodecs/*.so.6.0 971 rm -f $(ALLTOOLS) TOOLS/fastmem*-* TOOLS/realcodecs/*.so.6.0
946 972
947 -include $(DEPS) 973 -include $(DEPS)
948 974
949 .PHONY: all doxygen *install* recurse strip *tools 975 .PHONY: all doxygen *install* recurse strip *tools
976 .PHONY: checkheaders *clean dep depend