#! /bin/bash

# Public Domain

. cfg.sh

[ -z "$NPROC" ] && NPROC=nproc

if ((use_build_eld_make))
then
  if (( use_build_eldcomp ))
  then
    make nonlib lib eldcomp -j$("$NPROC")
  else
    make nonlib lib -j$("$NPROC")
  fi
else
for file in eldcomp ldmem history reclaim instnoun \
	di dm rn rm withhdr printf ifext set variable \
	amount amismsg dx list kdisplay config x dtadisp \
	co aformat bases useparat amisoth ldmemoth dbitmap \
	dospwd doscd dosdir dosdrive instnoth path amitsrs \
	extname linfo bootdir amiscmd inject quit dosseek \
	alias dpb rdumpidx rdumpstr checksum hint hintoth \
	chstool s reserve tsc dosspace dosstrat dhm kcmdline \
	errfix rcexec quiet devices sbranch enamelib \
	patchqry \
	extlib extpak
do
  if (( use_build_eldcomp )) || [[ "$file" != eldcomp ]]
  then
    ./makone.sh "$file" "$@"
  fi
done
fi
