On 27.02.2023 10:53, Michal Orzel wrote: > --- a/xen/Makefile > +++ b/xen/Makefile > @@ -589,7 +589,7 @@ $(TARGET): outputmakefile FORCE > $(Q)$(MAKE) $(build)=. arch/$(TARGET_ARCH)/include/asm/asm-offsets.h > $(Q)$(MAKE) $(build)=. MKRELOC=$(MKRELOC) 'ALL_OBJS=$(ALL_OBJS-y)' > 'ALL_LIBS=$(ALL_LIBS-y)' $@ > > -SUBDIRS = xsm arch/$(TARGET_ARCH) common drivers lib test > +SUBDIRS = xsm arch/$(TARGET_ARCH) common crypto drivers lib test > define all_sources > ( find include -type f -name '*.h' -print; \ > find $(SUBDIRS) -type f -name '*.[chS]' -print )
As long as it's arch/$(TARGET_ARCH) that's used here, crypto should imo also only be included when selected (or at the very least only when an arch might select it, which afaics is possible on x86 only right now). It would also help if in the description you made explicit that SUBDIRS isn't used for anything else (the name, after all, is pretty generic). Which actually points at an issue: I suppose the variable would actually better be used elsewhere as well, e.g. in the _clean: rule and perhaps also in the setting of ALL_OBJS-y. (That'll require splitting the variable, to that e.g. _clean would use $(SUBDIRS), $(SUBDIRS-y), and $(SUBDIRS-) collectively.) It is, imo, that lack of consolidation which has caused crypto to be missing from SUBDIRS. Jan