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