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>
changes/16/637416/4
Dean Troyer 4 years ago
parent f1c8043abf
commit 83101e95ba
  1. 1
      devstack/lib/stx-metal
  2. 2
      mtce/src/alarm/Makefile
  3. 2
      mtce/src/fsmon/Makefile
  4. 8
      mtce/src/heartbeat/Makefile
  5. 2
      mtce/src/hostw/Makefile
  6. 6
      mtce/src/hwmon/Makefile
  7. 2
      mtce/src/lmon/Makefile
  8. 4
      mtce/src/maintenance/Makefile
  9. 2
      mtce/src/mtclog/Makefile
  10. 2
      mtce/src/pmon/Makefile
  11. 2
      mtce/src/rmon/Makefile
  12. 8
      mtce/src/rmon/rmon_resource_notify/Makefile

@ -72,6 +72,7 @@ function build_mtce {
VER_MJR=${major} \
VER=${major}.${minor} \
CCFLAGS=' -g -O2 -Wall -Wextra -std=c++11 -DBUILDINFO="\"$$(date)\""' \
EXTRALDFLAGS="-L$STX_INST_DIR"/lib64 \
build
popd

@ -43,7 +43,7 @@ library:
ar rcs libalarm.a alarm.o $(EXTRAARFLAGS)
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:
@rm -v -f $(BINS)

@ -28,7 +28,7 @@ else
endif
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:
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))

@ -33,15 +33,15 @@ endif
all: static_analysis common agent client
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) hbsClient.o hbsPmon.o hbsUtil.o -L../public -L../alarm $(LDLIBS) -o hbsClient
$(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) $(EXTRALDFLAGS) -o hbsClient
common:
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
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)
$(CXX) $(CCFLAGS) hbsClient.o -L../public $(LDLIBS) -o hbsClient

@ -28,7 +28,7 @@ else
endif
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:
( cd ../common ; make clean ; make -j1 lib VER=$(VER) VER_MJR=$(VER_MJR))

@ -23,7 +23,7 @@ SRCS += hwmonFsm.cpp
OBJS = $(SRCS:.cpp=.o)
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../maintenance
CCFLAGS = -g -O2 -Wall -Wextra -Werror -std=c++11 -pthread
@ -45,7 +45,7 @@ else
endif
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:
( cd ../common ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
@ -57,4 +57,4 @@ clean_bins:
@rm -v -f $(BIN)
clean:
@rm -v -f $(OBJS) $(BIN)
@rm -v -f $(OBJS) $(BIN)

@ -29,7 +29,7 @@ else
endif
build: clean static_analysis $(OBJS)
$(CXX) $(CCFLAGS) $(OBJS) $(LDPATH) $(LDLIBS) -o lmond
$(CXX) $(CCFLAGS) $(OBJS) $(LDPATH) $(LDLIBS) $(EXTRALDFLAGS) -o lmond
clean:
@rm -v -f $(OBJ) lmond *.o *.a

@ -77,10 +77,10 @@ common:
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))
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)
$(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:
@rm -v -f $(BINS)

@ -30,7 +30,7 @@ else
endif
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:
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))

@ -29,7 +29,7 @@ else
endif
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:
( cd ../common ; make clean ; make lib VER=$(VER) VER_MJR=$(VER_MJR))

@ -29,7 +29,7 @@ else
endif
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)

@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#
SRCS = rmon_resource_notify.cpp
SRCS = rmon_resource_notify.cpp
OBJS = $(SRCS:.cpp=.o)
LDLIBS = -lstdc++ -lrmonapi -lrt
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_EXISTS = $(shell [[ -e `which $(STATIC_ANALYSIS_TOOL)` ]] && echo 1 || echo 0)
all: build
.cpp.o:
@ -27,7 +27,7 @@ else
endif
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

Loading…
Cancel
Save