.PHONY: all
all: gcd/bin/gcd format_bytes/bin/format_bytes format_time/bin/format_time format_time/bin/format_time_ns

.NOTPARALLEL:
format_time/bin/format_time:
	@cd format_time && exec make -s

.NOTPARALLEL:
format_time/bin/format_time_ns:
	@cd format_time && exec make -s

.NOTPARALLEL:
format_bytes/bin/format_bytes:
	@cd format_bytes && exec make -s

.NOTPARALLEL:
gcd/bin/gcd:
	@cd gcd && exec make -s

.NOTPARALLEL:
.PHONY: install
install: gcd/bin/gcd format_bytes/bin/format_bytes format_time/bin/format_time format_time/bin/format_time_ns
	@cp -v compress convertUTF8 extract $^ /usr/bin
	@cd /usr/bin && chmod -v u+x compress convertUTF8 extract gcd format_bytes format_time format_time_ns

.NOTPARALLEL:
.PHONY: uninstall
uninstall:
	@cd /usr/bin && rm -v compress convertUTF8 extract gcd format_bytes format_time format_time_ns

.NOTPARALLEL:
.PHONY: test
test:
	@(cd format_bytes && exec make -s test)
	@(cd format_time && exec make -s test)

.NOTPARALLEL:
.PHONY: cross_test
cross_test:
	@(cd format_bytes && exec make -s cross_test)
	@(cd format_time && exec make -s cross_test)

.NOTPARALLEL:
.PHONY: clean
clean:
	@(cd gcd && exec make -s clean)
	@(cd format_bytes && exec make -s clean)
	@(cd format_time && exec make -s clean)

.NOTPARALLEL:
.PHONY: mrproper
mrproper: clean
	@(cd gcd && exec make -s mrproper)
	@(cd format_bytes && exec make -s mrproper)
	@(cd format_time && exec make -s mrproper)