Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e38d3a60 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Convert libnativebridge[23]?-dummy to soong.

Bug: 37512442
Test: mmm system/core/libnativebridge/tests
Change-Id: Ib1ca9ef830f58041095226c2ba18d1302c7833b4
parent 823816ee
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -22,3 +22,5 @@ cc_library {
        },
        },
    },
    },
}
}

subdirs = ["tests"]
 No newline at end of file
+53 −0
Original line number Original line Diff line number Diff line
//
// Copyright (C) 2017 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

cc_defaults {
    name: "libnativebridge-dummy-defaults",

    host_supported: true,
    cflags: [
        "-Wall",
        "-Wextra",
        "-Werror",
    ],
    cppflags: ["-fvisibility=protected"],
    target: {
        android: {
            shared_libs: ["libdl"],
        },
        host: {
            host_ldlibs: ["-ldl"],
        },
    },
}

cc_library_shared {
    name: "libnativebridge-dummy",
    srcs: ["DummyNativeBridge.cpp"],
    defaults: ["libnativebridge-dummy-defaults"],
}

cc_library_shared {
    name: "libnativebridge2-dummy",
    srcs: ["DummyNativeBridge2.cpp"],
    defaults: ["libnativebridge-dummy-defaults"],
}

cc_library_shared {
    name: "libnativebridge3-dummy",
    srcs: ["DummyNativeBridge3.cpp"],
    defaults: ["libnativebridge-dummy-defaults"],
}
+0 −2
Original line number Original line Diff line number Diff line
# Build the unit tests.
# Build the unit tests.
LOCAL_PATH := $(call my-dir)
LOCAL_PATH := $(call my-dir)


include $(LOCAL_PATH)/Android.nativebridge-dummy.mk

include $(CLEAR_VARS)
include $(CLEAR_VARS)


# Build the unit tests.
# Build the unit tests.
+0 −108
Original line number Original line Diff line number Diff line
LOCAL_PATH:= $(call my-dir)

NATIVE_BRIDGE_COMMON_SRC_FILES := \
  DummyNativeBridge.cpp

# Shared library for target
# ========================================================
include $(CLEAR_VARS)

LOCAL_MODULE:= libnativebridge-dummy

LOCAL_SRC_FILES:= $(NATIVE_BRIDGE_COMMON_SRC_FILES)
LOCAL_CLANG := true
LOCAL_CFLAGS += -Werror -Wall
LOCAL_CPPFLAGS := -fvisibility=protected
LOCAL_SHARED_LIBRARIES := libdl
LOCAL_MULTILIB := both

include $(BUILD_SHARED_LIBRARY)

# Shared library for host
# ========================================================
include $(CLEAR_VARS)

LOCAL_MODULE:= libnativebridge-dummy

LOCAL_SRC_FILES:= $(NATIVE_BRIDGE_COMMON_SRC_FILES)
LOCAL_CLANG := true
LOCAL_CFLAGS += -Werror -Wall
LOCAL_CPPFLAGS := -fvisibility=protected
LOCAL_LDFLAGS := -ldl
LOCAL_MULTILIB := both

include $(BUILD_HOST_SHARED_LIBRARY)


# v2.

NATIVE_BRIDGE2_COMMON_SRC_FILES := \
  DummyNativeBridge2.cpp

# Shared library for target
# ========================================================
include $(CLEAR_VARS)

LOCAL_MODULE:= libnativebridge2-dummy

LOCAL_SRC_FILES:= $(NATIVE_BRIDGE2_COMMON_SRC_FILES)
LOCAL_CLANG := true
LOCAL_CFLAGS += -Werror -Wall
LOCAL_CPPFLAGS := -fvisibility=protected
LOCAL_SHARED_LIBRARIES := libdl
LOCAL_MULTILIB := both

include $(BUILD_SHARED_LIBRARY)

# Shared library for host
# ========================================================
include $(CLEAR_VARS)

LOCAL_MODULE:= libnativebridge2-dummy

LOCAL_SRC_FILES:= $(NATIVE_BRIDGE2_COMMON_SRC_FILES)
LOCAL_CLANG := true
LOCAL_CFLAGS += -Werror -Wall
LOCAL_CPPFLAGS := -fvisibility=protected
LOCAL_LDFLAGS := -ldl
LOCAL_MULTILIB := both

include $(BUILD_HOST_SHARED_LIBRARY)


# v3.

NATIVE_BRIDGE3_COMMON_SRC_FILES := \
  DummyNativeBridge3.cpp

# Shared library for target
# ========================================================
include $(CLEAR_VARS)

LOCAL_MODULE:= libnativebridge3-dummy

LOCAL_SRC_FILES:= $(NATIVE_BRIDGE3_COMMON_SRC_FILES)
LOCAL_CLANG := true
LOCAL_CFLAGS += -Werror -Wall
LOCAL_CPPFLAGS := -std=gnu++11 -fvisibility=protected
LOCAL_LDFLAGS := -ldl
LOCAL_MULTILIB := both

include $(BUILD_SHARED_LIBRARY)

# Shared library for host
# ========================================================
include $(CLEAR_VARS)

LOCAL_MODULE:= libnativebridge3-dummy

LOCAL_SRC_FILES:= $(NATIVE_BRIDGE3_COMMON_SRC_FILES)
LOCAL_CLANG := true
LOCAL_CFLAGS += -Werror -Wall
LOCAL_CPPFLAGS := -std=gnu++11 -fvisibility=protected
LOCAL_LDFLAGS := -ldl
LOCAL_MULTILIB := both

include $(BUILD_HOST_SHARED_LIBRARY)