140 lines
3.9 KiB
Makefile
140 lines
3.9 KiB
Makefile
#
|
|
# Copyright (c) 2005 Stephen Williams
|
|
# All rights reserved.
|
|
#
|
|
# Redistribution and use in source and binary forms, with or without
|
|
# modification, are permitted provided that the following conditions
|
|
# are met:
|
|
# 1. Redistributions of source code must retain the above copyright
|
|
# notice, this list of conditions and the following disclaimer.
|
|
# 2. Redistributions in binary form must reproduce the above copyright
|
|
# notice, this list of conditions and the following disclaimer in the
|
|
# documentation and/or other materials provided with the distribution.
|
|
# 3. The name of the author may not be used to endorse or promote products
|
|
# derived from this software without specific prior written permission.
|
|
#
|
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
#
|
|
#ident "$Id: Makefile.in,v 1.1.2.2 2005/09/25 16:35:36 steve Exp $"
|
|
#
|
|
#
|
|
SHELL = /bin/sh
|
|
|
|
VERSION = 0.0
|
|
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
srcdir = @srcdir@
|
|
mandir = @mandir@
|
|
|
|
VPATH = $(srcdir)
|
|
|
|
bindir = @bindir@
|
|
libdir = @libdir@
|
|
includedir = $(prefix)/include
|
|
|
|
CC = @CC@
|
|
INSTALL = @INSTALL@
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
RANLIB = @RANLIB@
|
|
|
|
CPPFLAGS = @ident_support@ -I.. -I$(srcdir) -I$(srcdir)/.. @CPPFLAGS@ @DEFS@ @PICFLAG@
|
|
CFLAGS = -Wall @CFLAGS@
|
|
LDFLAGS = @LDFLAGS@
|
|
|
|
all: dep edif.tgt
|
|
|
|
dep:
|
|
mkdir dep
|
|
|
|
%.o: %.c
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -MD -c $< -o $*.o
|
|
mv $*.d dep
|
|
|
|
D = d-lpm.o d-virtex.o xilinx.o
|
|
O = edif.o device.o target.o gates.o generic.o $D
|
|
|
|
ifeq (@WIN32@,yes)
|
|
TGTLDFLAGS=-L.. -livl
|
|
TGTDEPLIBS=../libivl.a
|
|
else
|
|
TGTLDFLAGS=
|
|
TGTDEPLIBS=
|
|
endif
|
|
|
|
|
|
edif.tgt: tables.o libedif_tgt.a $(TGTDEPLIBS)
|
|
$(CC) @shared@ -o $@ tables.o libedif_tgt.a $(TGTLDFLAGS)
|
|
|
|
libedif_tgt.a: $O
|
|
rm -f libedif_tgt.a
|
|
ar cqv libedif_tgt.a $O
|
|
$(RANLIB) libedif_tgt.a
|
|
|
|
iverilog-edif.ps: $(srcdir)/iverilog-edif.man
|
|
man -t $(srcdir)/iverilog-edif.man > iverilog-edif.ps
|
|
|
|
iverilog-edif.pdf: iverilog-edif.ps
|
|
ps2pdf iverilog-edif.ps iverilog-edif.pdf
|
|
|
|
|
|
Makefile: Makefile.in config.status
|
|
./config.status
|
|
|
|
clean:
|
|
rm -rf *.o dep edif.tgt
|
|
|
|
distclean: clean
|
|
rm -f Makefile config.status config.log config.cache
|
|
rm -rf autom4te.cache
|
|
|
|
check: all
|
|
|
|
ifeq (@WIN32@,yes)
|
|
#INSTALL_DOC = $(prefix)/iverilog-edif.pdf $(mandir)/man1/iverilog-edif.1
|
|
#INSTALL_DOCDIR = $(mandir)/man1
|
|
all: iverilog-edif.pdf
|
|
else
|
|
#INSTALL_DOC = $(mandir)/man1/iverilog-edif.1
|
|
#INSTALL_DOCDIR = $(mandir)/man1
|
|
endif
|
|
|
|
install: all installdirs $(libdir)/ivl/edif.tgt $(INSTALL_DOC) $(libdir)/ivl/edif.conf $(libdir)/ivl/edif-s.conf
|
|
|
|
$(libdir)/ivl/edif.tgt: ./edif.tgt
|
|
$(INSTALL_PROGRAM) ./edif.tgt $(libdir)/ivl/edif.tgt
|
|
|
|
$(libdir)/ivl/edif.conf: $(srcdir)/edif.conf
|
|
$(INSTALL_DATA) $(srcdir)/edif.conf $(libdir)/ivl/edif.conf
|
|
|
|
$(libdir)/ivl/edif-s.conf: $(srcdir)/edif-s.conf
|
|
$(INSTALL_DATA) $(srcdir)/edif-s.conf $(libdir)/ivl/edif-s.conf
|
|
|
|
|
|
$(mandir)/man1/iverilog-edif.1: $(srcdir)/iverilog-edif.man
|
|
$(INSTALL_DATA) $(srcdir)/iverilog-edif.man $(mandir)/man1/iverilog-edif.1
|
|
|
|
$(prefix)/iverilog-edif.pdf: iverilog-edif.pdf
|
|
$(INSTALL_DATA) iverilog-edif.pdf $(prefix)/iverilog-edif.pdf
|
|
|
|
installdirs: ../mkinstalldirs
|
|
$(srcdir)/../mkinstalldirs $(libdir)/ivl
|
|
|
|
uninstall:
|
|
rm -f $(libdir)/ivl/edif.tgt
|
|
rm -f $(INSTALL_DOC)
|
|
rm -f $(libdir)/ivl/edif-s.conf
|
|
rm -f $(libdir)/ivl/edif.conf
|
|
|
|
-include $(patsubst %.o, dep/%.d, $O)
|