1SubDir HAIKU_TOP src system glue ;
2
3local architectureObject ;
4for architectureObject in [ MultiArchSubDirSetup ] {
5	on $(architectureObject) {
6		local architecture = $(TARGET_PACKAGING_ARCH) ;
7
8		UsePrivateSystemHeaders ;
9
10		local sources =
11			init_term_dyn.c
12			start_dyn.c
13			haiku_version_glue.c
14			;
15		MergeObject <$(architecture)>glue_common.o : $(sources) ;
16
17		if $(HAIKU_CC_IS_CLANG_$(architecture)) = 1 {
18			MergeObject <$(architecture)>crtbeginS.o : crtbegin.c ;
19			MergeObject <$(architecture)>crtendS.o : crtend.c ;
20			ObjectCcFlags crtbegin.c crtend.c : -DCRT_HAS_INITFINI_ARRAY -DCRT_SHARED ;
21		}
22
23		if $(HAIKU_BUILD_TYPE) = bootstrap {
24			# build a version for stage0 of the bootstrap process
25			BootstrapStage0PlatformObjects [ FGristFiles $(sources) ] : true ;
26		}
27	}
28}
29
30
31local arch ;
32for arch in $(TARGET_ARCHS) {
33	SubInclude HAIKU_TOP src system glue arch $(arch) ;
34}
35