1# Makefile.in -- 2# 3# This file is a Makefile for tkimg TEA Extension. If it has the name 4# "Makefile.in" then it is a template for a Makefile; to generate the 5# actual Makefile, run "./configure", which is a configuration script 6# generated by the "autoconf" program (constructs like "@foo@" will get 7# replaced in the actual Makefile. 8# 9# Copyright (c) 1999 Scriptics Corporation. 10# Copyright (c) 2002-2005 ActiveState Corporation. 11# 12# See the file "license.terms" for information on usage and redistribution 13# of this file, and for a DISCLAIMER OF ALL WARRANTIES. 14 15#======================================================================== 16# Add additional lines to handle any additional AC_SUBST cases that 17# have been added in a customized configure script. 18#======================================================================== 19 20#======================================================================== 21# Nothing of the variables below this line should need to be changed. 22# Please check the TARGETS section below to make sure the make targets 23# are correct. 24#======================================================================== 25 26#======================================================================== 27# The names of the source files is defined in the configure script. 28# The object files are used for linking into the final library. 29# This will be used when a dist target is added to the Makefile. 30# It is not important to specify the directory, as long as it is the 31# $(srcdir) or in the generic, win or unix subdirectory. 32#======================================================================== 33 34PKG_SOURCES = @PKG_SOURCES@ 35PKG_OBJECTS = @PKG_OBJECTS@ 36 37PKG_STUB_SOURCES = @PKG_STUB_SOURCES@ 38PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@ 39 40#======================================================================== 41# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with 42# this package that need to be installed, if any. 43#======================================================================== 44 45PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ 46 47#======================================================================== 48# This is a list of public header files to be installed, if any. 49#======================================================================== 50 51PKG_HEADERS = @PKG_HEADERS@ 52 53#======================================================================== 54# "PKG_LIB_FILE" refers to the library (dynamic or static as per 55# configuration options) composed of the named objects. 56#======================================================================== 57 58PKG_LIB_FILE = @PKG_LIB_FILE@ 59PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ 60 61lib_BINARIES = $(PKG_LIB_FILE) $(PKG_STUB_LIB_FILE) 62BINARIES = $(lib_BINARIES) 63 64SHELL = @SHELL@ 65 66srcdir = @srcdir@ 67prefix = @prefix@ 68exec_prefix = @exec_prefix@ 69 70bindir = @bindir@ 71libdir = @libdir@ 72datarootdir = @datarootdir@ 73datadir = @datadir@ 74mandir = @mandir@ 75includedir = @includedir@ 76 77DESTDIR = 78 79PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) 80pkgdatadir = $(datadir)/$(PKG_DIR) 81pkglibdir = $(libdir)/$(PKG_DIR) 82pkgincludedir = $(includedir)/$(PKG_DIR) 83 84top_builddir = . 85 86INSTALL_OPTIONS = 87INSTALL = $(SHELL) $(srcdir)/../tclconfig/install-sh -c ${INSTALL_OPTIONS} 88INSTALL_DATA_DIR = ${INSTALL} -d -m 755 89INSTALL_PROGRAM = ${INSTALL} -m 755 90INSTALL_DATA = ${INSTALL} -m 644 91INSTALL_SCRIPT = ${INSTALL_PROGRAM} 92INSTALL_LIBRARY = ${INSTALL_DATA} 93 94PACKAGE_NAME = @PACKAGE_NAME@ 95PACKAGE_VERSION = @PACKAGE_VERSION@ 96CC = @CC@ 97CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ 98CFLAGS_WARNING = @CFLAGS_WARNING@ 99CLEANFILES = @CLEANFILES@ 100EXEEXT = @EXEEXT@ 101LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ 102MAKE_LIB = @MAKE_LIB@ 103MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ 104MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ 105MAKE_STUB_LIB = @MAKE_STUB_LIB@ 106OBJEXT = @OBJEXT@ 107RANLIB = @RANLIB@ 108RANLIB_STUB = @RANLIB_STUB@ 109SHLIB_CFLAGS = @SHLIB_CFLAGS@ 110SHLIB_LD = @SHLIB_LD@ 111SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ 112STLIB_LD = @STLIB_LD@ 113TCL_DEFS = @TCL_DEFS@ 114TCL_BIN_DIR = @TCL_BIN_DIR@ 115TCL_SRC_DIR = @TCL_SRC_DIR@ 116# This is necessary for packages that use private Tcl headers 117TCL_TOP_DIR_NATIVE = @TCL_TOP_DIR_NATIVE@ 118# Not used, but retained for reference of what libs Tcl required 119TCL_LIBS = @TCL_LIBS@ 120 121#======================================================================== 122# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our 123# package without installing. The other environment variables allow us 124# to test against an uninstalled Tcl. Add special env vars that you 125# require for testing here (like TCLX_LIBRARY). 126#======================================================================== 127 128EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) 129TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ 130 @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ 131 PATH="$(EXTRA_PATH):$(PATH)" \ 132 TCLLIBPATH="$(libdir)" 133TCLSH_PROG = @TCLSH_PROG@ 134TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) 135SHARED_BUILD = @SHARED_BUILD@ 136 137INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ 138 139PKG_CFLAGS = @PKG_CFLAGS@ 140 141# TCL_DEFS is not strictly need here, but if you remove it, then you 142# must make sure that configure.ac checks for the necessary components 143# that your library may use. TCL_DEFS can actually be a problem if 144# you do not compile with a similar machine setup as the Tcl core was 145# compiled with. 146#DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS) 147DEFS = @DEFS@ $(PKG_CFLAGS) 148 149CONFIG_CLEAN_FILES = Makefile 150 151CPPFLAGS = @CPPFLAGS@ 152LIBS = @PKG_LIBS@ @LIBS@ 153AR = @AR@ 154CFLAGS = @CFLAGS@ -DJPEGTCLAPI=MODULE_SCOPE -I$(srcdir)/../base 155COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 156 157#======================================================================== 158# Start of user-definable TARGETS section 159#======================================================================== 160 161#======================================================================== 162# TEA TARGETS. Please note that the "libraries:" target refers to platform 163# independent files, and the "binaries:" target inclues executable programs and 164# platform-dependent libraries. Modify these targets so that they install 165# the various pieces of your package. The make and install rules 166# for the BINARIES that you specified above have already been done. 167#======================================================================== 168 169all: binaries libraries doc 170 171#======================================================================== 172# The binaries target builds executable programs, Windows .dll's, unix 173# shared/static libraries, and any other platform-dependent files. 174# The list of targets to build for "binaries:" is specified at the top 175# of the Makefile, in the "BINARIES" variable. 176#======================================================================== 177 178binaries: $(BINARIES) pkgIndex.tcl 179 180libraries: 181 182doc: 183 184# Currently no documentation to create, the HTML is part of the 185# distribution. 186# ................................................................. 187# @echo "If you have documentation to create, place the commands to" 188# @echo "build the docs in the 'doc:' target. For example:" 189# @echo " xml2nroff sample.xml > sample.n" 190# @echo " xml2html sample.xml > sample.html" 191 192install: all install-binaries install-libraries install-doc 193 194install-binaries: binaries install-lib-binaries install-bin-binaries 195 196#======================================================================== 197# This rule installs platform-independent files, such as header files. 198#======================================================================== 199 200install-libraries: libraries 201 @$(INSTALL_DATA_DIR) $(DESTDIR)$(includedir) 202 @echo "Installing header files in $(DESTDIR)$(includedir)" 203 @list='$(PKG_HEADERS)'; for i in $$list; do \ 204 echo "Installing $(srcdir)/$$i" ; \ 205 $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ 206 done; 207 208#======================================================================== 209# Install documentation. Unix manpages should go in the $(mandir) 210# directory. 211#======================================================================== 212 213install-doc: doc 214 215# @$(INSTALL_DATA_DIR) $(DESTDIR)$(mandir)/mann 216# @echo "Installing documentation in $(DESTDIR)$(mandir)" 217# @for i in doc/*.n; do \ 218# echo "Installing $$i"; \ 219# rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \ 220# $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ 221# done 222 223test: 224 225shell: binaries libraries 226 @$(TCLSH) $(SCRIPT) 227 228gdb: 229 $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) 230 231depend: 232 233#======================================================================== 234# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable 235# mentioned above. That will ensure that this target is built when you 236# run "make binaries". 237# 238# The $(PKG_OBJECTS) objects are created and linked into the final 239# library. In most cases these object files will correspond to the 240# source files above. 241#======================================================================== 242 243$(PKG_LIB_FILE): $(PKG_OBJECTS) 244 -rm -f $(PKG_LIB_FILE) 245 ${MAKE_LIB} 246 $(RANLIB) $(PKG_LIB_FILE) 247 248$(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS) 249 -rm -f $(PKG_STUB_LIB_FILE) 250 ${MAKE_STUB_LIB} 251 $(RANLIB_STUB) $(PKG_STUB_LIB_FILE) 252 253#======================================================================== 254# We need to enumerate the list of .c to .o lines here. 255# 256# In the following lines, $(srcdir) refers to the toplevel directory 257# containing your extension. If your sources are in a subdirectory, 258# you will have to modify the paths to reflect this: 259# 260# tkimg.$(OBJEXT): $(srcdir)/generic/tkimg.c 261# $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkimg.c` -o $@ 262# 263# Setting the VPATH variable to a list of paths will cause the makefile 264# to look into these paths when resolving .c to .obj dependencies. 265# As necessary, add $(srcdir):$(srcdir)/compat:.... 266#======================================================================== 267 268VPATH = $(srcdir):$(srcdir)/../compat/libjpeg 269 270.c.@OBJEXT@: 271 $(COMPILE) -c `@CYGPATH@ $<` -o $@ 272 273#======================================================================== 274# Create the pkgIndex.tcl file. 275# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but 276# you may find that you need to customize the package. If so, either 277# modify the -hand version, or create a pkgIndex.tcl.in file and have 278# the configure script output the pkgIndex.tcl by editing configure.ac. 279#======================================================================== 280 281pkgIndex.tcl: $(PKG_LIB_FILE) 282 (echo 'package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \ 283 [list load [file join $$dir $(PKG_LIB_FILE)]]'\ 284 ) > pkgIndex.tcl 285 286#======================================================================== 287# Distribution creation 288# You may need to tweak this target to make it work correctly. 289#======================================================================== 290 291#COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar 292COMPRESS = gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR) 293DIST_ROOT = /tmp/dist 294DIST_DIR = $(DIST_ROOT)/$(PKG_DIR) 295 296dist-clean: 297 rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.* 298 299dist: dist-clean doc 300 mkdir -p $(DIST_DIR) 301 cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/doc/license* \ 302 $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \ 303 $(DIST_DIR)/ 304 chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4 305 chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.ac 306 307 mkdir $(DIST_DIR)/tclconfig 308 cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \ 309 $(DIST_DIR)/tclconfig/ 310 chmod 664 $(DIST_DIR)/tclconfig/tcl.m4 311 chmod +x $(DIST_DIR)/tclconfig/install-sh 312 313 -list='htdocs/art demos generic library mac tests unix win tea.tests tools tools/rules'; \ 314 for p in $$list; do \ 315 if test -d $(srcdir)/$$p ; then \ 316 mkdir -p $(DIST_DIR)/$$p; \ 317 cp -p $(srcdir)/$$p/*.* $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \ 318 fi; \ 319 done 320 321 -list='doc'; \ 322 for p in $$list; do \ 323 if test -d $$p ; then \ 324 mkdir -p $(DIST_DIR)/$$p; \ 325 cp -p $$p/*.* $$p/* $(DIST_DIR)/$$p/; \ 326 fi; \ 327 done 328 -mv $(DIST_DIR)/htdocs/art $(DIST_DIR)/doc/art 329 rm -rf $(DIST_DIR)/htdocs 330 331 (cd $(DIST_ROOT); $(COMPRESS);) 332 333dist_orig: 334 rm -rf $(PKG_DIR)* 335 ls -d $(srcdir)/* > __FILES 336 mkdir $(PKG_DIR) 337 cp -rf `cat __FILES | grep -v __FILES` $(PKG_DIR) 338 rm __FILES 339 find $(PKG_DIR) -name CVS -prune -exec rm -rf {} \; 340 cd $(PKG_DIR) ; $(TCLSH_PROG) PREPARE 341 -tar cf - $(PKG_DIR) | gzip --best > $(PKG_DIR).tar.gz 342 -tar cf - $(PKG_DIR) | bzip2 > $(PKG_DIR).tar.bz2 343 -zip -r $(PKG_DIR).zip $(PKG_DIR) 344 rm -rf $(PKG_DIR) 345 346#======================================================================== 347# End of user-definable section 348#======================================================================== 349 350#======================================================================== 351# Don't modify the file to clean here. Instead, set the "CLEANFILES" 352# variable in configure.ac 353#======================================================================== 354 355clean: 356 -test -z "$(BINARIES)" || rm -f $(BINARIES) 357 -rm -f *.$(OBJEXT) core *.core 358 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 359 360distclean: clean 361 -rm -f *.tab.c 362 -rm -f $(CONFIG_CLEAN_FILES) 363 -rm -f config.cache config.log config.status 364 365#======================================================================== 366# Install binary object libraries. On Windows this includes both .dll and 367# .lib files. Because the .lib files are not explicitly listed anywhere, 368# we need to deduce their existence from the .dll file of the same name. 369# Library files go into the lib directory. 370# In addition, this will generate the pkgIndex.tcl 371# file in the install location (assuming it can find a usable tclsh shell) 372# 373# You should not have to modify this target. 374#======================================================================== 375 376install-lib-binaries: 377 @$(INSTALL_DATA_DIR) $(DESTDIR)$(pkglibdir) 378 @list='$(lib_BINARIES)'; for p in $$list; do \ 379 if test -f $$p; then \ 380 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ 381 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ 382 stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ 383 if test "x$$stub" = "xstub"; then \ 384 echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ 385 $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ 386 else \ 387 echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ 388 $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ 389 fi; \ 390 ext=`echo $$p|sed -e "s/.*\.//"`; \ 391 if test "x$$ext" = "xdll"; then \ 392 lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ 393 if test -f $$lib; then \ 394 echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ 395 $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ 396 fi; \ 397 fi; \ 398 fi; \ 399 done 400 @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 401 if test -f $(srcdir)/$$p; then \ 402 destp=`basename $$p`; \ 403 echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \ 404 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \ 405 fi; \ 406 done 407 @if test "x$(SHARED_BUILD)" = "x1"; then \ 408 echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \ 409 $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ 410 fi 411 $(INSTALL_DATA) jpegtclConfig.sh $(DESTDIR)$(libdir) 412 413#======================================================================== 414# Install binary executables (e.g. .exe files and dependent .dll files) 415# This is for files that must go in the bin directory (located next to 416# wish and tclsh), like dependent .dll files on Windows. 417# 418# You should not have to modify this target, except to define bin_BINARIES 419# above if necessary. 420#======================================================================== 421 422install-bin-binaries: 423 @$(INSTALL_DATA_DIR) $(DESTDIR)$(bindir) 424 @list='$(bin_BINARIES)'; for p in $$list; do \ 425 if test -f $$p; then \ 426 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ 427 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ 428 fi; \ 429 done 430 431.SUFFIXES: .c .$(OBJEXT) 432 433Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 434 cd $(top_builddir) \ 435 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status 436 437uninstall-binaries: 438 list='$(lib_BINARIES)'; for p in $$list; do \ 439 rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 440 done 441 list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 442 p=`basename $$p`; \ 443 rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 444 done 445 list='$(bin_BINARIES)'; for p in $$list; do \ 446 rm -f $(DESTDIR)$(bindir)/$$p; \ 447 done 448 449#======================================================================== 450# 451# Target to regenerate header files and stub files from the *.decls tables. 452# 453#======================================================================== 454 455genstubs: 456 $(TCLSH_PROG) \ 457 $(srcdir)/../tools/genStubs.tcl $(srcdir) \ 458 $(srcdir)/jpegtcl.decls 459 460#======================================================================== 461# 462# Target to check that all exported functions have an entry in the stubs 463# tables. 464# 465#======================================================================== 466 467jpegtcl_DECLS = \ 468 $(srcdir)/jpegtcl.decls 469 470checkstubs: 471 -@for i in `nm -p $(PKG_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \ 472 | sort -n`; do \ 473 match=0; \ 474 for j in $(jpegtcl_DECLS); do \ 475 if [ `grep -c $$i $$j` -gt 0 ]; then \ 476 match=1; \ 477 fi; \ 478 done; \ 479 if [ $$match -eq 0 ]; then echo $$i; fi \ 480 done 481 482 483.PHONY: all binaries clean depend distclean doc install libraries test 484 485# Tell versions [3.59,3.63) of GNU make to not export all variables. 486# Otherwise a system limit (for SysV at least) may be exceeded. 487.NOEXPORT: 488