# file: $(NEDC_NFC)/src/util/shell/Makefile
#
# revision history:
#
# 20221216 (ML): initial version
#
# This Makefile builds all the bash script in this directory and place it
# in ./bin of the root directory
#

# get the current directory of Makefile
#
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
mkfile_dir := $(dir $(mkfile_path))

# set the variable to the root of folder
#
NEDC_NFC=$(realpath $(mkfile_dir)/../../../..)

# define source and object files
#
EEG_ENV = nedc_eeg_resnet_realtime_decode_env.sh
EEG_ENV_BFILE := $(basename $(EEG_ENV))

EEG_DECODE = nedc_eeg_resnet_realtime_decode.sh
EEG_DECODE_BFILE := $(basename $(EEG_DECODE))

# define an installation target
#
install:

	rm -f $(NEDC_NFC)/bin/$(EEG_ENV_BFILE)
	cp -f $(EEG_ENV) $(NEDC_NFC)/bin/$(EEG_ENV_BFILE)
	cd $(NEDC_NFC)/bin; chmod u+rwx,g+rwx,o+rx $(EEG_ENV_BFILE)

	rm -f $(NEDC_NFC)/bin/$(EEG_DECODE_BFILE)
	cp -f $(EEG_DECODE) $(NEDC_NFC)/bin/$(EEG_DECODE_BFILE)
	cd $(NEDC_NFC)/bin; chmod u+rwx,g+rwx,o+rx $(EEG_DECODE_BFILE)

#
# end of file
