Makefile 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. # TODO(#87): we need an option to build with system libraries
  2. VODUS_PKGS=freetype2
  3. VODUS_CXXFLAGS=-Wall -fno-exceptions -std=c++17 -msse4 -ggdb `pkg-config --cflags $(VODUS_PKGS)` -I./third_party/ffmpeg-4.3-dist/usr/local/include/ -I./third_party/giflib-5.2.1-dist/usr/local/include/
  4. VODUS_LIBS=`pkg-config --libs $(VODUS_PKGS)` -L./third_party/giflib-5.2.1-dist/usr/local/lib/ -l:libgif.a -L./third_party/ffmpeg-4.3-dist/usr/local/lib/ -lavcodec -lavutil -lswresample -pthread -lm -llzma -lz
  5. EMOTE_DOWNLOADER_PKGS=libcurl
  6. EMOTE_DOWNLOADER_CXXFLAGS=-Wall -fno-exceptions -std=c++17 -ggdb `pkg-config --cflags $(EMOTE_DOWNLOADER_PKGS)`
  7. EMOTE_DOWNLOADER_LIBS=`pkg-config --libs $(EMOTE_DOWNLOADER_PKGS)`
  8. # TODO(#88): render config file
  9. RENDER_ARGS=--font assets/ComicNeue_Bold.otf --output output.mpeg --font-size 46 --fps 30 --width 704 --height 576 --limit 20 sample.txt --bitrate 6000000
  10. .PHONY: all
  11. all: vodus.release vodus.debug emote_downloader Makefile
  12. vodus.release: $(wildcard src/vodus*.cpp) $(wildcard src/core*.cpp)
  13. $(CXX) $(VODUS_CXXFLAGS) -O3 -o vodus.release src/vodus.cpp $(VODUS_LIBS)
  14. vodus.debug: $(wildcard src/vodus*.cpp) $(wildcard src/core*.cpp)
  15. $(CXX) $(VODUS_CXXFLAGS) -O0 -fno-builtin -o vodus.debug src/vodus.cpp $(VODUS_LIBS)
  16. emote_downloader: src/emote_downloader.cpp $(wildcard src/core*.cpp)
  17. $(CXX) $(EMOTE_DOWNLOADER_CXXFLAGS) -o emote_downloader src/emote_downloader.cpp $(EMOTE_DOWNLOADER_LIBS)
  18. .PHONY: render
  19. render: vodus.debug
  20. ./vodus.debug $(RENDER_ARGS)
  21. .PHONY: render.release
  22. render.release: vodus.release
  23. ./vodus.release $(RENDER_ARGS)