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.

66 lines
1.2KB

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