# -*-mode: makefile; fill-column: 75; tab-width: 8; coding: utf-8-unix -*-

PROG=gridfire
BOX_OS_FLAVOR=`cat /etc/hostname`

cxFreeze:: cxFreeze-$(BOX_OS_FLAVOR)
cxFreeze-$(BOX_OS_FLAVOR):: $(PROG).spec.Linux cxFreeze-$(BOX_OS_FLAVOR)/exe.linux-x86_64-$(PYTHON_MINOR)/$(PROG)

#setup.py::
#	cxfreeze-quickstart

cxFreeze-$(BOX_OS_FLAVOR)/exe.linux-x86_64-$(PYTHON_MINOR)/$(PROG):: $(PROG).py # setup.py
	[ -d build/build-$(BOX_OS_FLAVOR)/cxFreeze-$(BOX_OS_FLAVOR) ] || \
		mkdir -p build/build-$(BOX_OS_FLAVOR)/cxFreeze-$(BOX_OS_FLAVOR)
#	python3.bash setup.py build -b cxFreeze-$(BOX_OS_FLAVOR) 2>&1|tee cxFreeze-$(BOX_OS_FLAVOR)_build.log
#	TypeError: __init__() missing 1 required positional argument: 'constantsModule'
#	cxfreeze --compress $(PROG).py  2>&1|tee cxFreeze-$(BOX_OS_FLAVOR).log
	python3 cxfreeze_main.py -c --zip-include-packages  \* \
		--include-path ${PWD}/pyassuan/bin/ \
		--target-dir build/build-$(BOX_OS_FLAVOR)/cxFreeze-$(BOX_OS_FLAVOR) \
		$(PROG).py 2>&1|tee  build/build-$(BOX_OS_FLAVOR)/cxFreeze-$(BOX_OS_FLAVOR).log
