Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # https://github.com/arvidn/libtorrent/pull/4123
  2. # using submodule b/c it has to be the master branch
  3. CFLAGS=-I"./include/" -I"./deps/libtorrent/include/" -I"./deps/"
  4. # -I"./deps/libtorrent/include/libtorrent/"
  5. LDFLAGS= -Dwebtorrent=ON -DTORRENT_USE_OPENSSL -lpthread -lcurl -lcurlpp
  6. # -lcurses -lboost_system -ltorrent-rasterbar
  7. # building libtorrent with webtorrent support
  8. # git submodule init --recursive
  9. # cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 -Dwebtorrent=ON -G Ninja ..
  10. LIBTORRENT= ./deps/libtorrent/build/libtorrent-rasterbar.so.2.0.5
  11. # -Wl,-soname
  12. LD_LIBRARY_PATH=./deps/libtorrent/build/
  13. all: | main
  14. # something to avoid prepending LD_LIBRARY_PATH=./deps/... every time.
  15. # better if compilted to just search in relative path to begin with
  16. patchelf --remove-needed libtorrent-rasterbar.so.2.0 cppia
  17. patchelf --add-needed ./deps/libtorrent/build/libtorrent-rasterbar.so.2.0 cppia
  18. main:
  19. g++ main.cpp $(CFLAGS) $(LDFLAGS) $(LIBTORRENT) -std=c++17 -o cppia -g
  20. ncurses:
  21. g++ demo_window.cpp -lcurses -o window
  22. # OPENAPI_GENERATOR=/home/user/Programs/openapi-generator-cli.jar
  23. # PEERTUBE_API=./deps/peertube/
  24. # openapi:
  25. # java -jar $(OPENAPI_GENERATOR) generate -i peertube.yaml -g c -o $(PEERTUBE_API)
  26. # video:
  27. # g++ ./deps/peertube/model/video.c -std=c++17
  28. .PHONY: clean
  29. clean:
  30. rm cppia