Skip to content

Commit

Permalink
Change hdcpd make mehtod
Browse files Browse the repository at this point in the history
Change to Android.bp for hdcp build

Tracked-On: OAM-
Signed-off-by: Jia, Lin A <[email protected]>
  • Loading branch information
ljia5 committed Aug 19, 2024
1 parent 8ef2451 commit 66198ff
Show file tree
Hide file tree
Showing 12 changed files with 372 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// Copyright (c) 2009-2018, Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

// Recursively call sub-folder Android.mk
File renamed without changes.
77 changes: 77 additions & 0 deletions common/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
//
// Copyright (c) 2009-2018, Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

cc_library_static {
name: "libhdcpcommon",

cppflags: [
"-DANDROID",
"-DANDROID_VERSION=800",
"-DLOG_TAG=\"HDCPCOMMON\"",
] + ["-DLOG_CONSOLE"] + ["-Wno-error"], // LOG_CONSOLE will print ALOGI, ALOGE, ALOGW in Android. Enable on debug build
// ANDROIDMK TRANSLATION ERROR: unsupported conditional
// ifeq ($(TARGET_BUILD_VARIANT),userdebug)

// ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional
// endif

// For ALOGV and function enter/exit log, set ENABLE_DEBUG=1 during compilation e.g. mm ENABLE_DEBUG=1 -j32
// ANDROIDMK TRANSLATION ERROR: unsupported conditional
// ifeq ($(ENABLE_DEBUG),1)

// ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_CPPFLAG
// LOCAL_CPPFLAG += -DHDCP_USE_VERBOSE_LOGGING -DHDCP_USE_FUNCTION_LOGGING -DHDCP_USE_LINK_FUNCTION_LOGGING

// ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional
// endif

// ANDROIDMK TRANSLATION ERROR: unsupported conditional
// ifeq ($(ENABLE_DEBUG),1)

// ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_CPPFLAG
// LOCAL_CPPFLAG += -DLOG_CONSOLE -DHDCP_USE_VERBOSE_LOGGING -DHDCP_USE_FUNCTION_LOGGING -DHDCP_USE_LINK_FUNCTION_LOGGING

// ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional
// endif

//WA

//local_include_dirs: [
include_dirs: [
"hardware/intel/external/media/hdcp/sdk",
"hardware/intel/external/media/hdcp/common",
],

shared_libs: [
"libutils",
"liblog",
],

srcs: [
"clientsock.cpp",
"gensock.cpp",
"servsock.cpp",
"socketdata.cpp",
],

proprietary: true,

}
File renamed without changes.
89 changes: 89 additions & 0 deletions daemon/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
//
// Copyright (c) 2009-2018, Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

cc_binary {
name: "hdcpd",

cppflags: [
"-DANDROID",
"-DUSES_IA_HWCOMPOSER",
"-DANDROID_VERSION=800",
"-DLOG_TAG=\"HDCPD\"",
] + ["-DLOG_CONSOLE"] + [ // LOG_CONSOLE will print ALOGI, ALOGE, ALOGW in Android. Enable on debug build
// ANDROIDMK TRANSLATION ERROR: unsupported conditional
// ifeq ($(TARGET_BUILD_VARIANT),userdebug)

// ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional
// endif

// For ALOGV and function enter/exit log, set ENABLE_DEBUG=1 during compilation e.g. mm ENABLE_DEBUG=1 -j32
// ANDROIDMK TRANSLATION ERROR: unsupported conditional
// ifeq ($(ENABLE_DEBUG),1)

// ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_CPPFLAG
// LOCAL_CPPFLAG += -DHDCP_USE_VERBOSE_LOGGING -DHDCP_USE_FUNCTION_LOGGING -DHDCP_USE_LINK_FUNCTION_LOGGING

// ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional
// endif

// ANDROIDMK TRANSLATION ERROR: unsupported conditional
// ifeq ($(ENABLE_DEBUG),1)

// ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_CPPFLAG
// LOCAL_CPPFLAG += -DLOG_CONSOLE -DHDCP_USE_VERBOSE_LOGGING -DHDCP_USE_FUNCTION_LOGGING -DHDCP_USE_LINK_FUNCTION_LOGGING

// ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional
// endif

//WA
"-Wno-unused-parameter",
"-Wno-error",
],

shared_libs: [
"libutils",
"libbinder",
"liblog",
"libcrypto",
"libdrm",
"libssl",
"libhwcservice",
],

static_libs: ["libhdcpcommon"],

srcs: [
"main.cpp",
"daemon.cpp",
"port.cpp",
"srm.cpp",
"portmanager.cpp",
"portmanager_android.cpp",
],

include_dirs: ["."] + [
"hardware/intel/external/media/hdcp/sdk",
"hardware/intel/external/media/hdcp/common",
],

proprietary: true,

}
File renamed without changes.
84 changes: 84 additions & 0 deletions sdk/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
//
// Copyright (c) 2009-2018, Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

