#
# Copyright (C) 2016 FAUmachine Team <info@faumachine.org>.
# This program is free software. You can redistribute it and/or modify it
# under the terms of the GNU General Public License, either version 2 of
# the License, or (at your option) any later version. See COPYING.
#

FAUM_INST_DIR := $(subst bin/,,$(dir $(shell which faum-node-pc)))
FAUM_DATA_DIR := $(FAUM_INST_DIR)share/faumachine/vhdl/

all:

experiment: simulation.setup system.ic
	faum-node-pc > log.faum-expect 2> log.faum-node.pc
clean distclean::
	rm -f log.faum-expect log.faum-node.pc
	rm -rf node.def

system.ic: system.vhdl
	fauhdlc --lib expect $(FAUM_DATA_DIR)/sigs_and_comps.vhdl \
		--lib expect $(FAUM_DATA_DIR)/expect.vhdl \
		--lib expect system.vhdl \
		-o system.ic
clean distclean::
	rm -f system.ic

simulation.setup:
	ln -sf $(FAUM_DATA_DIR)/simulation.setup .
clean distclean::
	rm -f simulation.setup

