# -*- makefile -*-

# Edit this file to set global include paths,
# compiler info and subdirs

# Directory sturcture
SHELL = @SHELL@
srcdir = @srcdir@
top_builddir = ../../..
top_srcdir = @top_srcdir@
subdir = src/xspice/icm
MKDIR_P = @MKDIR_P@
uname = $(shell uname)

# C compiler to use
CC = @CC@
CFLAGS = @CFLAGS@
VIS_CFLAGS = @VIS_CFLAGS@
EXEEXT = @EXEEXT@
BUILD_EXEEXT = @BUILD_EXEEXT@

# Spice header include path
INCLUDES = -I$(top_builddir)/src/include -I$(top_srcdir)/src/include

# CFLAGS to use here
EXTRA_CFLAGS = -fPIC -Wshadow
DEPFLAGS = -MD -MF
ISMINGW = $(shell uname | grep -c "MINGW32")
ifeq ($(ISMINGW), 1)
  EXTRA_CFLAGS = -Wshadow
endif
ISCYGWIN = $(shell uname | grep -c "CYGWIN")
ifeq ($(ISCYGWIN), 1)
  EXTRA_CFLAGS =
endif
ISSUNOS = $(shell uname | grep -c "SunOS")
ifeq ($(ISSUNOS), 1)
  ifneq "$(CC)" "gcc"
    EXTRA_CFLAGS = -KPIC
    DEPFLAGS = -xMD -xMF
  endif
endif

# Path to the cmpp utility
CMPP = @CMPP@

LIBS = -lm

# Flags to use when linking shared library
LDFLAGS = -shared
ifeq ($(ISMINGW), 1)
  LDFLAGS = -shared @LDFLAGS@
endif
ifeq "$(strip $(uname))" "Darwin"
  LDFLAGS = -bundle -flat_namespace -undefined suppress
endif
ifeq "$(strip $(uname))" "SunOS"
  ifneq "$(CC)" "gcc"
    LDFLAGS = -G
  endif
endif

# Install instructions

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

prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
pkglibdir = $(libdir)/@PACKAGE@
datarootdir = @datarootdir@
datadir = @datadir@
pkgdatadir = $(datadir)/@PACKAGE@

