INSTALL_DIR=please_set_the_INSTALL_DIR_variable_in_the_top_level_makefile_and_run_make_config

install:
	-mkdir $(INSTALL_DIR)/examples
	cp -r . $(INSTALL_DIR)/examples

config:
	sed "/^INSTALL_DIR=/s;.*;INSTALL_DIR=$(INSTALL_DIR);" de3/counter/makefile > temp; mv temp de3/counter/makefile
	sed "/^INSTALL_DIR=/s;.*;INSTALL_DIR=$(INSTALL_DIR);" de3/summer/makefile > temp; mv temp de3/summer/makefile
	sed "/^INSTALL_DIR=/s;.*;INSTALL_DIR=$(INSTALL_DIR);" de4/counter/makefile > temp; mv temp de4/counter/makefile
	sed "/^INSTALL_DIR=/s;.*;INSTALL_DIR=$(INSTALL_DIR);" de4/summer/makefile > temp; mv temp de4/summer/makefile

clean:
	cd de3/counter; make clean
	cd de3/summer; make clean
	cd de4/counter; make clean
	cd de4/summer; make clean

reallyclean:
	cd de3/counter; make reallyclean
	cd de3/summer; make reallyclean
	cd de4/counter; make reallyclean
	cd de4/summer; make reallyclean
