fault/fm-common/sources/Makefile
Pablo Bovina 8e74a0ee1e Reimplementation logic for trap generation
In the current implementation "Fault" is responsible
for the generation and dispatch of traps.

This logic is removed from it, leaving only the
responsibility of sending the metadata of a trap
to a service dedicated to generating and sending them.

The fm.conf file will contain the IP and port values
of the service.

Story: 2008132
Task: 40867
Depends-On: https://review.opendev.org/761217

Change-Id: I575dfa2329f11821404ca4cb1d539e5189444b4e
Signed-off-by: Pablo Bovina <pablo.bovina@windriver.com>
2020-12-08 18:37:50 -03:00

55 lines
2.0 KiB
Makefile
Executable File

SRCS = fmAPI.cpp fmFile.cpp fmLog.cpp fmMsgServer.cpp fmMutex.cpp fmSocket.cpp fmThread.cpp fmTime.cpp \
fmAlarmUtils.cpp fmDb.cpp fmDbUtils.cpp fmDbAlarm.cpp fmSnmpUtils.cpp \
fmDbEventLog.cpp fmEventSuppression.cpp fmConfig.cpp
CLI_SRCS = fm_cli.cpp
OBJS = $(SRCS:.cpp=.o)
CLI_OBJS = fm_cli.o
LDLIBS = -lstdc++ -lrt -luuid -lpq -lpthread -lpython2.7 -ljson-c
INCLUDES = -I./ -I$(shell pg_config --includedir)
CCFLAGS = -g -O2 -Wall -Werror -fPIC
EXTRACCFLAGS= -Wformat -Wformat-security
MAJOR ?= 1
MINOR ?= 0
DESTDIR ?= /
BINDIR ?= /usr/local/bin
LIBDIR ?= /usr/local/lib64
INCDIR ?= /usr/local/include
CGCS_DOC_DEPLOY ?= /opt/deploy/cgcs_doc
LIBFMCOMMON_SO := libfmcommon.so
build: lib fmClientCli
.cpp.o:
$(CXX) $(CCFLAGS) $(INCLUDES) $(EXTRACCFLAGS) -c $< -o $@
lib: $(OBJS)
$(CXX) -Wl,-soname,$(LIBFMCOMMON_SO).$(MAJOR) -o $(LIBFMCOMMON_SO).$(MAJOR).$(MINOR) -shared $(OBJS) $(EXTRAARFLAGS) ${LDLIBS}
ln -sf $(LIBFMCOMMON_SO).$(MAJOR).$(MINOR) $(LIBFMCOMMON_SO).$(MAJOR)
ln -sf $(LIBFMCOMMON_SO).$(MAJOR).$(MINOR) $(LIBFMCOMMON_SO)
fmClientCli: $(CLI_OBJS) lib
$(CXX) -o $@ $(CLI_OBJS) -L./ -lfmcommon
clean:
@rm -f $(OBJ) *.o *.so fmClientCli
install:
install -m 755 -d $(DESTDIR)$(BINDIR)
install -m 755 -d $(DESTDIR)$(LIBDIR)
install -m 755 -d $(DESTDIR)$(INCDIR)
install -m 755 -d $(DESTDIR)$(CGCS_DOC_DEPLOY)
install -m 755 fmClientCli $(DESTDIR)$(BINDIR)
install -m 755 fm_db_sync_event_suppression.py $(DESTDIR)$(BINDIR)
install -m 644 fmDbAPI.h $(DESTDIR)$(INCDIR)
install -m 644 fmAPI.h $(DESTDIR)$(INCDIR)
install -m 644 fmThread.h $(DESTDIR)$(INCDIR)
install -m 644 fmAlarm.h $(DESTDIR)$(INCDIR)
install -m 644 fmConfig.h $(DESTDIR)$(INCDIR)
install -m 644 fmLog.h $(DESTDIR)$(INCDIR)
install -m 644 fmAlarm.h $(DESTDIR)$(CGCS_DOC_DEPLOY)
install -m 755 $(LIBFMCOMMON_SO).$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
ln -sf $(LIBFMCOMMON_SO).$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/$(LIBFMCOMMON_SO).$(MAJOR)
ln -sf $(LIBFMCOMMON_SO).$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/$(LIBFMCOMMON_SO)