xiaoxiang781216 commented on code in PR #3170: URL: https://github.com/apache/nuttx-apps/pull/3170#discussion_r2347089893
########## netutils/libshvc/Makefile: ########## @@ -0,0 +1,78 @@ +############################################################################# +# apps/netutils/libshvc/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you 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. +# +############################################################################# + +include $(APPDIR)/Make.defs + +SHVDIR = shv-libs4c + +# Commit hash of the supported shv-libs4c revision (master) +SHV_LIBS4C_COMMIT_HASH := a8aa519a85e503a44b819fe3a4919dccc6fd559a + +.PHONY: shv-build-library + +define RUN_OMK_MAKE +$(1):: $(SHVDIR) + make -C $(SHVDIR) \ + CONFIG_SHV_LIBS4C_PLATFORM="nuttx" $(2) \ + CONFIG_OC_ULUT_INCDIRONLY=y \ + EXPORT_LIB_OBJS_EARLY=y \ + CC="$$(CC)" \ + CXX="$$(CXX)" \ + CFLAGS="$$(CFLAGS)" \ + CXXFLAGS="$$(CXXFLAGS)" \ + LD="$$(LD)" \ + LDFLAGS="$$(LDFLAGS)" \ + CONFIG_OC_ULUT_TESTS=n +endef + +define IMPORT_OMK_DEPEND + +$(1) : $$(foreach omk_d,$$(wildcard $(1).d),\ + $$(shell sed -n -e 's/^ \([^\]*\)[\]*$$$$/ \1/p' $$(omk_d))) + +endef + +ifneq ($(wildcard $(SHVDIR)/_build),) +-include $(shell true; find $(SHVDIR)/_build -name 'lib*.a.omkvar') # `true' is a hack for MinGW +SHVOBJS = $(sort $(foreach lib,$(static_libs),$($(lib)_objsar))) +endif + +EXTOBJS += $(SHVOBJS) + +$(SHVOBJS) : shv-build-library + +$(SHVDIR): + $(call CLONE, https://github.com/silicon-heaven/shv-libs4c, $(SHVDIR), ) Review Comment: should we skip the clone if user already git clone manually like other 3rd party project? ########## netutils/libshvc/Kconfig: ########## @@ -0,0 +1,11 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +config NETUTILS_LIBSHVC + bool "Silicon Heaven Protocol (lightweight C implementation)" + select NETUTILS_LIBULUT Review Comment: can we use depends on instead select ########## netutils/libulut/Makefile: ########## @@ -0,0 +1,78 @@ +############################################################################# +# apps/netutils/libulut/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you 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. +# +############################################################################# + +include $(APPDIR)/Make.defs + +ULUTDIR = ulut + +# Commit hash of the supported ulut revision (master) +ULUT_COMMIT_HASH := 7aa18c41fc89b470cff9b5cb294687739402cf87 + +.PHONY: ulut-build-library + +define RUN_OMK_MAKE +$(1):: $(ULUTDIR) + make -C $(ULUTDIR) \ + CONFIG_OC_ULUT_INCDIRONLY=y \ + EXPORT_LIB_OBJS_EARLY=y \ + CC="$$(CC)" \ + CXX="$$(CXX)" \ + CFLAGS="$$(CFLAGS)" \ + CXXFLAGS="$$(CXXFLAGS)" \ + LD="$$(LD)" \ + LDFLAGS="$$(LDFLAGS)" \ + CONFIG_OC_ULUT_TESTS=n +endef + +define IMPORT_OMK_DEPEND + +$(1) : $$(foreach omk_d,$$(wildcard $(1).d),\ + $$(shell sed -n -e 's/^ \([^\]*\)[\]*$$$$/ \1/p' $$(omk_d))) + +endef + +ifneq ($(wildcard $(ULUTDIR)/_build),) +-include $(shell true; find $(ULUTDIR)/_build -name 'lib*.a.omkvar') # `true' is a hack for MinGW +ULUTOBJS = $(sort $(foreach lib,$(static_libs),$($(lib)_objsar))) +endif + +EXTOBJS += $(ULUTOBJS) + +$(ULUTOBJS) : ulut-build-library + +$(ULUTDIR): + $(call CLONE, https://git.code.sf.net/p/ulan/ulut.git, $(ULUTDIR), ) Review Comment: should we skip the clone if user already git clone manually like other 3rd party project -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org