ports/graphics/gdtclft/files/Makefile.bsd
Mikhail Teterin 30dd03f651 Catch up once again with bsd.lib.mk -- rename SHLIBDIR to LIBDIR -- to
fix installation/packaging on -current. Default to TCL 8.4 -- still
overwritable.

Submitted by:	kris
2003-10-27 20:11:02 +00:00

44 lines
1.2 KiB
Text

PACKAGE = Gdtclft
VERSION = 2.2
SHLIB_NAME = lib${PACKAGE}2.so.2
SRCS = gdhandle.c gdCmd.c
PREFIX ?=/usr/local
TCL_VER ?=8.2
.if exists(${PREFIX}/lib/tcl${TCL_VER}/tclConfig.sh)
# If for some reason the file does not exist -- make the best guess. In
# reality, it will exist by the time we are actually doing the build, so
# the quality of the guess does not matter. But we still try well. -mi
TCL_STUB_LIB_SPEC!= . ${PREFIX}/lib/tcl${TCL_VER}/tclConfig.sh; \
echo $$TCL_STUB_LIB_SPEC
.else
TCL_STUB_LIB_SPEC= -L${PREFIX}/lib -ltclstub${TCL_VER:S/.//}
.endif
LDADD = -L${PREFIX}/lib -lgd -lpng -lz -lm ${TCL_STUB_LIB_SPEC}
CFLAGS +=-I${PREFIX}/include/tcl${TCL_VER} -I${PREFIX}/include/gd
CFLAGS +=-DNDEBUG -Wall -I. -DUSE_TCL_STUBS -I${PREFIX}/include
CFLAGS +=-DVERSION=\"${VERSION}\"
all: pkgIndex.tcl
pkgIndex.tcl:
echo 'package ifneeded $(PACKAGE) $(VERSION) [list load [file join $$dir $(SHLIB_NAME)] $(PACKAGE)]' > pkgIndex.tcl
DIR = lib/tcl${TCL_VER}/gdtclft
LIBDIR = ${PREFIX}/${DIR}
MANDIR = ${PREFIX}/man/man
${LIBDIR}:
${MKDIR} ${LIBDIR}
env:
@${ECHO} SHLIB_NAME=${SHLIB_NAME} SHLIB_LINK=${SHLIB_LINK} DIR=${DIR}
beforeinstall: ${LIBDIR}
${INSTALL_DATA} pkgIndex.tcl ${LIBDIR}
.include <bsd.lib.mk>