SubDir TOP application ;

SubDirSysHdrs [ FDirName $(TOP) ] ;
SubDirSysHdrs [ FDirName $(TOP) libs ] ;
SubDirSysHdrs [ FDirName $(TOP) libs libjabber ] ;
SubDirSysHdrs [ FDirName $(TOP) libs librunview ] ;
SubDirSysHdrs [ FDirName $(TOP) libs libinterface ] ;
SubDirSysHdrs [ FDirName $(OPENSSL_INCLUDE_DIR) ] ;

SEARCH_SOURCE += [ FDirName $(TOP) application preferences ] ;
SEARCH_SOURCE += [ FDirName $(TOP) application views ] ;

Application Caya :
	AboutWindow.cpp
	Account.cpp
	AccountManager.cpp
	CayaProtocolAddOn.cpp
	CayaUtils.cpp
	ChatWindow.cpp
	ContactLinker.cpp
	EditingFilter.cpp
	ImageCache.cpp
	Main.cpp
	MainWindow.cpp
	Notifier.cpp
	ProtocolLooper.cpp
	ProtocolManager.cpp
	ProtocolSettings.cpp
	Server.cpp
	TheApp.cpp
	WindowsManager.cpp

	# preferences
	AccountDialog.cpp
	AccountListItem.cpp
	AccountView.cpp
	CayaPreferences.cpp
	PreferencesDialog.cpp
	PreferencesAccounts.cpp
	PreferencesBehavior.cpp
	PreferencesReplicant.cpp
	PreferencesChatWindow.cpp

	# views
	ContactPopUp.cpp
	SearchBarTextControl.cpp
	NicknameTextControl.cpp
	RosterItem.cpp
	RosterListView.cpp
	ContactInfoWindow.cpp
	StatusMenuItem.cpp
	StatusView.cpp
	CayaRenderView.cpp
	ReplicantStatusView.cpp
	ReplicantMenuItem.cpp
	: be $(TARGET_LIBSTDC++) translation expat
	  libinterface.a librunview.a libsupport.a
	: Caya.rdef
;

Depends Caya : libinterface.a ;
Depends Caya : librunview.a ;
Depends Caya : libsupport.a ;

LINKFLAGS on Caya += -L$(EXPAT_LIBRARY_DIR) ;

InstallBin $(CAYA_DIRECTORY) : Caya ;

InstallFile $(SYSTEM_INCLUDE_DIRECTORY)/caya : CayaConstants.h ;
InstallFile $(SYSTEM_INCLUDE_DIRECTORY)/caya : CayaProtocol.h ;
InstallFile $(SYSTEM_INCLUDE_DIRECTORY)/caya : CayaProtocolMessages.h ;