PACKAGE = Gdtclft VERSION = 2.3 SHLIB_NAME = lib${PACKAGE}2.so.3 SRCS = gdhandle.c gdCmd.c PREFIX ?=/usr/local TCL_VER ?=8.4 WARNS = 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