Commit 4b8b2edb authored by Fabrice Bellard's avatar Fabrice Bellard

dependency handling is consistant with libavcodec

Originally committed as revision 1492 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 811e6d73
...@@ -54,17 +54,14 @@ endif ...@@ -54,17 +54,14 @@ endif
OBJS = ffmpeg.o ffserver.o OBJS = ffmpeg.o ffserver.o
SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s) SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
DEPS = $(OBJS:.o=.d)
all: lib $(PROG) $(VHOOK) all: lib $(PROG) $(VHOOK)
-include $(DEPS)
lib: lib:
$(MAKE) -C libavcodec all $(MAKE) -C libavcodec all
$(MAKE) -C libavformat all $(MAKE) -C libavformat all
ffmpeg_g$(EXE): ffmpeg.o $(DEP_LIBS) ffmpeg_g$(EXE): .depend ffmpeg.o $(DEP_LIBS)
$(CC) $(LDFLAGS) -o $@ ffmpeg.o -L./libavcodec -L./libavformat \ $(CC) $(LDFLAGS) -o $@ ffmpeg.o -L./libavcodec -L./libavformat \
-lavformat -lavcodec $(EXTRALIBS) -lavformat -lavcodec $(EXTRALIBS)
...@@ -83,10 +80,6 @@ ffplay: ffmpeg$(EXE) ...@@ -83,10 +80,6 @@ ffplay: ffmpeg$(EXE)
%.o: %.c %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $< $(CC) $(CFLAGS) -c -o $@ $<
%.d: %.c
@echo $@ \\ > $@
$(CC) $(CFLAGS) -MM $< >> $@
videohook: videohook:
$(MAKE) -C vhook all $(MAKE) -C vhook all
...@@ -108,8 +101,10 @@ installlib: ...@@ -108,8 +101,10 @@ installlib:
dep: depend dep: depend
depend: depend: .depend
$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
.depend: $(SRCS)
$(CC) -MM $(CFLAGS) $^ 1>.depend
clean: $(CLEANVHOOK) clean: $(CLEANVHOOK)
$(MAKE) -C libavcodec clean $(MAKE) -C libavcodec clean
......
...@@ -30,7 +30,7 @@ imlib2.so: imlib2.o ...@@ -30,7 +30,7 @@ imlib2.so: imlib2.o
$(CC) -g -o $@ $(SHFLAGS) $< $(CC) -g -o $@ $(SHFLAGS) $<
clean: clean:
rm -f *.o *.d *.so *~ rm -f *.o *.d .depend *.so *~
ifneq ($(wildcard .depend),) ifneq ($(wildcard .depend),)
include .depend include .depend
......
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