# $NetBSD: Makefile.common,v 1.4 2024/08/05 13:11:06 tnn Exp $
#
# used by can/ng-spice
# used by can/ng-spice-shared

VERSION=	40
DISTNAME=	ngspice-${VERSION}
CATEGORIES=	cad
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=ngspice/}

DISTINFO_FILE=  ${.CURDIR}/../../cad/ng-spice/distinfo

MAINTAINER=	dmcmahill@NetBSD.org
HOMEPAGE=	http://ngspice.sourceforge.net/
LICENSE=	modified-bsd AND gnu-lgpl-v2.1 AND gnu-gpl-v2 AND mpl-2.0

USE_LIBTOOL=		YES
USE_TOOLS+=		gmake
USE_LANGUAGES=		c c++

GNU_CONFIGURE=		YES
CONFIGURE_ARGS+=	--disable-debug

# error: 'for' loop initial declarations are only allowed in C99 mode
FORCE_C_STD=		c99

CFLAGS.Linux+=		-D_POSIX_C_SOURCE=200809L       # fileno(3)
# should be _XOPEN_SOURCE, but glibc hides usleep with _POSIX_C_SOURCE.
CFLAGS.Linux+=		-D_DEFAULT_SOURCE=1             # usleep(3)
