summaryrefslogtreecommitdiff
path: root/graphics/libimg/files/Makefile.tkstep80
blob: a7bfdb7f30e8569f0f93e5b4659a4059ed151a0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
SHLIB_NAME?=	libimg.so.1

PORTVERSION?=	1.2.4
LOCALBASE?=	/usr/local
X11BASE?=	/usr/X11R6
TCL_VER?=	8.0

LDADD=		-lm -lz -L${LOCALBASE}/lib -lpng -ljpeg -ltiff \
		-L${X11BASE}/lib -lX11

CFLAGS+=	-I${LOCALBASE}/include/tcl${TCL_VER}
CFLAGS+=	-I${LOCALBASE}/include/tcl${TCL_VER}/generic
CFLAGS+=	-D__X11__ -I${X11BASE}/include -DALLOW_B64
CFLAGS+=	-I${LOCALBASE}/include/tkstep${TCL_VER}
CFLAGS+=	-DNDEBUG -Wall -I.
CFLAGS+=	-DVERSION=\"${PORTVERSION}\" -I${LOCALBASE}/include
CFLAGS+=	-DHAVE_JPEGLIB_H -DHAVE_TIFF_H -DHAVE_DLFCN_H -DHAVE_IMG_H

all: pkgIndex.tcl

pkgIndex.tcl: pkgIndex.tcl.in
	sed -e 's,@IMG_PATCH_LEVEL@,${PORTVERSION},g' \
		-e 's,@IMG_SHARED_LIB_FILE@,../${SHLIB_NAME},g' \
		< pkgIndex.tcl.in > pkgIndex.tcl

DIR?		= lib/Img1.2
INSTDIR		= ${LOCALBASE}/${DIR}
LIBDIR		= ${LOCALBASE}/lib

${INSTDIR} ${INSTDIR}/msgs:
	${MKDIR} $@

beforeinstall: ${INSTDIR} ${INSTDIR}/msgs
	${INSTALL_DATA} pkgIndex.tcl ${.CURDIR}/demo.tcl ${.CURDIR}/tkv.tcl \
		${.CURDIR}/imgmsg.tcl ${INSTDIR}
	${INSTALL_DATA} ${.CURDIR}/msgs/* ${INSTDIR}/msgs/

environ:
	@${ECHO} SHLIB_NAME=${SHLIB_NAME} SHLIB_LINK=${SHLIB_LINK} DIR=${DIR}

#		fundamentals of this library
SRCS	=	imgInit.c imgObj.c imgUtil.c imgPmap.c imgUnixPmap.c \
		imgBMP.c imgGIF.c imgJPEG.c imgPNG.c imgPS.c \
		imgTIFF.c \
		imgWindow.c imgXBM.c imgXPM.c

test:	$(SHLIB_NAME)
	PATH=${TK_BIN_DIR}:${PATH}; export PATH; \
	TCLLIBPATH=`pwd`; export TCLLIBPATH; \
	export SHLIB_PATH; \
	LD_LIBRARY_PATH=`pwd`; \
	export LD_LIBRARY_PATH; \
	wish${TCL_VER} demo.tcl

.include <bsd.lib.mk>