-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
80 lines (70 loc) · 1.97 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
INC += pbtools/c_source/
SRC ?= \
pbtools/c_source/pbtools.c \
tests/files/c_source/int32.c \
tests/files/c_source/int64.c \
tests/files/c_source/sint32.c \
tests/files/c_source/sint64.c \
tests/files/c_source/uint32.c \
tests/files/c_source/uint64.c \
tests/files/c_source/fixed32.c \
tests/files/c_source/fixed64.c \
tests/files/c_source/sfixed32.c \
tests/files/c_source/sfixed64.c \
tests/files/c_source/float.c \
tests/files/c_source/double.c \
tests/files/c_source/bool.c \
tests/files/c_source/string.c \
tests/files/c_source/bytes.c \
tests/files/c_source/enum.c \
tests/files/c_source/address_book.c \
tests/files/c_source/tags.c \
tests/files/c_source/oneof.c \
tests/files/c_source/repeated.c \
tests/files/c_source/scalar_value_types.c \
tests/files/c_source/benchmark.c \
tests/files/c_source/message.c \
tests/files/c_source/no_package.c \
tests/files/c_source/ordering.c \
tests/files/c_source/importing.c \
tests/files/c_source/imported.c \
tests/files/c_source/imported1.c \
tests/files/c_source/imported2.c \
tests/files/c_source/imported3.c \
tests/files/c_source/imported_duplicated_package.c \
tests/files/c_source/no_package_importing.c \
tests/files/c_source/no_package_imported.c \
tests/files/c_source/enum_user.c \
tests/files/c_source/enum_provider.c \
tests/files/c_source/field_names.c
CFLAGS += $(INC:%=-I%)
CFLAGS += -O2
CFLAGS += -c
CFLAGS += -Wall
CFLAGS += -Wextra
test:
$(MAKE) test-python
$(MAKE) test-c
test-python:
python3 -m unittest
test-c:
$(MAKE) -C tests
$(MAKE) -C lib
test-c-avr:
avr-gcc $(CFLAGS) $(SRC)
test-c-arm:
arm-none-eabi-gcc $(CFLAGS) $(SRC)
test-c-fuzzer:
$(MAKE) -C tests fuzzer
release-to-pypi:
python setup.py sdist
python setup.py bdist_wheel --universal
twine upload dist/*
generate:
$(MAKE) -C examples generate
$(MAKE) -C benchmark/pbtools generate
$(MAKE) -C tests fuzzer-generate
rust-crate:
cd crate && cargo build
rust:
cd examples/address_book/rust && cargo build && ./target/debug/rust