# Universal build target.
#
# Steve Whiteley, Whiteley Research Inc., 3/13/2014
#
# From the top level, type "util/build all".  The binaries will be
# located in (top)/all/obj/bin.
#
# The parameters below work for most if not all current (March 2014)
# Linux, FreeBSD, and similar operating systems.  However, you may
# need to tweak things and this is the place to do it.  Parameters
# defined here override definitions in the "defaults" file.
#
# Note that you can copy and rename this file to create different
# versions of spice (see the oldconfigs directory for a collection of
# such).  To build type "util/build filename" from the top level, and
# the binaries are created in (top)/filename/obj/bin.

# Note:  You will probably have to install the development version of
# libXaw, which is a bit obscure and obsolete.  Otherwise,
# requirements are pretty standard:  The usual gcc tool chain, and
# development versions of the X11 libraries.

MAKE		= make
CC		= cc
CC_OPT		= -O -g -fno-strict-aliasing -pipe
LDFLAGS		= -lm -lncurses
SYS_CFLAGS	= -Dbsd

# This release contains the standard devices plus:
#   The PS jfet model (jfet2) from Macquarie Univ. (Anthony E. Parker).
#   bsim-4.8.0 bulk mosfet model from UC Berkeley.
#   bsimsoi-4.4 SOI mosfet model from UC Berkeley.
#
DEVICES		= asrc bjt bsim1 bsim2 bsim4 b4soi cap cccs ccvs csw dio \
		  ind isrc jfet jfet2 ltra mes mos1 mos2 mos3 mos6 res sw \
		  tra urc vccs vcvs vsrc

# Use the X11 window system.
INTERFACE_OPTS	= -DWANT_MFB -DWANT_X11
INCX		= -I/usr/include/X11 -I/usr/include/X11/Xaw \
 -I/usr/local/include -I/usr/local/include/X11 -I/usr/local/include/X11/Xaw
LIBX		= -L/usr/local/lib -lXaw -lXt -lXext -lXmu -lX11

# If you don't want X11, comment the three above and uncomment below.
#INTERFACE_OPTS	= -DWANT_MFB
#INCX		=
#LIBX		=

