SubDir HAIKU_TOP src kits locale ;

AddSubDirSupportedPlatforms libbe_test ;

UsePrivateHeaders libbe locale shared ;
UsePublicHeaders locale storage ;

local sources =
	cat.cpp
	Catalog.cpp
	Collator.cpp
	Country.cpp
	DefaultCatalog.cpp
	FormattingConventions.cpp
	HashMapCatalog.cpp
	Language.cpp
	LibbeLocaleBackend.cpp
	LibraryInit.cpp
	Locale.cpp
	LocaleRoster.cpp
	MutableLocaleRoster.cpp
	TimeZone.cpp

	# in progress
	DateFormat.cpp
	DateTimeFormat.cpp
	DurationFormat.cpp
	TimeFormat.cpp
	TimeUnitFormat.cpp
	Format.cpp # Used by some of the above.
	UnicodeChar.cpp # Already used in ReadOnlyBootPrompt.

	# old, needs investigation
	# Currency.cpp
	# FloatFormat.cpp
	# FloatFormatImpl.cpp
	# FloatFormatParameters.cpp
	# FormatImpl.cpp
	# FormatParameters.cpp
	# GenericNumberFormat.cpp
	# IntegerFormat.cpp
	# IntegerFormatImpl.cpp
	# IntegerFormatParameters.cpp
	# NumberFormat.cpp
	# NumberFormatImpl.cpp
	# NumberFormatParameters.cpp
	;


SubDirSysHdrs $(HAIKU_ICU_HEADERS) ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_ICU_HEADERS_DEPENDENCY) ;
	# Dependency needed to trigger downloading/unzipping the package before
	# compiling the files.

AddResources liblocale.so : CountryFlags.rdef ;

SharedLibrary liblocale.so
	: $(sources)
	: be $(TARGET_LIBSTDC++) $(HAIKU_ICU_LIBS)
	;

StaticLibrary liblocalestub.a
	: CatalogStub.cpp
	;

SEARCH on [ FGristFiles AboutMenuItem.cpp ] += [ FDirName $(HAIKU_TOP) src kits shared ] ;
SEARCH on [ FGristFiles AboutWindow.cpp ] += [ FDirName $(HAIKU_TOP) src kits shared ] ;
SEARCH on [ FGristFiles ColorControl.cpp ] += [ FDirName $(HAIKU_TOP) src kits interface ] ;
SEARCH on [ FGristFiles StringForSize.cpp ] += [ FDirName $(HAIKU_TOP) src kits shared ] ;
SEARCH on [ FGristFiles TextView.cpp ] += [ FDirName $(HAIKU_TOP) src kits interface ] ;
SEARCH on [ FGristFiles Dragger.cpp ] += [ FDirName $(HAIKU_TOP) src kits interface ] ;
SEARCH on [ FGristFiles Menu.cpp ] += [ FDirName $(HAIKU_TOP) src kits interface ] ;
SEARCH on [ FGristFiles PrintJob.cpp ] += [ FDirName $(HAIKU_TOP) src kits interface ] ;
SEARCH on [ FGristFiles ZombieReplicantView.cpp ] += [ FDirName $(HAIKU_TOP) src kits interface ] ;
	
DoCatalogs liblocale.so
	: system
	:
	AboutMenuItem.cpp
	AboutWindow.cpp
	ColorControl.cpp
	Dragger.cpp
	Menu.cpp
	PrintJob.cpp
	StringForSize.cpp
	TextView.cpp
	ZombieReplicantView.cpp
	;
