-
Notifications
You must be signed in to change notification settings - Fork 16
/
Android.mk
executable file
·94 lines (75 loc) · 2.24 KB
/
Android.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
EFIWRAPPER_LOCAL_PATH := $(call my-dir)
EFIWRAPPER_CFLAGS := -Wall -Wextra -Werror
ifeq ($(TARGET_UEFI_ARCH),x86_64)
EFIWRAPPER_CFLAGS += -DBUILD_X64
EFIWRAPPER_CFLAGS += -D__STDC_VERSION__=199901L
endif
ifeq ($(TARGET_BUILD_VARIANT),user)
EFIWRAPPER_CFLAGS += -DUSER -DUSERDEBUG
endif
ifeq ($(TARGET_BOARD_PLATFORM),icelakeu)
EFIWRAPPER_CFLAGS += -DPLATFORM_ICELAKE
endif
ifeq ($(TARGET_BOARD_PLATFORM),tigerlake)
EFIWRAPPER_CFLAGS += -DPLATFORM_TIGERLAKE
endif
ifeq ($(TARGET_BOARD_PLATFORM),kabylake)
EFIWRAPPER_CFLAGS += -DPLATFORM_KABYLAKE
endif
ifeq ($(TARGET_BOARD_PLATFORM),broxton)
EFIWRAPPER_CFLAGS += -DPLATFORM_BROXTON
endif
ifeq ($(EFIWRAPPER_USE_EC_UART),true)
EFIWRAPPER_CFLAGS += -DEFIWRAPPER_USE_EC_UART
endif
ifeq ($(TARGET_BUILD_VARIANT),userdebug)
EFIWRAPPER_CFLAGS += -DUSERDEBUG
endif
ifeq ($(CAPSULE_SOURCE),abl)
EFIWRAPPER_CFLAGS += -DCAPSULE4ABL
endif
ifeq ($(CAPSULE_SOURCE),sbl)
EFIWRAPPER_CFLAGS += -DCAPSULE4SBL
endif
EFIWRAPPER_CFLAGS += -DPRODUCT_NAME=\"$(TARGET_PRODUCT)\"
ifeq ($(PRODUCT_MANUFACTURER),)
EFIWRAPPER_CFLAGS += -DPRODUCT_MANUFACTURER=\"unknown\"
else
EFIWRAPPER_CFLAGS += -DPRODUCT_MANUFACTURER=\"$(PRODUCT_MANUFACTURER)\"
endif
ifeq ($(KERNELFLINGER_DISABLE_DEBUG_PRINT),true)
EFIWRAPPER_CFLAGS += -DDISABLE_DEBUG_PRINT
endif
ifeq ($(IOC_USE_SLCAN),true)
EFIWRAPPER_CFLAGS += -DIOC_USE_SLCAN
else ifeq ($(IOC_USE_CBC),true)
EFIWRAPPER_CFLAGS += -DIOC_USE_CBC
endif
EFIWRAPPER_HOST_CFLAGS := \
$(EFIWRAPPER_CFLAGS) \
-fshort-wchar \
-DEFI_FUNCTION_WRAPPER \
-DGNU_EFI_USE_MS_ABI \
-DHOST
ifeq ($(TARGET_IAFW_ARCH),x86_64)
EFIWRAPPER_HOST_ARCH += x86_64
else
EFIWRAPPER_HOST_ARCH += x86
endif
EFIWRAPPER_HOST_C_INCLUDES := \
external/gnu-efi/gnu-efi-3.0/inc \
external/gnu-efi/gnu-efi-3.0/inc/$(TARGET_EFI_ARCH_NAME) \
external/gnu-efi/gnu-efi-3.0/inc/protocol
include $(call all-subdir-makefiles)
include $(CLEAR_VARS)
LOCAL_PATH := $(EFIWRAPPER_LOCAL_PATH)
LOCAL_MODULE := efiwrapper-$(TARGET_BUILD_VARIANT)
LOCAL_STATIC_LIBRARIES := \
libefiwrapper-$(TARGET_BUILD_VARIANT) \
libgnuefi \
libefi \
libefiwrapper_drivers-$(TARGET_BUILD_VARIANT)
LOCAL_CFLAGS := $(EFIWRAPPER_CFLAGS)
LOCAL_SRC_FILES := \
main.c
include $(BUILD_IAFW_STATIC_LIBRARY)