#
#    This source code is free software; you can redistribute it
#    and/or modify it in source code form under the terms of the GNU
#    Library 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 Library General Public License for more details.
#
#    You should have received a copy of the GNU Library 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
#
#ident "$Id: Makefile.in,v 1.7 2004/10/13 22:01:34 steve Exp $"
#
#
SHELL = /bin/sh

VERSION = 0.8

prefix = @prefix@
exec_prefix = @exec_prefix@
srcdir = @srcdir@

VPATH = $(srcdir)

bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
includedir = $(prefix)/include
mandir = @mandir@

dllib=@DLLIB@

CC = @CC@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

CPPFLAGS = @ident_support@ -I. -I$(srcdir)/.. -DVERSION='"$(VERSION)"' @CPPFLAGS@ @DEFS@
CFLAGS = -Wall @CFLAGS@
LDFLAGS = @LDFLAGS@

all: iverilog-vpi@EXEEXT@

clean:
	rm -f *.o
	rm -f iverilog-vpi@EXEEXT@

distclean: clean
	rm -f Makefile

O = main.o res.o

iverilog-vpi@EXEEXT@: $O
	$(CC) $(LDFLAGS) $O -o iverilog-vpi@EXEEXT@ @EXTRALIBS@


main.o: main.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -c $(srcdir)/main.c

# Windows specific...
res.o: res.rc
	windres -i res.rc -o res.o
#

install: all installdirs $(bindir)/iverilog-vpi@EXEEXT@

$(bindir)/iverilog-vpi@EXEEXT@: ./iverilog-vpi@EXEEXT@
	$(INSTALL_PROGRAM) ./iverilog-vpi@EXEEXT@ $(bindir)/iverilog-vpi@EXEEXT@

installdirs: ../mkinstalldirs
	$(srcdir)/../mkinstalldirs $(bindir)

uninstall:
	rm -f $(bindir)/iverilog-vpi@EXEEXT@
