• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved.
2
3import("//build/ohos.gni")
4
5if (target_cpu == "arm") {
6  config("ffi_config") {
7    visibility = [ ":*" ]
8
9    include_dirs = [
10      ".",
11      "./include",
12      "./src/arm",
13    ]
14
15    cflags = [
16      "-DTARGET=ARM",
17      "-Wno-sign-compare",
18      "-Wno-implicit-function-declaration",
19      "-Wno-extern-initializer",
20    ]
21  }
22
23  ohos_source_set("ffi_source") {
24    sources = [
25      "src/arm/ffi.c",
26      "src/arm/sysv.S",
27      "src/closures.c",
28      "src/java_raw_api.c",
29      "src/prep_cif.c",
30      "src/raw_api.c",
31      "src/types.c",
32    ]
33
34    configs = [ ":ffi_config" ]
35  }
36} else {
37  config("ffi_config") {
38    visibility = [ ":*" ]
39
40    include_dirs = [
41      ".",
42      "./include",
43      "./src/aarch64",
44    ]
45
46    cflags = [
47      "-DTARGET=AARCH64",
48      "-Wno-sign-compare",
49      "-Wno-implicit-function-declaration",
50      "-Wno-extern-initializer",
51    ]
52  }
53
54  ohos_source_set("ffi_source") {
55    sources = [
56      "src/aarch64/ffi.c",
57      "src/aarch64/sysv.S",
58      "src/closures.c",
59      "src/java_raw_api.c",
60      "src/prep_cif.c",
61      "src/raw_api.c",
62      "src/types.c",
63    ]
64
65    configs = [ ":ffi_config" ]
66  }
67}
68
69config("ffi_public_config") {
70  include_dirs = [ "include" ]
71}
72
73ohos_shared_library("ffi") {
74  deps = [ ":ffi_source" ]
75
76  public_configs = [ ":ffi_public_config" ]
77
78  part_name = "multimedia_media_standard"
79  subsystem_name = "multimedia"
80}
81