From 253836d2130109a109fc5e1a77b93b8602f6cee6 Mon Sep 17 00:00:00 2001 From: Vijaya Kumar Abbaraju Date: Wed, 10 Apr 2024 03:11:59 -0700 Subject: [PATCH] PAC infra and utils make file changes --- src/sonic-pac/fpinfra/Makefile.am | 43 +++++++++++++++++++++ src/sonic-pac/fpinfra/configure.ac | 61 ++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 src/sonic-pac/fpinfra/Makefile.am create mode 100644 src/sonic-pac/fpinfra/configure.ac diff --git a/src/sonic-pac/fpinfra/Makefile.am b/src/sonic-pac/fpinfra/Makefile.am new file mode 100644 index 000000000000..eeb32026c288 --- /dev/null +++ b/src/sonic-pac/fpinfra/Makefile.am @@ -0,0 +1,43 @@ +lib_LTLIBRARIES = libfpinfra.la + +libfpinfra_la_SOURCES = osapi/osapi.c \ + osapi/osapi_sem.c \ + osapi/osapi_support.c \ + osapi/osapi_util.c \ + osapi/osapi_time.c \ + osapi/osapi_rwlock.c \ + osapi/proc_osapi_msg.c \ + osapi/proc_osapi_task.c \ + osapi/init_platform_config.c \ + osapi/osapi_file.c \ + util/sll/sll.c \ + util/apptimer/apptimer.c \ + util/avl/avl.c \ + util/avl/tree_api.c \ + util/avl/avl_util.c \ + nim/nim_util.c \ + nim/nim_intf_api.c \ + nim/nim_intf_map_api.c \ + nim/nim_startup.c \ + nim/nim_events.c \ + nim/nim_trace.c \ + nim/nim_ifindex.c \ + nim/nim_outcalls.c \ + nim/nim_config.c \ + nim/nim_cnfgr.c \ + nim/nim_debug.c \ + nim/nim_data.c \ + fpnim.cpp \ + nimsync.cpp \ + sim/sim.cpp \ + sysapi/sysapi_hpc.c \ + sysapi/sysapi.c \ + sysapi/sysapi_if_net.c \ + util/md5/md5.c \ + util/utils/util.c \ + util/buff/buff.c \ + fpSonicUtils.cpp +#AM_CPPFLAGS = -I$(top_srcdir)/inc +DBGFLAGS = -ggdb -DDEBUG +AM_CPPFLAGS = -Iinc -I $(top_srcdir) -I/usr/include/libnl3 -I/usr/include/swss $(DBGFLAGS) $(SONIC_COMMON_CFLAGS) +AM_LDFLAGS = -lnl-3 -lrt -pthread $(SONIC_COMMON_LDFLAGS) -lelf $(LIBNL_LIBS) -Wl,-Bsymbolic diff --git a/src/sonic-pac/fpinfra/configure.ac b/src/sonic-pac/fpinfra/configure.ac new file mode 100644 index 000000000000..ba6367101add --- /dev/null +++ b/src/sonic-pac/fpinfra/configure.ac @@ -0,0 +1,61 @@ +AC_INIT([fpinfra], [1.0], [prabhu.sreenivasan@broadcom.com]) +AM_INIT_AUTOMAKE([-Wall -Werror foreign]) +AC_PROG_CC +AC_PROG_RANLIB +AM_PROG_AR +AC_PROG_LIBTOOL + +LDFLAGS="-Wl,--no-undefined $LDFLAGS" +AC_SUBST([LDFLAGS]) + +CFLAGS_COMMON="" +CFLAGS_COMMON+=" -ansi" +CFLAGS_COMMON+=" -fPIC" +CFLAGS_COMMON+=" -std=c++11" +CFLAGS_COMMON+=" -Wall" +CFLAGS_COMMON+=" -Wcast-align" +CFLAGS_COMMON+=" -Wcast-qual" +CFLAGS_COMMON+=" -Wconversion" +CFLAGS_COMMON+=" -Wdisabled-optimization" +CFLAGS_COMMON+=" -Werror" +CFLAGS_COMMON+=" -Wextra" +CFLAGS_COMMON+=" -Wfloat-equal" +CFLAGS_COMMON+=" -Wformat=2" +CFLAGS_COMMON+=" -Wformat-nonliteral" +CFLAGS_COMMON+=" -Wformat-security" +CFLAGS_COMMON+=" -Wformat-y2k" +CFLAGS_COMMON+=" -Wimport" +CFLAGS_COMMON+=" -Winit-self" +CFLAGS_COMMON+=" -Winvalid-pch" +CFLAGS_COMMON+=" -Wlong-long" +CFLAGS_COMMON+=" -Wmissing-field-initializers" +CFLAGS_COMMON+=" -Wmissing-format-attribute" +CFLAGS_COMMON+=" -Wmissing-include-dirs" +CFLAGS_COMMON+=" -Wmissing-noreturn" +CFLAGS_COMMON+=" -Wno-aggregate-return" +CFLAGS_COMMON+=" -Wno-padded" +CFLAGS_COMMON+=" -Wno-switch-enum" +CFLAGS_COMMON+=" -Wno-unused-parameter" +CFLAGS_COMMON+=" -Wpacked" +CFLAGS_COMMON+=" -Wpointer-arith" +CFLAGS_COMMON+=" -Wredundant-decls" +CFLAGS_COMMON+=" -Wshadow" +CFLAGS_COMMON+=" -Wstack-protector" +CFLAGS_COMMON+=" -Wstrict-aliasing=3" +CFLAGS_COMMON+=" -Wswitch" +CFLAGS_COMMON+=" -Wswitch-default" +CFLAGS_COMMON+=" -Wunreachable-code" +CFLAGS_COMMON+=" -Wunused" +CFLAGS_COMMON+=" -Wvariadic-macros" +CFLAGS_COMMON+=" -Wno-write-strings" +CFLAGS_COMMON+=" -Wno-missing-format-attribute" +CFLAGS_COMMON+=" -Wno-long-long" + +AC_SUBST(CFLAGS_COMMON) + + +AC_CONFIG_FILES([ +Makefile +]) +AC_OUTPUT +