Browse Source

Generate dependencies when object files are built

Originally committed as revision 19608 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Måns Rullgård 16 years ago
parent
commit
c1c3933a98
2 changed files with 4 additions and 13 deletions
  1. +3
    -12
      common.mak
  2. +1
    -1
      configure

+ 3
- 12
common.mak View File

@@ -21,25 +21,16 @@ ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
CPPFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS)

%.o: %.c
$(DEPEND_CMD)
$(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -c $(CC_O) $<

%.o: %.S
$(DEPEND_CMD)
$(AS) $(CPPFLAGS) $(ASFLAGS) $(LIBOBJFLAGS) -c -o $@ $<

%.ho: %.h
$(CC) $(CPPFLAGS) $(CFLAGS) $(LIBOBJFLAGS) -Wno-unused -c -o $@ -x c $<

%.d: %.c
$(DEPEND_CMD)

%.d: %.S
$(DEPEND_CMD)

%.d: %.cpp
$(DEPEND_CMD)

%.o: %.d

%$(EXESUF): %.c

SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries
@@ -83,4 +74,4 @@ CLEANSUFFIXES = *.o *~ *.ho *.map
DISTCLEANSUFFIXES = *.d *.pc
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp

-include $(DEPS)
-include $(wildcard $(DEPS))

+ 1
- 1
configure View File

@@ -1309,7 +1309,7 @@ target_path='.'

# gcc stupidly only outputs the basename of targets with -MM, but we need the
# full relative path for objects in subdirectories for non-recursive Make.
DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $@'
DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," > $(@:.o=.d)'
DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -MM'

# find source path


Loading…
Cancel
Save