# Apple OS X build target.
#
# Steve Whiteley, Whiteley Research Inc., 9/20/2015
#
# This is a variation for OS X with Macports X11 installed it its
# default location /opt/X11.
#
# To build, you will need xcode and the command line tools (from
# Apple) installed.  You'll new the xorg-libXaw port installed (or
# equivalent).  To run, you will need an X server (XQuartz from
# Apple).
#
# sudo port install xorg-libXaw
# From the top level, type "./util/build osx".  The binaries will be
# located in (top)/osx/obj/bin.
#
# The Spice3 tree contains some hideous old-style code, that contained
# constructs that would not compile with clang.  I fixed these, so it
# builds under xcode-7, but someone with the time might like to
# convert this to ASCII C someday, and give each function an explicit
# return type.


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/opt/X11/Include -I/opt/X11/include/X11 -I/opt/X11/include/X11/Xaw
LIBX		= -L/opt/X11/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		=

