head	1.4;
access;
symbols;
locks; strict;
comment	@# @;


1.4
date	99.01.31.11.48.26;	author ryu;	state Exp;
branches;
next	1.3;

1.3
date	99.01.29.08.50.47;	author ryu;	state Exp;
branches;
next	1.2;

1.2
date	99.01.29.08.49.48;	author ryu;	state Exp;
branches;
next	1.1;

1.1
date	99.01.19.08.08.28;	author ryu;	state Exp;
branches;
next	;


desc
@#	$Id: Makefile,v 1.1 1999/01/19 07:52:15 ryu Exp ryu $
@


1.4
log
@making syn
@
text
@#	$Id: Makefile.master,v 1.3 1999/01/29 08:50:47 ryu Exp ryu $

#	Copyright (C) 1999 Robert K. Yu
#	email: robert@@yu.org

#	This file is part of Autochar.

#	Autochar 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, or (at your option)
#	any later version.

#	Autochar 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 Autochar; see the file COPYING.  If not, write to the
#	Free Software Foundation, Inc., 59 Temple Place - Suite 330,
#	Boston, MA 02111-1307, USA.

# Optional:
#RUNDIR		=

AC_CMD		= autochar
AC_FLAGS	= -s				# debug OFF
#AC_FLAGS	= -s -D				# debug ON
CELLS		= $(RUNDIR)/cells

LIBNAME		= stdcells
CELL		=
TYPE		=

SPECS		= $(RUNDIR)/specs
SYN_HEADER	= $(SPECS)/header.lib
SYN_OUT		= $(LIBNAME).lib

include $(CELLS)

### Targets ####################################################################

usage:
	@@echo "Usage: make <target> [ |& tee make.log & ]"
	@@echo "% make char    [TYPE=type][CELL=name]  ... run autochar"
	@@echo "% make syn                             ... create synopsys library $(SYN_OUT)"
	@@echo "% make tidy    [TYPE=type][CELL=name]  ... remove some outputs"
	@@echo "% make clean   [TYPE=type][CELL=name]  ... remove all outputs"
	@@echo
	@@echo "available types = ALL AND AOI BUF DFF INV LATCH MUX NAND NOR OAI OR XNOR XOR"


char:
	-for i in $($(TYPE)) $(CELL); do \
	    make char_one CELL=$$i; \
	done

syn:
	cat $(SYN_HEADER) */*.lib > $(SYN_OUT)
	echo "}" >> $(SYN_OUT)

tidy:
	-for i in $($(TYPE)) $(CELL); do \
	    make tidy_one CELL=$$i; \
	done

clean:
	-for i in $($(TYPE)) $(CELL); do \
	    make clean_one CELL=$$i; \
	done


### Nuts and Bolts #############################################################

tidy_one:
	-(cd $(CELL); rm -rf *.mt* *.pa* *.st* *.ic *.log)

clean_one:
	-(cd $(CELL); rm -rf *.mt* *.pa* *.st* *.ic *.tr* *.out *.rpt *.log *.raw)

char_one: $(CELL)/$(CELL).rpt

$(CELL)/$(CELL).rpt : $(CELL)/$(CELL).sp
	(cd $(CELL); $(AC_CMD) $(AC_FLAGS) -c $(CELL) -o $(CELL).rpt $(SPECS)/$(LIBNAME).spec)

$(CELL)/$(CELL).sp :
	-mkdir $(CELL)
	# Create/extract the spice netlist.
@


1.3
log
@typo
@
text
@d1 1
a1 1
#	$Id: Makefile.master,v 1.2 1999/01/29 08:49:48 ryu Exp ryu $
d59 1
a59 1
	cat $(SYN_HEADER) s_*/*.lib > $(SYN_OUT)
@


1.2
log
@Added .log and .raw
@
text
@d1 1
a1 1
#	$Id: Makefile.master,v 1.1 1999/01/19 08:08:28 ryu Exp ryu $
d79 1
a79 1
	-(cd $(CELL); rm -rf *.mt* *.pa* *.st* *.ic *.tr* *.out *.rpt .log *.raw)
@


1.1
log
@entered into RCS
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.1 1999/01/19 07:52:15 ryu Exp ryu $
d27 2
a28 1
AC_FLAGS	= -s
d76 1
a76 1
	-(cd $(CELL); rm -rf *.mt* *.pa* *.st* *.ic)
d79 1
a79 1
	-(cd $(CELL); rm -rf *.mt* *.pa* *.st* *.ic *.tr* *.out *.rpt)
d83 1
a83 1
$(CELL)/$(CELL).rpt :
d85 4
@