blob: 3da8a9b6a6b3845d3390f881d6369dfb4e46b126 (
plain) (
blame)
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
|
PACKAGE = mkZiplib
VERSION ?= 10
SHLIB_NAME = ${PACKAGE}${VERSION}.so
SRCS = unzip.c zip.c mkZiplib${VERSION}.c
LOCALBASE ?=/usr/local
TCL_VER ?=8.4
SOBJS= ${SRCS:N*.h:R:S/$/.o/}
TCLCONFIG ?=${LOCALBASE}/lib/tcl${TCL_VER}/tclConfig.sh
TCL_SHLIB_CFLAGS!= . ${TCLCONFIG}; \
echo $$TCL_SHLIB_CFLAGS
TCL_INCLUDE_SPEC!= . ${TCLCONFIG}; \
echo $$TCL_INCLUDE_SPEC
TCL_STUB_LIB_SPEC!= . ${TCLCONFIG}; \
echo $$TCL_STUB_LIB_SPEC
CFLAGS += ${TCL_SHLIB_CFLAGS} ${TCL_INCLUDE_SPEC}
LDFLAGS += ${TCL_STUB_LIB_SPEC} -lz
all: ${SHLIB_NAME}
${SHLIB_NAME}: ${SOBJS}
${CC} ${LDFLAGS} -shared -o ${.TARGET} `lorder ${SOBJS} | tsort -q` ${LDADD}
clean:
@rm -f ${SHLIB_NAME} ${SOBJS}
|