#!/usr/bin/env python3

import sys as _sys
import os as _os
import argparse as _argparse


def main():
	## args
	argument_parser = _argparse.ArgumentParser()
	argument_parser.add_argument(
		"-o",
		"--output-directory",
		type = str,
		default = "/tmp/arc",
		metavar = "<output-directory>",
		help = "output directory",
	)
	args = argument_parser.parse_args()
	
	## exec
	targets = []
	targets.append("_default")
	_os.system(
		"make dir_build=%s --file=tools/makefile %s"
		% (
			args.output_directory,
			" ".join(targets),
		)
	)
	_sys.stdout.write("%s\n" % args.output_directory)
	

main()

