Index: pjproject/trunk/build.mak.in
===================================================================
--- pjproject/trunk/build.mak.in	(revision 5760)
+++ pjproject/trunk/build.mak.in	(revision 5761)
@@ -23,4 +23,12 @@
 ifeq (@ac_shared_libraries@,1)
 export PJ_SHARED_LIBRARIES := 1
+endif
+
+ifndef EXCLUDE_APP
+ifeq ($(findstring android,$(TARGET_NAME)),)
+export EXCLUDE_APP := 0
+else
+export EXCLUDE_APP := 1
+endif
 endif
 
Index: pjproject/trunk/pjlib-util/build/Makefile
===================================================================
--- pjproject/trunk/pjlib-util/build/Makefile	(revision 5760)
+++ pjproject/trunk/pjlib-util/build/Makefile	(revision 5761)
@@ -55,6 +55,7 @@
 export UTIL_TEST_CXXFLAGS += $(_CXXFLAGS)
 export UTIL_TEST_LDFLAGS += $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS)
+ifeq ($(EXCLUDE_APP),0)
 export UTIL_TEST_EXE:=pjlib-util-test-$(TARGET_NAME)$(HOST_EXE)
-
+endif
 	
 export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
Index: pjproject/trunk/pjlib/build/Makefile
===================================================================
--- pjproject/trunk/pjlib/build/Makefile	(revision 5760)
+++ pjproject/trunk/pjlib/build/Makefile	(revision 5761)
@@ -57,6 +57,7 @@
 export TEST_CXXFLAGS += $(_CXXFLAGS)
 export TEST_LDFLAGS += $(PJLIB_LDLIB) $(_LDFLAGS)
+ifeq ($(EXCLUDE_APP),0)
 export TEST_EXE := pjlib-test-$(TARGET_NAME)$(HOST_EXE)
-
+endif
 
 export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
Index: pjproject/trunk/pjmedia/build/Makefile
===================================================================
--- pjproject/trunk/pjmedia/build/Makefile	(revision 5760)
+++ pjproject/trunk/pjmedia/build/Makefile	(revision 5761)
@@ -167,6 +167,7 @@
 			       $(PJLIB_LDLIB) \
 			       $(_LDFLAGS)
+ifeq ($(EXCLUDE_APP),0)
 export PJMEDIA_TEST_EXE:=pjmedia-test-$(TARGET_NAME)$(HOST_EXE)
-
+endif
 	
 export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
Index: pjproject/trunk/pjnath/build/Makefile
===================================================================
--- pjproject/trunk/pjnath/build/Makefile	(revision 5760)
+++ pjproject/trunk/pjnath/build/Makefile	(revision 5761)
@@ -55,6 +55,7 @@
 export PJNATH_TEST_CXXFLAGS += $(_CXXFLAGS)
 export PJNATH_TEST_LDFLAGS += $(PJNATH_LDLIB) $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS)
+ifeq ($(EXCLUDE_APP),0)
 export PJNATH_TEST_EXE:=pjnath-test-$(TARGET_NAME)$(HOST_EXE)
-
+endif
 	
 ###############################################################################
@@ -66,5 +67,7 @@
 export PJTURN_CLIENT_CXXFLAGS += $(_CXXFLAGS)
 export PJTURN_CLIENT_LDFLAGS += $(PJNATH_LDLIB) $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS)
+ifeq ($(EXCLUDE_APP),0)
 export PJTURN_CLIENT_EXE:=pjturn-client-$(TARGET_NAME)$(HOST_EXE)
+endif
 
 ###############################################################################
@@ -77,6 +80,7 @@
 export PJTURN_SRV_CXXFLAGS += $(_CXXFLAGS)
 export PJTURN_SRV_LDFLAGS += $(PJNATH_LDLIB) $(PJLIB_UTIL_LDLIB) $(PJLIB_LDLIB) $(_LDFLAGS)
+ifeq ($(EXCLUDE_APP),0)
 export PJTURN_SRV_EXE:=pjturn-srv-$(TARGET_NAME)$(HOST_EXE)
-
+endif
 	
 	
Index: pjproject/trunk/pjsip-apps/build/Makefile
===================================================================
--- pjproject/trunk/pjsip-apps/build/Makefile	(revision 5760)
+++ pjproject/trunk/pjsip-apps/build/Makefile	(revision 5761)
@@ -32,6 +32,7 @@
 export PJSUA_CXXFLAGS += $(PJ_CXXFLAGS) $(CFLAGS)
 export PJSUA_LDFLAGS += $(PJ_LDFLAGS) $(PJ_LDLIBS) $(LDFLAGS)
+ifeq ($(EXCLUDE_APP),0)
 export PJSUA_EXE:=pjsua-$(TARGET_NAME)$(HOST_EXE)
-
+endif
 
 ###############################################################################
@@ -44,6 +45,7 @@
 export PJSYSTEST_CXXFLAGS += $(PJ_CXXFLAGS) $(CFLAGS)
 export PJSYSTEST_LDFLAGS += $(PJ_LDFLAGS) $(PJ_LDLIBS) $(LDFLAGS)
+ifeq ($(EXCLUDE_APP),0)
 export PJSYSTEST_EXE:=pjsystest-$(TARGET_NAME)$(HOST_EXE)
-
+endif
 
 export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
Index: pjproject/trunk/pjsip-apps/build/Samples.mak
===================================================================
--- pjproject/trunk/pjsip-apps/build/Samples.mak	(revision 5760)
+++ pjproject/trunk/pjsip-apps/build/Samples.mak	(revision 5761)
@@ -51,5 +51,5 @@
 PJSUA2_SAMPLES := pjsua2_demo
 
-ifeq ($(findstring android,$(TARGET_NAME)),)
+ifeq ($(EXCLUDE_APP),0)
 EXES := $(foreach file, $(SAMPLES), $(file)$(HOST_EXE))
 PJSUA2_EXES := $(foreach file, $(PJSUA2_SAMPLES), $(file)$(HOST_EXE))
Index: pjproject/trunk/pjsip/build/Makefile
===================================================================
--- pjproject/trunk/pjsip/build/Makefile	(revision 5760)
+++ pjproject/trunk/pjsip/build/Makefile	(revision 5761)
@@ -166,6 +166,7 @@
 export PJSUA2_TEST_CXXFLAGS = $(_CXXFLAGS) $(PJSUA2_LIB_CFLAGS) 
 export PJSUA2_TEST_LDFLAGS += $(PJ_LDXXFLAGS) $(PJ_LDXXLIBS) $(LDFLAGS)
+ifeq ($(EXCLUDE_APP),0)
 export PJSUA2_TEST_EXE := pjsua2-test-$(TARGET_NAME)$(HOST_EXE)
-
+endif
 export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
 
@@ -196,6 +197,7 @@
 		       $(PJLIB_LDLIB) \
 		       $(_LDFLAGS)
+ifeq ($(EXCLUDE_APP),0)
 export TEST_EXE := pjsip-test-$(TARGET_NAME)$(HOST_EXE)
-
+endif
 	
 export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 
