-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.min
72 lines (46 loc) · 2.86 KB
/
Makefile.min
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
# Makefile -- UNIX-style make for qcbor as a lib and command line test
#
# Copyright (c) 2018-2021, Laurence Lundblade. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# See BSD-3-Clause license in README.md
#
CFLAGS=$(CMD_LINE) -I inc -I test -fno-stack-protector -Os -DQCBOR_CONFIG_DISABLE_EXP_AND_MANTISSA -DQCBOR_DISABLE_FLOAT_HW_USE -DQCBOR_DISABLE_PREFERRED_FLOAT -DLESS_ERR_CHECK -DQCBOR_DISABLE_ENCODE_USAGE_GUARDS -DQCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS -DQCBOR_DISABLE_INDEFINITE_LENGTH_ARRAYS -DQCBOR_DISABLE_UNCOMMON_TAGS -DQCBOR_DISABLE_TAGS -DQCBOR_DISABLE_NON_INTEGER_LABELS
CXXFLAGS=$(CXX_CMD_LINE) -I inc -I test -Os -DQCBOR_CONFIG_DISABLE_EXP_AND_MANTISSA -DQCBOR_DISABLE_FLOAT_HW_USE -DQCBOR_DISABLE_PREFERRED_FLOAT -DLESS_ERR_CHECK -DQCBOR_DISABLE_ENCODE_USAGE_GUARDS -DQCBOR_DISABLE_INDEFINITE_LENGTH_STRINGS -DQCBOR_DISABLE_INDEFINITE_LENGTH_ARRAYS -DQCBOR_DISABLE_UNCOMMON_TAGS
QCBOR_OBJ=src/UsefulBuf.o src/qcbor_encode.o src/qcbor_decode.o src/ieee754.o
TEST_OBJ=test/UsefulBuf_Tests.o test/qcbor_encode_tests.o \
test/qcbor_decode_tests.o test/run_tests.o \
test/float_tests.o test/half_to_double_from_rfc7049.o
.PHONY: all install clean
all: qcbortest qcbormin libqcbor.a
qcbortest: libqcbor.a $(TEST_OBJ) cmd_line_main.o
$(CC) -o $@ $^ libqcbor.a
encode_max: libqcbor.a qdv/encode_max.o
$(CC) -dead_strip -o $@ $^
encode_min: libqcbor.a qdv/encode_min.o
$(CC) -dead_strip -o $@ $^
decode_min: libqcbor.a qdv/decode_min.o
$(CC) -dead_strip -o $@ $^
qcbormin: libqcbor.a qdv/min_use_main.o
$(CC) -dead_strip -o $@ $^ libqcbor.a
qcbormincpp: libqcbor.a qdv/min_use_main_cpp.o
$(CXX) -dead_strip -o $@ $^ libqcbor.a
libqcbor.a: $(QCBOR_OBJ)
ar -r $@ $^
PUBLIC_INTERFACE=inc/qcbor/UsefulBuf.h inc/qcbor/qcbor_private.h inc/qcbor/qcbor_common.h inc/qcbor/qcbor_encode.h inc/qcbor/qcbor_decode.h
src/UsefulBuf.o: inc/qcbor/UsefulBuf.h
src/qcbor_decode.o: inc/qcbor/UsefulBuf.h inc/qcbor/qcbor_private.h inc/qcbor/qcbor_common.h inc/qcbor/qcbor_encode.h src/ieee754.h
src/qcbor_encode.o: inc/qcbor/UsefulBuf.h inc/qcbor/qcbor_private.h inc/qcbor/qcbor_common.h inc/qcbor/qcbor_decode.h src/ieee754.h
src/iee754.o: src/ieee754.h
test/run_tests.o: test/UsefulBuf_Tests.h test/float_tests.h test/run_tests.h test/qcbor_encode_tests.h\
test/qcbor_decode_tests.h
test/UsefulBuf_Tests.o: test/UsefulBuf_Tests.h inc/qcbor/UsefulBuf.h
test/qcbor_encode_tests.o: test/qcbor_encode_tests.h $(PUBLIC_INTERFACE)
test/qcbor_decode_tests.o: test/qcbor_decode_tests.h $(PUBLIC_INTERFACE)
test/float_tests.o: test/float_tests.h test/half_to_double_from_rfc7049.h $(PUBLIC_INTERFACE)
test/half_to_double_from_rfc7049.o: test/half_to_double_from_rfc7049.h
cmd_line_main.o: test/run_tests.h $(PUBLIC_INTERFACE)
min_use_main.o: $(PUBLIC_INTERFACE)
clean:
rm -f $(QCBOR_OBJ) $(TEST_OBJ) libqcbor.a qdv/min_use_main.o qdv/min_use_main_cpp.o cmd_line_main.o