makefile 699 B

1234567891011121314151617181920212223242526272829303132
  1. CXX = g++
  2. CXXFLAGS = -g3 -std=c++14 -D__STDC_CONSTANT_MACROS \
  3. -Wall -Wextra -Wextra -pedantic \
  4. -Wdisabled-optimization -Wctor-dtor-privacy -Wmissing-declarations \
  5. -Woverloaded-virtual -Wshadow -Wno-unused -Winline
  6. LDLIBS = -lavformat -lavcodec -lavutil -lswscale -pthread -lEGL -lGLESv2 -lm -lX11
  7. src = $(wildcard *.cpp)
  8. obj = $(src:.cpp=.o)
  9. dep = $(obj:.o=.d)
  10. target = player
  11. all: $(target)
  12. gles-display.o: gles-display.c
  13. gcc -c gles-display.c -g
  14. $(target): $(obj) gles-display.o
  15. $(CXX) -o $@ $^ $(LDLIBS)
  16. -include $(dep)
  17. %.d: %.cpp
  18. @$(CXX) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@
  19. test: $(target)
  20. ./$(target) test.mkv
  21. .PHONY: clean
  22. clean:
  23. $(RM) $(obj) $(target) $(dep)