SubDir HAIKU_TOP src system libroot posix glibc stdio-common ;

SubDirCcFlags -D_GNU_SOURCE -DUSE_IN_LIBIO ;

local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
	on $(architectureObject) {
		local architecture = $(TARGET_PACKAGING_ARCH) ;

		SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc libio ;
		SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch
			$(TARGET_ARCH) ;
		SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include arch
			generic ;
		SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc include ;
		SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc stdio-common ;
		SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ctype ;
		SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc locale ;
		SubDirSysHdrs $(HAIKU_TOP) src system libroot posix glibc ;

		UsePrivateHeaders libroot ;

		MergeObject <$(architecture)>posix_gnu_stdio.o :
			_itoa.c
			_itowa.c
			asprintf.c
			dprintf.c
			fprintf.c
			fxprintf.c
			fscanf.c
			getline.c
			getw.c
			itoa-digits.c
			itoa-udigits.c
			itowa-digits.c
			perror.c
			printf-prs.c
			printf-parsemb.c
			printf-parsewc.c
			printf.c
			printf_fp.c
			printf_fphex.c
			printf_size.c
			putw.c
			reg-printf.c
			scanf.c
			snprintf.c
			sprintf.c
			sscanf.c
			vfprintf.c
#			vfprintf_stub.c
#			vfscanf_stub.c
			vfscanf.c
			vfwprintf.c
			vfwscanf.c
			vprintf.c
			;
	}
}
