67d4ba105f
Add redfish hwmon thread function and related parse function for Power and Thermal sensor data. Removed some unused old functions. Rename common function or variable with bmc prefix Test done for this patch on simplex bare metal setup. system host-sensor-list system host-sensor-show system host-sensorgroup-list system host-sensorgroup-show system host-sensorgroup-relearn Story: 2005861 Task: 35815 Depends-on: https://review.opendev.org/#/c/671340 Change-Id: If8a35581d44df15749a049eda945f23d2323fd35 Signed-off-by: zhipengl <zhipengs.liu@intel.com>
61 lines
1.6 KiB
Makefile
61 lines
1.6 KiB
Makefile
#
|
|
# Copyright (c) 2014-2018 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
SHELL = /bin/bash
|
|
|
|
SRCS += hwmonUtil.cpp
|
|
SRCS += hwmonBmc.cpp
|
|
SRCS += hwmonModel.cpp
|
|
SRCS += hwmonGroup.cpp
|
|
SRCS += hwmonSensor.cpp
|
|
SRCS += hwmonThreads.cpp
|
|
SRCS += hwmonAlarm.cpp
|
|
SRCS += hwmonHdlr.cpp
|
|
SRCS += hwmonJson.cpp
|
|
SRCS += hwmonClass.cpp
|
|
SRCS += hwmonHttp.cpp
|
|
SRCS += hwmonInit.cpp
|
|
SRCS += hwmonMsg.cpp
|
|
SRCS += hwmonFsm.cpp
|
|
|
|
OBJS = $(SRCS:.cpp=.o)
|
|
BIN = hwmond
|
|
LDLIBS = -lstdc++ -ldaemon -lfmcommon -lcommon -lthreadUtil -lbmcUtils -lpthread -levent -ljson-c -lrt -lcrypto
|
|
INCLUDES = -I. -I/usr/include/mtce-daemon -I/usr/include/mtce-common
|
|
INCLUDES += -I../maintenance
|
|
CCFLAGS = -g -O2 -Wall -Wextra -Werror -std=c++11 -pthread
|
|
|
|
STATIC_ANALYSIS_TOOL = cppcheck
|
|
STATIC_ANALYSIS_TOOL_EXISTS = $(shell [[ -e `which $(STATIC_ANALYSIS_TOOL)` ]] && echo 1 || echo 0)
|
|
|
|
# all: common daemon build clean_common
|
|
all: clean static_analysis common daemon build
|
|
|
|
.cpp.o:
|
|
$(CXX) $(INCLUDES) $(CCFLAGS) $(EXTRACCFLAGS) -c $< -o $@
|
|
|
|
static_analysis:
|
|
ifeq ($(STATIC_ANALYSIS_TOOL_EXISTS), 1)
|
|
$(STATIC_ANALYSIS_TOOL) --enable=warning --language=c++ -U__AREA__ -DWANT_FIT_TESTING *.cpp *.h
|
|
else
|
|
echo "Warning: '$(STATIC_ANALYSIS_TOOL)' static analysis tool not installed ; bypassing ..."
|
|
endif
|
|
|
|
build: clean static_analysis $(OBJS)
|
|
$(CXX) $(CCFLAGS) $(OBJS) -L../daemon -L../common $(LDLIBS) $(EXTRALDFLAGS) -o $(BIN)
|
|
|
|
common:
|
|
( cd ../common ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
|
|
|
|
daemon:
|
|
( cd ../daemon ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
|
|
|
|
clean_bins:
|
|
@rm -v -f $(BIN)
|
|
|
|
clean:
|
|
@rm -v -f $(OBJS) $(BIN)
|