Add EXTRALDFLAGS to linker in a number of Makefiles
This allows DevStack plugins to add its configured STX_INST_DIR to the linker search path. Change-Id: I277204cd89767b93eec6c96969fc33d23e04516b Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This commit is contained in:
parent
f1c8043abf
commit
83101e95ba
@ -72,6 +72,7 @@ function build_mtce {
|
|||||||
VER_MJR=${major} \
|
VER_MJR=${major} \
|
||||||
VER=${major}.${minor} \
|
VER=${major}.${minor} \
|
||||||
CCFLAGS=' -g -O2 -Wall -Wextra -std=c++11 -DBUILDINFO="\"$$(date)\""' \
|
CCFLAGS=' -g -O2 -Wall -Wextra -std=c++11 -DBUILDINFO="\"$$(date)\""' \
|
||||||
|
EXTRALDFLAGS="-L$STX_INST_DIR"/lib64 \
|
||||||
build
|
build
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
@ -43,7 +43,7 @@ library:
|
|||||||
ar rcs libalarm.a alarm.o $(EXTRAARFLAGS)
|
ar rcs libalarm.a alarm.o $(EXTRAARFLAGS)
|
||||||
|
|
||||||
process: $(OBJS)
|
process: $(OBJS)
|
||||||
$(CXX) $(CCFLAGS) ${OBJS} -L../daemon -L../common $(LDLIBS) -o mtcalarmd
|
$(CXX) $(CCFLAGS) ${OBJS} -L../daemon -L../common $(LDLIBS) $(EXTRALDFLAGS) -o mtcalarmd
|
||||||
|
|
||||||
clean_bins:
|
clean_bins:
|
||||||
@rm -v -f $(BINS)
|
@rm -v -f $(BINS)
|
||||||
|
@ -28,7 +28,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
build: clean static_analysis $(OBJS)
|
build: clean static_analysis $(OBJS)
|
||||||
$(CXX) $(CCFLAGS) $(OBJS) -L../daemon -L../common $(LDLIBS) -o fsmond
|
$(CXX) $(CCFLAGS) $(OBJS) -L../daemon -L../common $(LDLIBS) $(EXTRALDFLAGS) -o fsmond
|
||||||
|
|
||||||
common:
|
common:
|
||||||
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
|
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
|
||||||
|
@ -33,15 +33,15 @@ endif
|
|||||||
all: static_analysis common agent client
|
all: static_analysis common agent client
|
||||||
|
|
||||||
build: static_analysis $(OBJS)
|
build: static_analysis $(OBJS)
|
||||||
$(CXX) $(CCFLAGS) hbsAlarm.o hbsAgent.o hbsUtil.o hbsCluster.o hbsStubs.o ../common/nodeClass.o -L../public -L../alarm $(LDLIBS) -o hbsAgent
|
$(CXX) $(CCFLAGS) hbsAlarm.o hbsAgent.o hbsUtil.o hbsCluster.o hbsStubs.o ../common/nodeClass.o -L../public -L../alarm $(LDLIBS) $(EXTRALDFLAGS) -o hbsAgent
|
||||||
$(CXX) $(CCFLAGS) hbsClient.o hbsPmon.o hbsUtil.o -L../public -L../alarm $(LDLIBS) -o hbsClient
|
$(CXX) $(CCFLAGS) hbsClient.o hbsPmon.o hbsUtil.o -L../public -L../alarm $(LDLIBS) $(EXTRALDFLAGS) -o hbsClient
|
||||||
|
|
||||||
common:
|
common:
|
||||||
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
|
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
|
||||||
|
|
||||||
agent: $(OBJS)
|
agent: $(OBJS)
|
||||||
$(CXX) $(CCFLAGS) hbsAgent.o -L../alarm -L../public $(LDLIBS) -o hbsAgent
|
$(CXX) $(CCFLAGS) hbsAgent.o -L../alarm -L../public $(LDLIBS) $(EXTRALDFLAGS) -o hbsAgent
|
||||||
|
|
||||||
client: $(OBJS)
|
client: $(OBJS)
|
||||||
$(CXX) $(CCFLAGS) hbsClient.o -L../public $(LDLIBS) -o hbsClient
|
$(CXX) $(CCFLAGS) hbsClient.o -L../public $(LDLIBS) -o hbsClient
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
build: clean static_analysis $(OBJS)
|
build: clean static_analysis $(OBJS)
|
||||||
$(CXX) $(CCFLAGS) $(OBJS) -L../daemon -L../common $(LDLIBS) -o hostwd
|
$(CXX) $(CCFLAGS) $(OBJS) -L../daemon -L../common $(LDLIBS) $(EXTRALDFLAGS) -o hostwd
|
||||||
|
|
||||||
common:
|
common:
|
||||||
( cd ../common ; make clean ; make -j1 lib VER=$(VER) VER_MJR=$(VER_MJR))
|
( cd ../common ; make clean ; make -j1 lib VER=$(VER) VER_MJR=$(VER_MJR))
|
||||||
|
@ -23,7 +23,7 @@ SRCS += hwmonFsm.cpp
|
|||||||
|
|
||||||
OBJS = $(SRCS:.cpp=.o)
|
OBJS = $(SRCS:.cpp=.o)
|
||||||
BIN = hwmond
|
BIN = hwmond
|
||||||
LDLIBS = -lstdc++ -ldaemon -lfmcommon -lcommon -lthreadUtil -lipmiUtil -lpthread -levent -ljson-c -lrt -lcrypto
|
LDLIBS = -lstdc++ -ldaemon -lfmcommon -lcommon -lthreadUtil -lipmiUtil -lpthread -levent -ljson-c -lrt -lcrypto
|
||||||
INCLUDES = -I. -I/usr/include/mtce-daemon -I/usr/include/mtce-common
|
INCLUDES = -I. -I/usr/include/mtce-daemon -I/usr/include/mtce-common
|
||||||
INCLUDES += -I../maintenance
|
INCLUDES += -I../maintenance
|
||||||
CCFLAGS = -g -O2 -Wall -Wextra -Werror -std=c++11 -pthread
|
CCFLAGS = -g -O2 -Wall -Wextra -Werror -std=c++11 -pthread
|
||||||
@ -45,7 +45,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
build: clean static_analysis $(OBJS)
|
build: clean static_analysis $(OBJS)
|
||||||
$(CXX) $(CCFLAGS) $(OBJS) -L../daemon -L../common $(LDLIBS) -o $(BIN)
|
$(CXX) $(CCFLAGS) $(OBJS) -L../daemon -L../common $(LDLIBS) $(EXTRALDFLAGS) -o $(BIN)
|
||||||
|
|
||||||
common:
|
common:
|
||||||
( cd ../common ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
|
( cd ../common ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
|
||||||
@ -57,4 +57,4 @@ clean_bins:
|
|||||||
@rm -v -f $(BIN)
|
@rm -v -f $(BIN)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -v -f $(OBJS) $(BIN)
|
@rm -v -f $(OBJS) $(BIN)
|
||||||
|
@ -29,7 +29,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
build: clean static_analysis $(OBJS)
|
build: clean static_analysis $(OBJS)
|
||||||
$(CXX) $(CCFLAGS) $(OBJS) $(LDPATH) $(LDLIBS) -o lmond
|
$(CXX) $(CCFLAGS) $(OBJS) $(LDPATH) $(LDLIBS) $(EXTRALDFLAGS) -o lmond
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -v -f $(OBJ) lmond *.o *.a
|
@rm -v -f $(OBJ) lmond *.o *.a
|
||||||
|
@ -77,10 +77,10 @@ common:
|
|||||||
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
|
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
|
||||||
|
|
||||||
mtcAgent: $(OBJS)
|
mtcAgent: $(OBJS)
|
||||||
$(CXX) $(CONTROL_OBJS) -L../public -L../alarm -L../rmon/rmonApi $(LDLIBS) -o mtcAgent
|
$(CXX) $(CONTROL_OBJS) -L../public -L../alarm -L../rmon/rmonApi $(LDLIBS) $(EXTRALDFLAGS) -o mtcAgent
|
||||||
|
|
||||||
mtcClient: $(OBJS)
|
mtcClient: $(OBJS)
|
||||||
$(CXX) $(COMPUTE_OBJS) -L../public -L../alarm -L../rmon/rmonApi $(LDLIBS) -o mtcClient
|
$(CXX) $(COMPUTE_OBJS) -L../public -L../alarm -L../rmon/rmonApi $(LDLIBS) $(EXTRALDFLAGS) -o mtcClient
|
||||||
|
|
||||||
remove_bins:
|
remove_bins:
|
||||||
@rm -v -f $(BINS)
|
@rm -v -f $(BINS)
|
||||||
|
@ -30,7 +30,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
build: clean static_analysis $(OBJS)
|
build: clean static_analysis $(OBJS)
|
||||||
$(CXX) $(CCFLAGS) $(OBJS) -L../daemon -L../common $(LDLIBS) -o mtclogd
|
$(CXX) $(CCFLAGS) $(OBJS) -L../daemon -L../common $(LDLIBS) $(EXTRALDFLAGS) -o mtclogd
|
||||||
|
|
||||||
common:
|
common:
|
||||||
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
|
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
|
||||||
|
@ -29,7 +29,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
build: clean static_analysis $(OBJS)
|
build: clean static_analysis $(OBJS)
|
||||||
$(CXX) $(CCFLAGS) $(OBJS) -L../daemon -L../common $(LDLIBS) -o pmond
|
$(CXX) $(CCFLAGS) $(OBJS) -L../daemon -L../common $(LDLIBS) $(EXTRALDFLAGS) -o pmond
|
||||||
|
|
||||||
common:
|
common:
|
||||||
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
|
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
|
||||||
|
@ -29,7 +29,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
build: clean static_analysis $(OBJS)
|
build: clean static_analysis $(OBJS)
|
||||||
$(CXX) $(CCFLAGS) $(OBJS) -L../daemon -L../common -LrmonApi/ $(LDLIBS) -o rmond
|
$(CXX) $(CCFLAGS) $(OBJS) -L../daemon -L../common -LrmonApi/ $(LDLIBS) $(EXTRALDFLAGS) -o rmond
|
||||||
|
|
||||||
lib: build $(OBJS)
|
lib: build $(OBJS)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
SRCS = rmon_resource_notify.cpp
|
SRCS = rmon_resource_notify.cpp
|
||||||
OBJS = $(SRCS:.cpp=.o)
|
OBJS = $(SRCS:.cpp=.o)
|
||||||
LDLIBS = -lstdc++ -lrmonapi -lrt
|
LDLIBS = -lstdc++ -lrmonapi -lrt
|
||||||
INCLUDES = -I. -I/usr/include/mtce-daemon -I/usr/include/mtce-common
|
INCLUDES = -I. -I/usr/include/mtce-daemon -I/usr/include/mtce-common
|
||||||
@ -13,7 +13,7 @@ CCFLAGS = -g -O2 -Wall -Wextra -Werror
|
|||||||
|
|
||||||
STATIC_ANALYSIS_TOOL = cppcheck
|
STATIC_ANALYSIS_TOOL = cppcheck
|
||||||
STATIC_ANALYSIS_TOOL_EXISTS = $(shell [[ -e `which $(STATIC_ANALYSIS_TOOL)` ]] && echo 1 || echo 0)
|
STATIC_ANALYSIS_TOOL_EXISTS = $(shell [[ -e `which $(STATIC_ANALYSIS_TOOL)` ]] && echo 1 || echo 0)
|
||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
.cpp.o:
|
.cpp.o:
|
||||||
@ -27,7 +27,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
build: clean static_analysis $(OBJS)
|
build: clean static_analysis $(OBJS)
|
||||||
$(CXX) $(CCFLAGS) $(OBJS) -L../../common -L../../daemon -L../rmonApi/ $(LDLIBS) -o rmon_resource_notify
|
$(CXX) $(CCFLAGS) $(OBJS) -L../../common -L../../daemon -L../rmonApi/ $(LDLIBS) $(EXTRALDFLAGS) -o rmon_resource_notify
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -v -f $(OBJ) rmon_resource_notify *.o *.a
|
@rm -v -f $(OBJ) rmon_resource_notify *.o *.a
|
||||||
|
Loading…
Reference in New Issue
Block a user