summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorspashabk-in <shakeebbk@in.ibm.com>2017-12-06 05:19:18 -0600
committerSachin Gupta <sgupta2m@in.ibm.com>2018-01-04 04:16:27 -0500
commit71ffbf448c4e7b57fafeb334afa27347f5620cfc (patch)
treebbc161a29f16087204af5366b179a7a76e03140a
parent1c7f2eb205f464ac09f11afbd35002ab78b43c62 (diff)
downloadtalos-sbe-71ffbf448c4e7b57fafeb334afa27347f5620cfc.tar.gz
talos-sbe-71ffbf448c4e7b57fafeb334afa27347f5620cfc.zip
[SBE-code-re-org][4] Adding app common makefiles
Addition of app/common directory and associated makefiles Change-Id: I9cd107965b5712ee03b32d3939828281a6cadf83 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50569 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
-rw-r--r--src/build/Makefile10
-rw-r--r--src/sbefw/app/common/Makefile63
-rw-r--r--src/sbefw/app/common/appcommonfiles.mk36
-rw-r--r--src/sbefw/app/common/sbeappcommon.C28
4 files changed, 137 insertions, 0 deletions
diff --git a/src/build/Makefile b/src/build/Makefile
index 36a773c2..a1215378 100644
--- a/src/build/Makefile
+++ b/src/build/Makefile
@@ -56,6 +56,15 @@ LIB_DIRS += -L$(OBJDIR)/sbefw/app/power_seeprom
SBECORESEEPROMLIB := $(OBJDIR)/sbefw/app/power_seeprom/libsbeapppowerseeprom.a
LLIBS += -lsbeapppowerseeprom
+SUBDIRS += ../sbefw/app/common
+LIB_DIRS += -L$(OBJDIR)/sbefw/app/common_pibmem
+SBEAPPLIB := $(OBJDIR)/sbefw/app/common_pibmem/libsbeappcommonpibmem.a
+LLIBS += -lsbeappcommonpibmem
+
+LIB_DIRS += -L$(OBJDIR)/sbefw/app/common_seeprom
+SBECORESEEPROMLIB := $(OBJDIR)/sbefw/app/common_seeprom/libsbeappcommonseeprom.a
+LLIBS += -lsbeappcommonseeprom
+
# FAPI2 library
SUBDIRS += $(PLAT_FAPI2_DIR)
LIB_DIRS += -L$(OBJDIR)/fapi2
@@ -274,6 +283,7 @@ $(SUBDIRS):
_sbecore_seeprom:
$(MAKE) -I $(INCLUDES) -C ../sbefw/core -f Makefile img_mem=seeprom
_sbeapp_seeprom:
+ $(MAKE) -I $(INCLUDES) -C ../sbefw/app/common -f Makefile img_mem=seeprom
$(MAKE) -I $(INCLUDES) -C ../sbefw/app/power -f Makefile img_mem=seeprom
diff --git a/src/sbefw/app/common/Makefile b/src/sbefw/app/common/Makefile
new file mode 100644
index 00000000..63ae1ad6
--- /dev/null
+++ b/src/sbefw/app/common/Makefile
@@ -0,0 +1,63 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/sbefw/app/common/Makefile $
+#
+# OpenPOWER sbe Project
+#
+# Contributors Listed Below - COPYRIGHT 2016,2017
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+#export P2P_ENABLE = 1
+
+ifneq ($(img_mem), seeprom)
+export SUB_OBJDIR = /sbefw/app/common_pibmem
+OBJS = $(addprefix $(OBJDIR)/, $(APPCOMMONPIBMEM_OBJECTS))
+LIBNAME = libsbeappcommonpibmem
+else
+export SUB_OBJDIR = /sbefw/app/common_seeprom
+GCC-CFLAGS += -mlongcall
+GCC-DEFS += -D__SBEFW_SEEPROM__=1
+OBJS = $(addprefix $(OBJDIR)/, $(APPCOMMONSEEPROM_OBJECTS))
+LIBNAME = libsbeappcommonseeprom
+endif
+
+include img_defs.mk
+include appcommonfiles.mk
+
+$(LIBNAME).a: $(OBJS)
+ $(AR) crs $(OBJDIR)/$(LIBNAME).a $(OBJDIR)/*.o
+
+.PHONY: clean sbeappcommon
+sbeappcommon: $(OBJS)
+
+$(OBJS) $(OBJS:.o=.d): | $(OBJDIR)
+
+$(OBJDIR):
+ mkdir -p $(OBJDIR)
+
+#clean the kernel directory first, then the application level clean
+clean:
+ rm -fr $(OBJDIR)
+
+ifneq ($(MAKECMDGOALS),clean)
+include $(OBJS:.o=.d)
+endif
+
+
+
+
+
diff --git a/src/sbefw/app/common/appcommonfiles.mk b/src/sbefw/app/common/appcommonfiles.mk
new file mode 100644
index 00000000..98a1da7a
--- /dev/null
+++ b/src/sbefw/app/common/appcommonfiles.mk
@@ -0,0 +1,36 @@
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/sbefw/app/common/appcommonfiles.mk $
+#
+# OpenPOWER sbe Project
+#
+# Contributors Listed Below - COPYRIGHT 2015,2017
+#
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# IBM_PROLOG_END_TAG
+APPCOMMONPIBMEM-CPP-SOURCES = sbeappcommon.C
+
+APPCOMMONPIBMEM-C-SOURCES =
+APPCOMMONPIBMEM-S-SOURCES =
+
+APPCOMMONPIBMEM_OBJECTS = $(APPCOMMONPIBMEM-C-SOURCES:.c=.o) $(APPCOMMONPIBMEM-CPP-SOURCES:.C=.o) $(APPCOMMONPIBMEM-S-SOURCES:.S=.o)
+
+APPCOMMONSEEPROM-CPP-SOURCES = sbeappcommon.C
+
+APPCOMMONSEEPROM-C-SOURCES =
+APPCOMMONSEEPROM-S-SOURCES =
+
+APPCOMMONSEEPROM_OBJECTS = $(APPCOMMONSEEPROM-C-SOURCES:.c=.o) $(APPCOMMONSEEPROM-CPP-SOURCES:.C=.o) $(APPCOMMONSEEPROM-S-SOURCES:.S=.o)
diff --git a/src/sbefw/app/common/sbeappcommon.C b/src/sbefw/app/common/sbeappcommon.C
new file mode 100644
index 00000000..46ebbab6
--- /dev/null
+++ b/src/sbefw/app/common/sbeappcommon.C
@@ -0,0 +1,28 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/sbefw/app/common/sbeappcommon.C $ */
+/* */
+/* OpenPOWER sbe Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2017 */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#ifdef __SBEFW_SEEPROM__
+void func1(){}
+#else
+void func2(){}
+#endif //__SBEFW_SEEPROM__
OpenPOWER on IntegriCloud