cc_library_shared {
name: "libhdcpsdk",

// For ALOGV and enter/exit log, set ENABLE_DEBUG=1 during compilation e.g. mm ENABLE_DEBUG=1 -j32
cppflags: [
"-DANDROID",
"-DANDROID_VERSION=800",
"-DLOG_TAG=\"HDCPSDK\"",
] + ["-DLOG_CONSOLE"] + [ // LOG_CONSOLE will print ALOGI, ALOGE, ALOGW in Android. Enable on debug build
// ANDROIDMK TRANSLATION ERROR: unsupported conditional
// ifeq ($(TARGET_BUILD_VARIANT),userdebug)

// ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional
// endif

// For ALOGV and function enter/exit log, set ENABLE_DEBUG=1 during compilation e.g. mm ENABLE_DEBUG=1 -j32
// ANDROIDMK TRANSLATION ERROR: unsupported conditional
// ifeq ($(ENABLE_DEBUG),1)
"-DHDCP_USE_VERBOSE_LOGGING",

// ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional
"-DHDCP_USE_FUNCTION_LOGGING",
// endif
"-DHDCP_USE_LINK_FUNCTION_LOGGING",

// ANDROIDMK TRANSLATION ERROR: unsupported conditional
] + [ // ifeq ($(ENABLE_DEBUG),1)

// ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_CPPFLAG
// LOCAL_CPPFLAG += -DLOG_CONSOLE -DHDCP_USE_VERBOSE_LOGGING -DHDCP_USE_FUNCTION_LOGGING -DHDCP_USE_LINK_FUNCTION_LOGGING

// ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional
// endif

//WA
"-Wno-unused-parameter",
"-Wno-error",
],

include_dirs: [
"hardware/intel/external/media/hdcp/sdk",
"hardware/intel/external/media/hdcp/daemon",
"hardware/intel/external/media/hdcp/common",
],

srcs: [
"hdcpapi.cpp",
"sessionmanager.cpp",
"session.cpp",
],

shared_libs: [
"libutils",
"liblog",
],

static_libs: ["libhdcpcommon"],

export_include_dirs: [""],

proprietary: true,

}
File renamed without changes.
22 changes: 22 additions & 0 deletions test/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// Copyright (c) 2009-2018, Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

// Recursively call sub-folder Android.mk
File renamed without changes.
78 changes: 78 additions & 0 deletions test/hdcpTestUtility/Android.bp.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
//
// Copyright (c) 2009-2018, Intel Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

cc_binary {
name: "hdcpTestUtility",

// For ALOGV and enter/exit log, set ENABLE_DEBUG=1 during compilation e.g. mm ENABLE_DEBUG=1 -j32
cppflags: [
"-DANDROID",
"-DANDROID_VERSION=800",
"-DLOG_TAG=\\\"HDCPTESTUTILITY\\\"",
] + ["-DLOG_CONSOLE"] + [ // LOG_CONSOLE will print ALOGI, ALOGE, ALOGW in Android. Enable on debug build
// ANDROIDMK TRANSLATION ERROR: unsupported conditional
// ifeq ($(TARGET_BUILD_VARIANT),userdebug)

// ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional
// endif

// For ALOGV and function enter/exit log, set ENABLE_DEBUG=1 during compilation e.g. mm ENABLE_DEBUG=1 -j32
// ANDROIDMK TRANSLATION ERROR: unsupported conditional
// ifeq ($(ENABLE_DEBUG),1)
"-DHDCP_USE_VERBOSE_LOGGING",

// ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional
"-DHDCP_USE_FUNCTION_LOGGING",
// endif
"-DHDCP_USE_LINK_FUNCTION_LOGGING",

// ANDROIDMK TRANSLATION ERROR: unsupported conditional
] + [ // ifeq ($(ENABLE_DEBUG),1)

// ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_CPPFLAG
// LOCAL_CPPFLAG += -DLOG_CONSOLE -DHDCP_USE_VERBOSE_LOGGING -DHDCP_USE_FUNCTION_LOGGING -DHDCP_USE_LINK_FUNCTION_LOGGING

// ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional
// endif

//WA
"-Wno-unused-parameter",
"-Wno-error",
],

local_include_dirs: [
"../../sdk",
"../../test/hdcpTestUtility",
],

srcs: ["hdcpTestUtility.cpp"],

shared_libs: [
"libutils",
"liblog",
"libhdcpsdk",
],

export_include_dirs: [""],

proprietary: true,

}
Binary file added test/hdcpTestUtility/androidmk
Binary file not shown.

0 comments on commit 66198ff

Please sign in to comment.