# eu_imu/Makefile
# Copyright (C) 2001 Michael Riepe <michael@stud.uni-hannover.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

# $Id: Makefile,v 1.2 2001/11/26 20:08:40 michael Exp $

PACKAGE = f-cpu
VERSION = 0.000

srcdir = .
top_srcdir = ..

topdir = ..
subdir = eu_imu

confdir = $(topdir)
commondir = $(topdir)/common

CONF = $(confdir)/f-cpu_config.vhdl
COMMON = $(commondir)/generic_adder.vhdl
SRCS = misc.vhdl imul64.vhdl imu.vhdl \
	im64test.vhdl im64test2.vhdl im64test3.vhdl
DISTFILES = $(SRCS) Makefile
TESTBENCHES = imul64_test2 imul64_test3

all:;@echo >&2 'No default target!'; exit 1

test: analyze simulate

analyze:
	vhdlp $(CONF) $(COMMON) $(SRCS)

simulate:
	x="$(TESTBENCHES)"; for x in $$x; do \
		vhdle $$x || exit 1; \
	done

clean:
	rm -rf work.sym

distdir = $(PACKAGE)-$(VERSION)
distsubdir = $(topdir)/$(distdir)/$(subdir)

$(distsubdir):
	mkdir $@

dist: $(DISTFILES) $(distsubdir)
	file="$(DISTFILES)"; \
	for file in $$file; do \
		ln $(srcdir)/$$file $(distsubdir) || \
			cp -p $(srcdir)/$$file $(distsubdir) || exit 1; \
	done
