Skip to content

Commit

Permalink
[meta] Make swap lib naming for better read in Makefile.am
Browse files Browse the repository at this point in the history
Now all compiled files from sonic-sairedis/SAI/meta/ will got to
libsaimetadata.so, and all compiled files from sonic-sairedis/meta/ will
go to libsaimeta.so.
  • Loading branch information
kcudnik committed Aug 21, 2021
1 parent f1b632c commit 8e3a8fb
Showing 1 changed file with 28 additions and 37 deletions.
65 changes: 28 additions & 37 deletions meta/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,44 @@ else
DBGFLAGS = -g
endif

lib_LTLIBRARIES = libsaimeta.la libsaimetadata.la
lib_LTLIBRARIES = libsaimetadata.la libsaimeta.la

# we are not adding CPPFLAGS since they are added
# automatic to each C preprocessor, and currently
# we add -std=c++11 flag to CXXFLAGS_COMMON which
# will cause compilaton error on C files
# and we already confirmed that SAI/meta files
# can be compiled with success
#
# NOTE: this compilation could be moved to configure.ac
BUILT_SOURCES = $(top_srcdir)/SAI/meta/saimetadata.c $(top_srcdir)/SAI/meta/saimetadata.h

libsaimeta_la_SOURCES = \
$(top_srcdir)/SAI/meta/saimetadata.c \
$(top_srcdir)/SAI/meta/saimetadatautils.c \
$(top_srcdir)/SAI/meta/saiserialize.c

libsaimeta_la_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
libsaimeta_la_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) -ansi $(CODE_COVERAGE_CFLAGS)

$(top_srcdir)/SAI/meta/saimetadata.h $(top_srcdir)/SAI/meta/saimetadata.c: saimeta-gen
$(top_srcdir)/SAI/meta/saimetadata.c $(top_srcdir)/SAI/meta/saimetadata.h: saimeta-gen

saimeta-gen:
make -C $(top_srcdir)/SAI/meta saimetadata.c saimetadata.h
make -C $(top_srcdir)/SAI/meta saimetadata.c

clean-local:
make -C $(top_srcdir)/SAI/meta clean

libsaimetadata_la_SOURCES = \
../lib/src/SaiInterface.cpp \
SaiAttributeList.cpp \
saiserialize.cpp \
SaiAttrWrapper.cpp \
OidRefCounter.cpp \
AttrKeyMap.cpp \
Globals.cpp \
SaiObject.cpp \
SaiObjectCollection.cpp \
PortRelatedSet.cpp \
MetaKeyHasher.cpp \
Meta.cpp


BUILT_SOURCES = $(top_srcdir)/SAI/meta/saimetadata.h $(top_srcdir)/SAI/meta/saimetadata.c
libsaimetadata_la_SOURCES = \
$(top_srcdir)/SAI/meta/saimetadata.c \
$(top_srcdir)/SAI/meta/saimetadatautils.c \
$(top_srcdir)/SAI/meta/saiserialize.c

libsaimetadata_la_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
libsaimetadata_la_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS)
libsaimetadata_la_LIBADD = -lhiredis -lswsscommon libsaimeta.la $(CODE_COVERAGE_LIBS)
libsaimetadata_la_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) -ansi $(CODE_COVERAGE_CFLAGS)


libsaimeta_la_SOURCES = \
../lib/src/SaiInterface.cpp \
SaiAttributeList.cpp \
saiserialize.cpp \
SaiAttrWrapper.cpp \
OidRefCounter.cpp \
AttrKeyMap.cpp \
Globals.cpp \
SaiObject.cpp \
SaiObjectCollection.cpp \
PortRelatedSet.cpp \
MetaKeyHasher.cpp \
Meta.cpp

libsaimeta_la_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
libsaimeta_la_CXXFLAGS = $(DBGFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS_COMMON) $(CODE_COVERAGE_CXXFLAGS)
libsaimeta_la_LIBADD = -lhiredis -lswsscommon libsaimetadata.la $(CODE_COVERAGE_LIBS)

bin_PROGRAMS = tests

Expand Down

0 comments on commit 8e3a8fb

Please sign in to comment.