
This change reorganizes the source directories of the stx-fm-subagent container to be reused by both CentOS and Debian Dockerfiles in order to build the images having the corresponding OS-specic base. The files Dockerfile.debian for stx-snmp and stx-fm-trap-subagent have been added with no content in order to work on them on different reviews. Test plan: PASS: Debian - Build Debian docker image and upload/apply snmp-app changing the stx-fm-subagent references to point to the new image. Verified that the app is applied, and the container is created. PASS: Verified common snmp scenarios: - test snmpwalk for 2c and 3 snmp version - test snmpget for 2c and 3 snmp version - verified traps are working as expected. PASS: CentOS - Same tests have been done building a CentOS container. Story: 2009831 Task: 45730 Signed-off-by: Enzo Candotti <enzo.candotti@windriver.com> Change-Id: Idfb46224429061f11493c111588b542cf809b79f
40 lines
838 B
Makefile
40 lines
838 B
Makefile
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
MAJOR ?= 1
|
|
MINOR ?= 0
|
|
PATCH ?= 0
|
|
MIBVER ?= 2.0
|
|
|
|
CC=gcc
|
|
DEST_DIR ?= /
|
|
DATA_DIR ?= /usr/share
|
|
# LIB_DIR = /usr/lib for Debian
|
|
# LIB_DIR = /usr/lib64 for CentOS
|
|
|
|
BIN=./bin
|
|
SOURCE=./src
|
|
|
|
SRCS = $(SOURCE)/snmpSubAgent.c $(SOURCE)/snmpActiveAlarms.c $(SOURCE)/snmpAgentPlugin.c $(SOURCE)/snmpEventLogs.c
|
|
OBJS = $(SRCS:.c=.o)
|
|
LDLIBS = -L/lib/x86_64-linux-gnu/ -L$(LIB_DIR) -lfmcommon -lnetsnmp
|
|
LDLIBS += -lnetsnmpagent -luuid -lnetsnmpmibs -lnetsnmphelpers
|
|
|
|
INCLUDES += -I./ -I/include/net-snmp -I$(SOURCE) -I/usr/include/
|
|
CCFLAGS = -fPIC -g -O2 -Wall -Werror -Wformat -Wformat-security
|
|
|
|
TARGET = snmpSubAgent
|
|
|
|
.c.o:
|
|
$(CC) $(CCFLAGS) $(INCLUDES) -c $< -o $@
|
|
|
|
$(TARGET): $(SRCS)
|
|
$(CC) $(CCFLAGS) $(INCLUDES) -o $@ $^ $(LDLIBS)
|
|
|
|
clean:
|
|
@rm -f $(OBJ) *.o $(TARGET)
|
|
|
|
install:
|
|
echo "install stage"
|