diff --git a/tools/build-system/launchpad/sflphone-common-video/debian/rules b/tools/build-system/launchpad/sflphone-common-video/debian/rules
index 746a26c75f0736bdb2a36895b9ac3b7b40c9f9d8..53e3a7cb43786ed3f8383569a9be3ded83c84937 100755
--- a/tools/build-system/launchpad/sflphone-common-video/debian/rules
+++ b/tools/build-system/launchpad/sflphone-common-video/debian/rules
@@ -38,7 +38,7 @@ configure-stamp:
 	# Add here commands to configure the package.
 	./autogen.sh
 	./configure --prefix=/usr --enable-video
-	cd libs/pjproject-2.2.1; CFLAGS=-fPIC ./configure $(PJ_CONFIG_OPTIONS)
+	cd libs/pjproject-2.2.1; CFLAGS=-fPIC -O2 -DNDEBUG ./configure $(PJ_CONFIG_OPTIONS)
 	touch configure-stamp
 
 #Architecture
diff --git a/tools/build-system/launchpad/sflphone-common/debian/rules b/tools/build-system/launchpad/sflphone-common/debian/rules
index d6e51e07dd16db467b5decdbc5eafecb8b6359aa..98c0ba8b59eede994eeed1a06359ea94db22ce6f 100755
--- a/tools/build-system/launchpad/sflphone-common/debian/rules
+++ b/tools/build-system/launchpad/sflphone-common/debian/rules
@@ -38,7 +38,7 @@ configure-stamp:
 	# Add here commands to configure the package.
 	./autogen.sh
 	./configure --prefix=/usr
-	cd libs/pjproject-2.2.1; CFLAGS=-fPIC ./configure $(PJ_CONFIG_OPTIONS)
+	cd libs/pjproject-2.2.1; CFLAGS=-fPIC -DNDEBUG -O2 ./configure $(PJ_CONFIG_OPTIONS)
 	touch configure-stamp
 
 #Architecture