Commit 315c741d authored by Diego Biurrun's avatar Diego Biurrun
Browse files

Move dependency generation commands into configure.

This will allow specifying gcc-independent commands in the future.

Originally committed as revision 12426 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 8b83d568
......@@ -223,11 +223,10 @@ depend dep: .depend .vhookdep
$(MAKE-$(CONFIG_AVFILTER)) -C libavfilter depend
.depend: $(SRCS) version.h
$(CC) -MM $(CFLAGS) $(filter-out %.h,$^) > $@
$(DEPEND_CMD) > $@
# gcc stupidly only outputs the basename of targets with -MM
.vhookdep: $(ALLHOOKS_SRCS) version.h
$(CC) -MM $(VHOOKCFLAGS) $(filter-out %.h,$^) | sed 's,^\([a-z]\),vhook/\1,' > $@
$(VHOOK_DEPEND_CMD) > $@
$(DEP_LIBS): lib
......
......@@ -61,9 +61,8 @@ $(SLIBNAME_WITH_MAJOR): $(OBJS)
ALLHEADERS = $(subst $(LIBSRC)/,,$(wildcard $(LIBSRC)/*.h))
checkheaders: $(filter-out %_template.ho,$(ALLHEADERS:.h=.ho))
# gcc stupidly only outputs the basename of targets with -MM
depend dep: $(SRCS)
$(CC) -MM $(CFLAGS) $^ | sed 's,[0-9a-z._-]*: \([a-z0-9]*/\).*,\1&,' > .depend
$(DEPEND_CMD) > .depend
clean::
rm -f *.o *~ *.a *.lib *.so *.so.* *.dylib *.dll \
......
......@@ -934,6 +934,10 @@ SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
LIB_INSTALL_EXTRA_CMD='$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
# gcc stupidly only outputs the basename of targets with -MM
DEPEND_CMD='$(CC) -MM $(CFLAGS) $(filter-out %.h,$^) | sed "s,[0-9a-z._-]*: \([a-z0-9]*/\).*,\1&,"'
VHOOKDEPEND_CMD='$(CC) -MM $(VHOOKCFLAGS) $(filter-out %.h,$^) | sed "s,^\([a-z]\),vhook/\1,"'
# find source path
source_path="`dirname \"$0\"`"
enable source_path_used
......@@ -1991,6 +1995,8 @@ echo "LIBNAME=$LIBNAME" >> config.mak
echo "SLIBPREF=$SLIBPREF" >> config.mak
echo "SLIBSUF=$SLIBSUF" >> config.mak
echo "EXESUF=$EXESUF" >> config.mak
echo "DEPEND_CMD=$DEPEND_CMD" >> config.mak
echo "VHOOKDEPEND_CMD=$VHOOKDEPEND_CMD" >> config.mak
if enabled bigendian; then
echo "WORDS_BIGENDIAN=yes" >> config.mak
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment