per-file dependencies (for the non-recursive parts)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26464 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2008-04-18 22:49:17 +00:00
parent 3f37dff367
commit 9818a95c58
2 changed files with 14 additions and 5 deletions

View File

@ -234,9 +234,10 @@ DIRS = gui \
all: $(ALL_PRG)
.depend: help_mp.h version.h codecs.conf.h
dep depend:
for part in $(PARTS); do $(MAKE) -C $$part depend; done
DEPS = $(SRCS_COMMON:.c=.d) $(SRCS_MPLAYER:.c=.d) $(SRCS_MENCODER:.c=.d)
$(DEPS): help_mp.h version.h codecs.conf.h
dep depend: $(DEPS)
for part in $(PARTS); do $(MAKE) -C $$part .depend; done
include mpcommon.mak
@ -395,6 +396,7 @@ distclean:: doxygen_clean
for part in $(PARTS); do $(MAKE) -C $$part distclean; done
$(MAKE) -C TOOLS distclean
-rm -f configure.log config.mak config.h
rm -f $(foreach dir,$(DIRS),$(foreach suffix,/*.d, $(addsuffix $(suffix),$(dir))))
strip:
strip -s $(ALL_PRG)

View File

@ -25,17 +25,24 @@ clean::
rm -f *.o *.a *.ho *~
distclean:: clean
rm -f .depend test test2
rm -f *.d .depend test test2
.depend: $(SRCS_COMMON) $(SRCS_MPLAYER) $(SRCS_MENCODER)
$(MPDEPEND_CMD) > $@
%.d: %.c
$(MPDEPEND_CMD) > $@
%.ho: %.h
$(CC) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
ALLHEADERS = $(wildcard *.h)
checkheaders: $(ALLHEADERS:.h=.ho)
-include .depend
# Hack to keep .depend from being generated at the top level unnecessarily.
ifndef DEPS
DEPS = .depend
endif
-include $(DEPS)
.PHONY: libs *clean dep depend