• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Makefile for Pigweed's tokenizer module
3#
4
5# Environment Checks
6ifeq ($(ANDROID_BUILD_TOP),)
7$(error "You should supply an ANDROID_BUILD_TOP environment variable \
8         containing a path to the Android source tree. This is typically \
9         provided by initializing the Android build environment.")
10endif
11
12# Location of various Pigweed modules
13PIGWEED_DIR = $(ANDROID_BUILD_TOP)/external/pigweed
14PIGWEED_TOKENIZER_DIR=$(ANDROID_BUILD_TOP)/external/pigweed
15PIGWEED_SCRIPTS_DIR=$(PIGWEED_TOKENIZER_DIR)/pw_tokenizer/py/pw_tokenizer
16
17# Variables used by build_template.mk to generate the token mapping
18TOKEN_MAP_GEN_CMD     = $(PYTHON) $(PIGWEED_SCRIPTS_DIR)/database.py create \
19                          --force --type binary --database
20TOKEN_MAP_CSV_GEN_CMD = $(PYTHON) $(PIGWEED_SCRIPTS_DIR)/database.py create \
21                          --force --type csv --database
22
23# Pigweed source files
24COMMON_SRCS += $(PIGWEED_DIR)/pw_tokenizer/encode_args.cc
25COMMON_SRCS += $(PIGWEED_DIR)/pw_tokenizer/tokenize.cc
26COMMON_SRCS += $(PIGWEED_DIR)/pw_varint/varint.cc
27COMMON_SRCS += $(PIGWEED_DIR)/pw_varint/varint_c.c
28
29# Pigweed include paths
30COMMON_CFLAGS += -I$(PIGWEED_DIR)/pw_containers/public
31COMMON_CFLAGS += -I$(PIGWEED_DIR)/pw_log_tokenized/public
32COMMON_CFLAGS += -I$(PIGWEED_DIR)/pw_log/public
33COMMON_CFLAGS += -I$(PIGWEED_DIR)/pw_polyfill/public
34COMMON_CFLAGS += -I$(PIGWEED_DIR)/pw_polyfill/standard_library_public
35COMMON_CFLAGS += -I$(PIGWEED_DIR)/pw_preprocessor/public
36COMMON_CFLAGS += -I$(PIGWEED_DIR)/pw_span/public
37COMMON_CFLAGS += -I$(PIGWEED_DIR)/pw_span/public_overrides
38COMMON_CFLAGS += -I$(PIGWEED_DIR)/pw_tokenizer/public
39COMMON_CFLAGS += -I$(PIGWEED_DIR)/pw_varint/public
40COMMON_CFLAGS += -I$(PIGWEED_DIR)/third_party/fuchsia/repo/sdk/lib/stdcompat/include