constants.mk 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. export top_dir ::= $(shell pwd)
  2. export build_dir ::= $(shell pwd)/build/
  3. # allow gcc trampolines, all obj as PIC?
  4. export CFLAGS ::= -MMD -Wall -Wextra -Werror -Wshadow -std=c11 -fPIC
  5. ifdef debug
  6. CFLAGS += -save-temps=obj -g
  7. endif
  8. # scrapper bot build dirs
  9. src_dir ::= $(shell pwd)/src/
  10. export build_bot_dir ::= $(build_dir)/bot/
  11. export bot_include ::= $(src_dir)
  12. export bot_lib_path ::= $(build_bot_dir)
  13. export bot_shared_lib ::= $(bot_lib_path)/libscrapper.so
  14. # test
  15. export build_test_dir := $(build_dir)test/
  16. dep_src_dir := $(shell pwd)/deps/
  17. data_dir := $(shell pwd)/data/
  18. test_dir := $(shell pwd)/test/
  19. # telebot dep
  20. export telebot_dep_build_dir := $(build_dir)/deps/telebot/
  21. export telebot_lib := $(telebot_dep_build_dir)/libtelebot_static.a
  22. export telebot_include := $(dep_src_dir)/telebot/include
  23. # zlog dep
  24. export zlog_dep_build_dir := $(build_dir)/deps/zlog
  25. export zlog_lib := $(zlog_dep_build_dir)/lib/libzlog.a
  26. export zlog_include := $(zlog_dep_build_dir)/include
  27. # cmoka dep
  28. export cmoka_dep_build_dir := $(build_dir)/deps/cmoka
  29. export cmoka_lib_path := $(cmoka_dep_build_dir)/src/
  30. export cmoka_include := $(dep_src_dir)/cmoka/include