
LOCAL_PATH := $(call my-dir)

##### libUIAPI ################################################################

include $(CLEAR_VARS)

LOCAL_SRC_FILES :=									\
	MessageListener.cpp								\
	MessageListenerActionThread.cpp					\
	Messenger.cpp									\
	MessengerDefs.cpp								\
	UserInteraction.cpp								\
	IPCDaemonEngine.cpp								\
	IPCDaemonEngineActionThread.cpp					\
	ProfileManager.cpp								\
	TestingAPI.cpp

LOCAL_C_INCLUDES += $(ALL_CINCLUDES)
LOCAL_CFLAGS += $(ALL_CFLAGS)

LOCAL_MODULE := UIAPI
include $(BUILD_STATIC_LIBRARY)

##### libOMADMClient ##########################################################

include $(CLEAR_VARS)

LOCAL_SRC_FILES  :=	branding.cpp

LOCAL_C_INCLUDES := $(ALL_CINCLUDES)
LOCAL_CFLAGS     := $(ALL_CFLAGS)
####LOCAL_LDFLAGS := -v

LOCAL_LDLIBS  := 							\
	-L$(OUT_OMADMCLIENT)			\
	-Wl,--whole-archive				\
	-lCommon						\
	-lClientAdapterStub			\
	-lCryptoAPI					\
	-lDataStorage					\
	-lDiagnostics					\
	-lDaemonEngine				\
	-lDaemonUtils					\
	-lExecutionQueue    			\
	-lFifoWrapper     			\
	-lManagementObjects    		\
	-lMOTreeCommands    			\
	-lMOTreeManager    			\
	-lNotificationListener		\
	-lServerExchangeManager		\
	-lTNDSMgmtTree    			\
	-lUIAPI    					\
	-Wl,--no-whole-archive			\
	-L$(OUT_FUNAMBOL)			\
	-L$(OUT_CRYPTO)			\
	-L$(OUT_CURL)				\
	-L$(OUT_WBXML)			\
	-L$(OUT_STLPORT)			\
	-lcrypto				\
	-lcurl					\
	-lfunambol				\
	-lwbxml2				\
	-lstlport_static		\
	-lz                 \
    -llog

LOCAL_MODULE                 := OMADMClient
LOCAL_SHARED_LIBRARIES       := Logger wbxml2
LOCAL_STATIC_LIBRARIES       := crypto curl funambol

# to make dependencies working
LOCAL_STATIC_LIBRARIES += Common ClientAdapterStub CryptoAPI DaemonUtils DataStorage Diagnostics ExecutionQueue FifoWrapper \
							ManagementObjects MOTreeCommands MOTreeManager NotificationListener ServerExchangeManager TNDSMgmtTree	\ 								UIAPI DaemonEngine 

include $(BUILD_SHARED_LIBRARY)

