forked from facebookexperimental/ExtendedAndroidTools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (39 loc) · 1.13 KB
/
Makefile
File metadata and controls
52 lines (39 loc) · 1.13 KB
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
# Copyright (c) Meta Platforms, Inc. and affiliates.
# number of threads to use. This value is passed to recursive make calls as -j
# option.
THREADS = 4
# arch: arm64 or x86_64
NDK_ARCH = arm64
# Release or Debug
BUILD_TYPE = Release
BUILD_DIR = build
ANDROID_BUILD_DIR = $(BUILD_DIR)/android/$(NDK_ARCH)
HOST_BUILD_DIR = $(BUILD_DIR)/host
DOWNLOADS_DIR = $(BUILD_DIR)/downloads
OUT_DIR = out
ANDROID_OUT_DIR = $(OUT_DIR)/android/$(NDK_ARCH)
ANDROID_SYSROOTS_OUT_DIR = $(OUT_DIR)/sysroots/$(NDK_ARCH)
HOST_OUT_DIR = $(OUT_DIR)/host
export PATH:=$(abspath $(HOST_OUT_DIR)/bin):$(PATH)
all:
@echo "Choose a project to build"
include toolchain/toolchain.mk
$(ANDROID_BUILD_DIR) $(HOST_BUILD_DIR) $(DOWNLOADS_DIR) $(ANDROID_SYSROOTS_OUT_DIR):
mkdir -p $@
$(ANDROID_OUT_DIR) $(HOST_OUT_DIR):
mkdir -p $@
mkdir $@/bin
mkdir $@/include
mkdir $@/lib
mkdir $@/lib/pkgconfig
mkdir $@/share
mkdir $@/licenses
clean:
-rm -fr $(BUILD_DIR)
-rm -fr $(OUT_DIR)
.PHONY: clean fetch-sources remove-sources install uninstall
.DELETE_ON_ERROR:
include projects/project.mk
include projects/licenses.mk
include projects/*/build.mk
include sysroot/*.mk