Fix build errors with bitbake

8b97665 has build fails with a pldm bitbake recipe. The fix was mostly
about using top_srcdir instead of top_builddir.

Change-Id: Ic3ef0e01997921174d28ae10e66e7bdd17c52af8
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/libpldm/Makefile.am b/libpldm/Makefile.am
index dc03711..3de7bf3 100644
--- a/libpldm/Makefile.am
+++ b/libpldm/Makefile.am
@@ -13,16 +13,17 @@
 	platform.c \
 	bios.c
 
+libpldm_la_LDFLAGS = -version-info 1:0:0 -shared
+libpldm_la_CFLAGS = $(CODE_COVERAGE_CFLAGS)
+libpldm_la_LIBADD = $(CODE_COVERAGE_LIBS)
+
 if OEM_IBM
 libpldm_include_HEADERS += \
         $(top_builddir)/oem/ibm/libpldm/file_io.h
 libpldm_la_SOURCES += \
         $(top_builddir)/oem/ibm/libpldm/file_io.c
+libpldm_la_CFLAGS += -I$(top_srcdir)/libpldm
 endif
 
-libpldm_la_LDFLAGS = -version-info 1:0:0 -shared
-libpldm_la_CFLAGS = $(CODE_COVERAGE_CFLAGS)
-libpldm_la_LIBADD = $(CODE_COVERAGE_LIBS)
-
 pkgconfiglibdir = ${libdir}/pkgconfig
 pkgconfiglib_DATA = libpldm.pc