The package links the base system's curses (CURSES_LIB), and the Makefile defaults CURSES_DEP to CURSES_LIB for the vendored tree -- an empty assignment keeps that default from applying.
55 lines
2.3 KiB
Makefile
55 lines
2.3 KiB
Makefile
# $NetBSD$
|
|
#
|
|
# Makronix: splinter is the project's own C99/POSIX agent harness
|
|
# (ext/src/splinter, IMPORT). It is built from the archive tools/ext-dist.sh
|
|
# makes out of ext/src/splinter, so there is no MASTER_SITES.
|
|
|
|
DISTNAME= splinter-0.1
|
|
CATEGORIES= misc
|
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
|
|
|
|
MAINTAINER= lotherk@lother.io
|
|
COMMENT= C99/POSIX agent harness with a curses interface
|
|
LICENSE= modified-bsd
|
|
|
|
# The top Makefile is POSIX make; it runs the vendored NetBSD curses through
|
|
# $(MAKE) -f GNUmakefile, which is GNU make. The build host's GNU make is
|
|
# what USE_TOOLS brings; the target compiler comes from pkgsrc's wrappers.
|
|
USE_TOOLS+= gmake
|
|
MAKE_PROGRAM= ${GMAKE}
|
|
|
|
NO_CONFIGURE= yes
|
|
NO_BUILDLINK= yes
|
|
BUILD_TARGET= all
|
|
INSTALL_TARGET= install
|
|
|
|
MAKE_FLAGS+= PREFIX=${PREFIX}
|
|
MAKE_FLAGS+= DESTDIR=${DESTDIR}
|
|
|
|
# splinter's Makefile has its own CFLAGS default: the dialect, the include
|
|
# paths of the source tree and -fPIC. A CFLAGS on the command line replaces
|
|
# that default, so the package's flags are appended here. No -Werror: a
|
|
# warning in the distribution is not a reason to stop the build. One line
|
|
# and escaped spaces: a continuation ate the space before -fPIC (measured
|
|
# 2026-11-17: "make: PIC -Iinclude ... No such file or directory").
|
|
SPL_CFLAGS= -std=c99\ -D_POSIX_C_SOURCE=200809L\ -D_XOPEN_SOURCE=700\ -D_NETBSD_SOURCE\ -fPIC\ -Iinclude\ -Isrc/backend\ -Isrc/frontend\ -Ivendor/libmcp\ -Ivendor/netbsd-curses/libcurses
|
|
MAKE_FLAGS+= CFLAGS=${CFLAGS:Q}\ ${SPL_CFLAGS}
|
|
|
|
# libsplinter.so is what the binaries and the plugins link against
|
|
LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib
|
|
MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q}
|
|
MAKE_FLAGS+= LIBS=-lpthread
|
|
|
|
# NetBSD's own curses, not the vendored copy: the base system has libcurses
|
|
# and libterminfo, and linking them keeps the package small and the build
|
|
# free of tools that must run while it builds (the vendored tree's nbperf is
|
|
# a target binary in a cross build). The project's Linux build keeps the
|
|
# vendored default (Konrad, 2026-11-17: "nur auf linux eigenes curses").
|
|
MAKE_FLAGS+= CURSES_LIB=-lcurses\ -lterminfo
|
|
# Empty: nothing in the source tree has to be built before linking. The
|
|
# Makefile defaults it to $(CURSES_LIB) for the vendored tree.
|
|
MAKE_FLAGS+= CURSES_DEP=""
|
|
|
|
.include "../../mk/pthread.buildlink3.mk"
|
|
.include "../../mk/bsd.pkg.mk"
|