-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.mk
58 lines (53 loc) · 1.08 KB
/
build.mk
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
LOCAL_DIR := $(call current-dir)
DITTO_CFLAGS := \
-I$(LOCAL_DIR)/include \
-Os \
-g3 \
-Wall \
-Werror \
-Wextra \
-ffunction-sections \
-fdata-sections
DITTO_CXXFLAGS := \
-std=gnu++20 \
-fno-exceptions \
-fno-rtti
DITTO_SRC := \
$(LOCAL_DIR)/src/assert.cpp \
$(LOCAL_DIR)/src/hash.cpp
include $(CLEAR_VARS)
LOCAL_NAME := ditto
TARGET_CFLAGS := \
-mcpu=cortex-m3 \
-mfloat-abi=soft \
-mthumb
LOCAL_CFLAGS := \
$(TARGET_CFLAGS) \
$(DITTO_CFLAGS)
LOCAL_CXXFLAGS := \
$(LOCAL_CFLAGS) \
$(DITTO_CXXFLAGS)
LOCAL_SRC := \
$(DITTO_SRC)
LOCAL_ARM_ARCHITECTURE := v7-m
LOCAL_ARM_FPU := nofp
LOCAL_COMPILER := arm_clang
LOCAL_ARFLAGS := -rcs
LOCAL_EXPORTED_DIRS := \
$(LOCAL_DIR)/include
include $(BUILD_STATIC_LIB)
include $(CLEAR_VARS)
CC := clang
CXX := clang++
LOCAL_NAME := ditto_host
LOCAL_CFLAGS := \
$(DITTO_CFLAGS)
LOCAL_CXXFLAGS := \
$(LOCAL_CFLAGS) \
$(DITTO_CXXFLAGS)
LOCAL_SRC := \
$(DITTO_SRC)
LOCAL_ARFLAGS := -rcs
LOCAL_EXPORTED_DIRS := \
$(LOCAL_DIR)/include
include $(BUILD_STATIC_LIB)