SubDir TOP haiku-on-genode kits app ;

SetupHeadersHoG ;
UsePrivateSystemHeaders ;
SubDirHdrs $(TOP)/haiku-on-genode/headers/private/shared ;  # find AutoLocker.h
SubDirHdrs $(TOP)/haiku-on-genode/kits/app-private ;  # find LaunchRoster.h etc
SubDirHdrs $(TOP)/haiku-on-genode/sys-libroot ;  # find fs_index.h (for Roster.cpp)

SubDirC++Flags
	-Wno-missing-field-initializers
	;


if $(LayerLevel) >= 5
{
	HaikuKit app_kit.a :
		AppDefs.cpp
		Application.cpp
#	##
#	#	AppMisc.cpp
#	##	AppServerLink.cpp
		Cursor.cpp
		Clipboard.cpp
#	##	DesktopLink.cpp
#	##
#	#	DirectMessageTarget.cpp -- moved to kits/app-private !
		Handler.cpp
#	##	InitTerminateLibBe.cpp
		Invoker.cpp
#	##
#	#	LaunchRoster.cpp -- moved to kits/app-private !
#	##	LinkReceiver.cpp
#	##	LinkSender.cpp
		Looper.cpp
		LooperList.cpp
		Message.cpp
	##
	#	MessageAdapter.cpp
		MessageFilter.cpp
		MessageQueue.cpp
		MessageRunner.cpp
		Messenger.cpp
	##
	#	MessageUtils.cpp
	##	Notification.cpp
		PropertyInfo.cpp
	##	PortLink.cpp
	##	RegistrarDefs.cpp
		#Roster.cpp --> special handling, see below
	##	RosterPrivate.cpp
	##
	#	Server.cpp
	##	ServerLink.cpp
	##	ServerMemoryAllocator.cpp
	##
	#	TokenSpace.cpp -- moved to kits/app-private !
		TypeConstants.cpp
	#
	#	# KeyStore implementation
	##	Key.cpp
	##	KeyStore.cpp
		;
}


# Roster.cpp is compiled differently below/above level 7:
# (i.e. there are *two* .o object files, that spares us having to call rule "Always Roster.o", which would slow down builds and be hackish)
#
if $(LayerLevel) >= 7
{
	HaikuKit app_kit.a :
		Roster_lev7-9.cpp
		;
}
else if $(LayerLevel) = 6
{
	#///ToDo: "fossil mv ...to Roster_lev6" since this is ONLY used starting (and ending!) at level 6 build...
	HaikuKit app_kit.a :
		Roster_lev1-6.cpp
		;
}

if $(LayerLevel) >= 9
{
	HaikuKit app_kit.a :
		Notification.cpp
		;
}

