Skip to content
Snippets Groups Projects
Commit 6ec7928a authored by Esben Haabendal's avatar Esben Haabendal
Browse files

hc-gen: Add recipe for building OpenHarmony hc-gen tool


The hc-gen tool is used to convert HDF (Hardware Driver Foundation)
configuration source files (.hcs) to HDF configuration binary files (.hcb).

Signed-off-by: default avatarEsben Haabendal <esben.haabendal@huawei.com>
parent a0289fa3
No related branches found
No related tags found
1 merge request!1Initial code import
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
Use $CXX, $CXXFLAGS and $LDFLAGS environment variables, for proper Bitbake
integration.
Signed-off-by: Esben Haabendal <esben.haabendal@huawei.com>
Upstream-Status: Inappropriate
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,9 @@ Q = @
BUILD_DIR := build
TARGET := $(BUILD_DIR)/hc-gen
-CXX := c++
-CXX_FLAGS := -std=gnu++14
-CXX_LD_FLAGS := -lstdc++
+CXX ?= c++
+CXX_FLAGS := -std=gnu++14 $(CXXFLAGS)
+CXX_LD_FLAGS := -lstdc++ $(LDFLAGS)
SRCS := $(wildcard src/*.cpp)
OBJECTS := $(patsubst %.cpp,$(BUILD_DIR)/%.o,$(SRCS))
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
SUMMARY = "Meta-build system that generates build files for Ninja"
LICENSE = "GPL-2.0-or-later | BSD-3-Clause"
LIC_FILES_CHKSUM = "file://../../LICENSE;md5=e97719e0c951ddc23a7d37facffdf32a"
BBCLASSEXTEND = "native nativesdk"
DEPENDS += "bison-native flex-native"
SRC_URI = "git://gitee.com/openharmony/drivers_framework.git;protocol=https;branch=OpenHarmony-3.0-LTS"
SRCREV = "9a26a7542281dcab90e7c0e9aa33c921171117cb"
SRC_URI:append = " file://cxx-and-flags.patch"
S = "${WORKDIR}/git/tools/hc-gen"
EXTRA_OEMAKE += "CC='${CC}' CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
# Include debug symbols in build (bitbake will strip place them in -dbg package)
EXTRA_OEMAKE += "BUILD_TYPE=debug"
do_install () {
install -D -t ${D}${bindir} -m 755 ${S}/build/hc-gen
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment