--- /dev/null
+diff --git a/schema/db-gen/Makefile b/schema/db-gen/Makefile
+index a1b8ab1..4c2f6a1 100755
+--- a/schema/db-gen/Makefile
++++ b/schema/db-gen/Makefile
+@@ -2,7 +2,10 @@ CC = gcc
+
+ REQUIRED_PKG = db-util
+ CFLAGS = -g -Wall #-fprofile-arcs -ftest-coverage
+-LDFLAGS =
++CFLAGS += -I${STAGING_DIR_NATIVE}/usr/include/
++LDFLAGS = -L${STAGING_DIR_NATIVE}/lib/
++LDFLAGS += -L${STAGING_DIR_NATIVE}/usr/lib/
++
+ ifdef REQUIRED_PKG
+ CFLAGS += $(shell pkg-config --cflags $(REQUIRED_PKG))
+ LDFLAGS += -L$(shell pkg-config --variable=libdir $(REQUIRED_PKG))
+diff --git a/schema/generator.sh b/schema/generator.sh
+index e900e5a..3e85be0 100755
+--- a/schema/generator.sh
++++ b/schema/generator.sh
+@@ -31,6 +31,9 @@ make clean
+ # Make DB
+ cd ../db-gen
+ make
++LD_LIBRARY_PATH="${STAGING_DIR_NATIVE}/usr/lib:${LD_LIBRARY_PATH}"
++echo STAGING_DIR_NATIVE ${STAGING_DIR_NATIVE}
++echo LD_LIBRARY_PATH ${LD_LIBRARY_PATH}
+ ../initdb ../
+
+ make clean
+diff --git a/schema/header-gen/Makefile b/schema/header-gen/Makefile
+index 70b2727..c718cfa 100755
+--- a/schema/header-gen/Makefile
++++ b/schema/header-gen/Makefile
+@@ -1,8 +1,10 @@
+ CC = gcc
+
+-REQUIRED_PKG =
++REQUIRED_PKG =
+ CFLAGS = -g -Wall #-fprofile-arcs -ftest-coverage
+-LDFLAGS =
++CFLAGS += -I${STAGING_DIR_NATIVE}/usr/include/
++LDFLAGS = -L${STAGING_DIR_NATIVE}/lib/
++LDFLAGS += -L${STAGING_DIR_NATIVE}/usr/lib/
+ ifdef REQUIRED_PKG
+ CFLAGS += `pkg-config --cflags $(REQUIRED_PKG)`
+ LDFLAGS += `pkg-config --libs $(REQUIRED_PKG)`
SRC_URI += "\
file://configure.ac.patch \
+ file://dlog.pc.in.patch \
"
do_patch_append () {
echo RLM begining of python do_patch
cat ${WORKDIR}/configure.ac.patch | patch -s -p1 --fuzz=2
+ cat ${WORKDIR}/dlog.pc.in.patch | patch -s -p1 --fuzz=2
}
EXTRA_OECONF_LAST = "--build=${BUILD_SYS} --host=${HOST_SYS}"
\ No newline at end of file