external/efivar
Revision | 032fea5d86d59fe055c0b5f3d383f59c91340078 (tree) |
---|---|
Zeit | 2019-01-10 17:48:30 |
Autor | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Android: inital porting of libefivar
The static library is linked by efibootmgr.
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
@@ -0,0 +1,60 @@ | ||
1 | +# | |
2 | +# Copyright (C) 2019 The Android-x86 Open Source Project | |
3 | +# | |
4 | +# Licensed under the GNU Lesser General Public License Version 2.1. | |
5 | +# You may not use this file except in compliance with the License. | |
6 | +# You may obtain a copy of the License at | |
7 | +# | |
8 | +# https://www.gnu.org/licenses/lgpl-2.1.html | |
9 | +# | |
10 | + | |
11 | +LOCAL_PATH := $(call my-dir) | |
12 | + | |
13 | +include $(CLEAR_VARS) | |
14 | + | |
15 | +LOCAL_MODULE := makeguids | |
16 | +LOCAL_C_INCLUDES := $(LOCAL_PATH)/include | |
17 | +LOCAL_CFLAGS := -DEFIVAR_BUILD_ENVIRONMENT | |
18 | +LOCAL_SRC_FILES := guid.c makeguids.c | |
19 | +LOCAL_LDLIBS := -ldl | |
20 | +include $(BUILD_HOST_EXECUTABLE) | |
21 | + | |
22 | +include $(CLEAR_VARS) | |
23 | + | |
24 | +LOCAL_MODULE := libefivar | |
25 | +LOCAL_MODULE_CLASS := STATIC_LIBRARIES | |
26 | +LIBEFIBOOT_SOURCES := \ | |
27 | + crc32.c \ | |
28 | + creator.c \ | |
29 | + disk.c \ | |
30 | + gpt.c \ | |
31 | + loadopt.c \ | |
32 | + path-helpers.c \ | |
33 | + $(notdir $(wildcard $(LOCAL_PATH)/linux*.c)) | |
34 | + | |
35 | +LIBEFIVAR_SOURCES := \ | |
36 | + dp.c \ | |
37 | + dp-acpi.c \ | |
38 | + dp-hw.c \ | |
39 | + dp-media.c \ | |
40 | + dp-message.c \ | |
41 | + efivarfs.c \ | |
42 | + error.c \ | |
43 | + export.c \ | |
44 | + guid.c \ | |
45 | + guids.S \ | |
46 | + lib.c \ | |
47 | + vars.c | |
48 | + | |
49 | +LOCAL_SRC_FILES := $(LIBEFIBOOT_SOURCES) $(LIBEFIVAR_SOURCES) | |
50 | +LOCAL_CFLAGS := -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -std=gnu11 | |
51 | +LOCAL_C_INCLUDES := $(LOCAL_PATH)/include | |
52 | +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_C_INCLUDES) $(LOCAL_C_INCLUDES)/efivar $(local-generated-sources-dir) | |
53 | +LIBEFIVAR_GUIDS_H := $(local-generated-sources-dir)/efivar/efivar-guids.h | |
54 | +LOCAL_GENERATED_SOURCES := $(LIBEFIVAR_GUIDS_H) $(local-generated-sources-dir)/guid-symbols.c | |
55 | +$(LIBEFIVAR_GUIDS_H): PRIVATE_CUSTOM_TOOL = $^ $(addprefix $(dir $(@D)),guids.bin names.bin guid-symbols.c efivar/efivar-guids.h) | |
56 | +$(LIBEFIVAR_GUIDS_H): $(BUILD_OUT_EXECUTABLES)/makeguids $(LOCAL_PATH)/guids.txt | |
57 | + $(transform-generated-source) | |
58 | +$(lastword $(LOCAL_GENERATED_SOURCES)): $(LIBEFIVAR_GUIDS_H) | |
59 | + | |
60 | +include $(BUILD_STATIC_LIBRARY) |