You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
1.5KB

  1. # Main ffmpeg Makefile
  2. # (c) 2000, 2001, 2002 Gerard Lantau
  3. #
  4. include config.mak
  5. VPATH=$(SRC_PATH)
  6. CFLAGS= $(OPTFLAGS) -Wall -g -I. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libav
  7. LDFLAGS= -g
  8. ifeq ($(TARGET_GPROF),yes)
  9. CFLAGS+=-p
  10. LDFLAGS+=-p
  11. endif
  12. ifeq ($(CONFIG_WIN32),yes)
  13. EXE=.exe
  14. PROG=ffmpeg$(EXE)
  15. else
  16. EXT=
  17. PROG=ffmpeg ffplay ffserver
  18. endif
  19. ifeq ($(BUILD_SHARED),yes)
  20. FFMPEG_LIB=-Llibavcodec -lffmpeg
  21. DEP_FFMPEG_LIB=
  22. else
  23. FFMPEG_LIB=libavcodec/libavcodec.a
  24. DEP_FFMPEG_LIB=libavcodec/libavcodec.a
  25. ifeq ($(CONFIG_MP3LAME),yes)
  26. EXTRALIBS+=-lmp3lame
  27. endif
  28. endif
  29. OBJS = ffmpeg.o ffserver.o
  30. SRCS = $(OBJS:.o=.c) $(ASM_OBJS:.o=.s)
  31. all: lib $(PROG)
  32. lib:
  33. $(MAKE) -C libavcodec all
  34. $(MAKE) -C libav all
  35. ffmpeg$(EXE): ffmpeg.o libav/libav.a $(DEP_FFMPEG_LIB)
  36. $(CC) $(LDFLAGS) -o $@ $^ $(FFMPEG_LIB) $(EXTRALIBS)
  37. ffserver$(EXE): ffserver.o libav/libav.a $(DEP_FFMPEG_LIB)
  38. $(CC) $(LDFLAGS) -o $@ $^ $(FFMPEG_LIB) $(EXTRALIBS)
  39. ffplay: ffmpeg$(EXE)
  40. ln -sf $< $@
  41. %.o: %.c
  42. $(CC) $(CFLAGS) -c -o $@ $<
  43. install: all
  44. $(MAKE) -C libavcodec install
  45. install -s -m 755 $(PROG) $(prefix)/bin
  46. ln -sf ffmpeg $(prefix)/bin/ffplay
  47. dep: depend
  48. depend:
  49. $(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
  50. clean:
  51. $(MAKE) -C libavcodec clean
  52. $(MAKE) -C libav clean
  53. $(MAKE) -C tests clean
  54. rm -f *.o *~ .depend gmon.out TAGS $(PROG)
  55. distclean: clean
  56. $(MAKE) -C libavcodec distclean
  57. rm -f config.mak config.h
  58. TAGS:
  59. etags *.[ch] libav/*.[ch] libavcodec/*.[ch]
  60. # regression tests
  61. test mpeg4 mpeg: ffmpeg$(EXE)
  62. make -C tests $@
  63. ifneq ($(wildcard .depend),)
  64. include .depend
  65. endif