1# Makefile.in -- 2# 3# This file is a Makefile for Sample 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-2004 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# RCS: @(#) $Id: Makefile.in,v 1.32 2010/08/17 21:20:26 hobbs Exp $ 16 17#======================================================================== 18# The names of the source files is defined in the configure script. 19# The object files are used for linking into the final library. 20# This will be used when a dist target is added to the Makefile. 21# It is not important to specify the directory, as long as it is the 22# $(srcdir) or in the generic, win or unix subdirectory. 23#======================================================================== 24 25PKG_SOURCES = @PKG_SOURCES@ 26PKG_OBJECTS = @PKG_OBJECTS@ 27 28PKG_STUB_SOURCES = @PKG_STUB_SOURCES@ 29PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@ 30 31#======================================================================== 32# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with 33# this package that need to be installed, if any. 34#======================================================================== 35 36PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ 37 38#======================================================================== 39# This is a list of header files to be installed 40# itk.h includes itclInt.h, which needs itclIntDecls.h, 41# so we must install them. 42#======================================================================== 43 44PKG_HEADERS = @PKG_HEADERS@ 45 46#======================================================================== 47# Nothing of the variables below this line need to be changed. Please 48# check the TARGETS section below to make sure the make targets are 49# correct. 50#======================================================================== 51 52#======================================================================== 53# Change the name of the variable "exampleA_LIB_FILE" to match the one 54# used in the configure script. This is the parameterized name of the 55# library that we are building. 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@ 72datadir = @datadir@ 73mandir = @mandir@ 74includedir = @includedir@ 75 76DESTDIR = 77 78PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) 79pkgdatadir = $(datadir)/$(PKG_DIR) 80pkglibdir = $(libdir)/$(PKG_DIR) 81pkgincludedir = $(includedir)/$(PKG_DIR) 82 83top_builddir = . 84 85INSTALL = @INSTALL@ 86INSTALL_PROGRAM = @INSTALL_PROGRAM@ 87INSTALL_DATA = @INSTALL_DATA@ 88INSTALL_SCRIPT = @INSTALL_SCRIPT@ 89 90PACKAGE_NAME = @PACKAGE_NAME@ 91PACKAGE_VERSION = @PACKAGE_VERSION@ 92CC = @CC@ 93CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ 94CFLAGS_WARNING = @CFLAGS_WARNING@ 95CLEANFILES = @CLEANFILES@ 96EXEEXT = @EXEEXT@ 97LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ 98MAKE_LIB = @MAKE_LIB@ 99MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ 100MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ 101MAKE_STUB_LIB = @MAKE_STUB_LIB@ 102OBJEXT = @OBJEXT@ 103RANLIB = @RANLIB@ 104RANLIB_STUB = @RANLIB_STUB@ 105SHLIB_CFLAGS = @SHLIB_CFLAGS@ 106SHLIB_LD = @SHLIB_LD@ 107SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ 108STLIB_LD = @STLIB_LD@ 109TCL_DEFS = @TCL_DEFS@ 110TCL_BIN_DIR = @TCL_BIN_DIR@ 111TCL_SRC_DIR = @TCL_SRC_DIR@ 112 113# Not used, but retained for reference of what libs Tcl required 114TCL_LIBS = @TCL_LIBS@ 115 116#======================================================================== 117# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our 118# package without installing. The other environment variables allow us 119# to test against an uninstalled Tcl. Add special env vars that you 120# require for testing here (like TCLX_LIBRARY). 121#======================================================================== 122 123EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) 124TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` 125PKG_ENV = ITCL_LIBRARY=`@CYGPATH@ $(srcdir)/library` \ 126 @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ 127 PATH="$(EXTRA_PATH):$(PATH)" \ 128 TCLLIBPATH="$(top_builddir)" 129TCLSH_PROG = $(TCLSH_ENV) @TCLSH_PROG@ 130TCLSH = $(PKG_ENV) $(TCLSH_PROG) 131SHARED_BUILD = @SHARED_BUILD@ 132 133INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ 134 135PKG_CFLAGS = @PKG_CFLAGS@ 136 137DEFS = @DEFS@ $(PKG_CFLAGS) \ 138 -DITCL_LIBRARY=\"$(pkglibdir)\" -DUSE_NON_CONST 139 140CONFIG_CLEAN_FILES = @CONFIG_CLEAN_FILES@ Makefile itclConfig.sh pkgIndex.tcl 141 142CPPFLAGS = @CPPFLAGS@ 143LIBS = @PKG_LIBS@ @LIBS@ 144AR = @AR@ 145CFLAGS = @CFLAGS@ 146COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 147 148#======================================================================== 149# Start of user-definable TARGETS section 150#======================================================================== 151 152#======================================================================== 153# TEA TARGETS. Please note that the "libraries:" target refers to platform 154# independent files, and the "binaries:" target inclues executable programs and 155# platform-dependent libraries. Modify these targets so that they install 156# the various pieces of your package. The make and install rules 157# for the BINARIES that you specified above have already been done. 158#======================================================================== 159 160all: binaries libraries doc 161 162#======================================================================== 163# The binaries target builds executable programs, Windows .dll's, unix 164# shared/static libraries, and any other platform-dependent files. 165# The list of targets to build for "binaries:" is specified at the top 166# of the Makefile, in the "BINARIES" variable. 167#======================================================================== 168 169binaries: $(BINARIES) 170 171libraries: 172 173doc: 174 175install: all install-binaries install-libraries install-doc 176 177install-binaries: binaries install-lib-binaries install-bin-binaries 178 179#======================================================================== 180# This rule installs platform-independent files, such as header files. 181#======================================================================== 182 183install-libraries: libraries 184 @mkdir -p $(DESTDIR)$(includedir) 185 @echo "Installing header files in $(DESTDIR)$(includedir)" 186 @list='$(PKG_HEADERS)'; for i in $$list; do \ 187 echo "Installing $(srcdir)/$$i" ; \ 188 $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ 189 done; 190 191#======================================================================== 192# Install documentation. Unix manpages should go in the $(mandir) 193# directory. 194#======================================================================== 195 196install-doc: doc 197 @mkdir -p $(DESTDIR)$(mandir)/mann 198 @echo "Installing man pages in $(DESTDIR)$(mandir)" 199 @cd $(srcdir)/doc; for i in *.n; do \ 200 echo "Installing $$i"; \ 201 rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \ 202 sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \ 203 $$i > $(DESTDIR)$(mandir)/mann/$$i; \ 204 chmod 444 $(DESTDIR)$(mandir)/mann/$$i; \ 205 done 206 207test: binaries libraries 208 $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` -load "package require Itcl" $(TESTFLAGS) 209 210shell: binaries libraries 211 @$(TCLSH) $(SCRIPT) 212 213gdb: 214 $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) 215 216depend: 217 218#======================================================================== 219# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable 220# mentioned above. That will ensure that this target is built when you 221# run "make binaries". 222# 223# The $(PKG_OBJECTS) objects are created and linked into the final 224# library. In most cases these object files will correspond to the 225# source files above. 226#======================================================================== 227 228$(PKG_LIB_FILE): $(PKG_OBJECTS) 229 -rm -f $(PKG_LIB_FILE) 230 ${MAKE_LIB} 231 $(RANLIB) $(PKG_LIB_FILE) 232 233$(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS) 234 -rm -f $(PKG_STUB_LIB_FILE) 235 ${MAKE_STUB_LIB} 236 $(RANLIB_STUB) $(PKG_STUB_LIB_FILE) 237 238#======================================================================== 239# We need to enumerate the list of .c to .o lines here. 240# 241# In the following lines, $(srcdir) refers to the toplevel directory 242# containing your extension. If your sources are in a subdirectory, 243# you will have to modify the paths to reflect this: 244# 245# exampleA.$(OBJEXT): $(srcdir)/generic/exampleA.c 246# $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/exampleA.c` -o $@ 247# 248# Setting the VPATH variable to a list of paths will cause the makefile 249# to look into these paths when resolving .c to .obj dependencies. 250# As necessary, add $(srcdir):$(srcdir)/compat:.... 251#======================================================================== 252 253VPATH = $(srcdir)/unix:$(srcdir)/generic:$(srcdir)/win 254 255.c.$(OBJEXT): 256 $(COMPILE) -c `@CYGPATH@ $<` -o $@ 257 258#======================================================================== 259# Distribution creation 260# You may need to tweak this target to make it work correctly. 261#======================================================================== 262 263TAR = tar 264#COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar 265COMPRESS = $(TAR) zcvf $(PKG_DIR).tar.gz $(PKG_DIR) 266DIST_ROOT = /tmp/dist 267DIST_DIR = $(DIST_ROOT)/$(PKG_DIR) 268 269dist-clean: 270 rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.* 271 272dist: dist-clean doc 273 mkdir -p $(DIST_DIR) 274 cp -p $(srcdir)/license* $(srcdir)/aclocal.m4 $(srcdir)/configure \ 275 $(srcdir)/*.in $(DIST_DIR)/ 276 chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4 277 chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in 278 279 mkdir $(DIST_DIR)/tclconfig 280 cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \ 281 $(DIST_DIR)/tclconfig/ 282 chmod 664 $(DIST_DIR)/tclconfig/tcl.m4 283 chmod +x $(DIST_DIR)/tclconfig/install-sh 284 285 list='doc generic library tests win win/rc'; \ 286 for p in $$list; do \ 287 if test -d $(srcdir)/$$p ; then \ 288 mkdir $(DIST_DIR)/$$p; \ 289 for q in $(srcdir)/$$p/*; do \ 290 if test -f $$q ; then \ 291 cp -p $$q $(DIST_DIR)/$$p/; \ 292 fi; \ 293 done; \ 294 fi; \ 295 done 296 297 list='CHANGES ChangeLog INCOMPATIBLE README TODO'; \ 298 for p in $$list; do \ 299 if test -f $(srcdir)/../$$p ; then \ 300 cp -p $(srcdir)/../$$p $(DIST_DIR)/; \ 301 fi; \ 302 done 303 304 (cd $(DIST_ROOT); $(COMPRESS);) 305 306#======================================================================== 307# End of user-definable section 308#======================================================================== 309 310#======================================================================== 311# Don't modify the file to clean here. Instead, set the "CLEANFILES" 312# variable in configure.in 313#======================================================================== 314 315clean: 316 -test -z "$(BINARIES)" || rm -f $(BINARIES) 317 -rm -f *.o core *.core 318 -rm -f *.$(OBJEXT) 319 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 320 321distclean: clean 322 -rm -f *.tab.c 323 -rm -f $(CONFIG_CLEAN_FILES) 324 -rm -f config.cache config.log config.status 325 326#======================================================================== 327# Install binary object libraries. On Windows this includes both .dll and 328# .lib files. Because the .lib files are not explicitly listed anywhere, 329# we need to deduce their existence from the .dll file of the same name. 330# Additionally, the .dll files go into the bin directory, but the .lib 331# files go into the lib directory. On Unix platforms, all library files 332# go into the lib directory. In addition, this will generate the pkgIndex.tcl 333# file in the install location (assuming it can find a usable tclsh8.2 shell) 334# 335# You should not have to modify this target. 336#======================================================================== 337 338install-lib-binaries: 339 @mkdir -p $(DESTDIR)$(pkglibdir) 340 @list='$(lib_BINARIES)'; for p in $$list; do \ 341 if test -f $$p; then \ 342 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ 343 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ 344 stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ 345 if test "x$$stub" = "xstub"; then \ 346 echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ 347 $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ 348 else \ 349 echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ 350 $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ 351 fi; \ 352 ext=`echo $$p|sed -e "s/.*\.//"`; \ 353 if test "x$$ext" = "xdll"; then \ 354 lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ 355 if test -f $$lib; then \ 356 echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ 357 $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ 358 fi; \ 359 fi; \ 360 fi; \ 361 done 362 @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 363 if test -f $(srcdir)/$$p; then \ 364 destp=`basename $$p`; \ 365 echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \ 366 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \ 367 fi; \ 368 done 369 $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir) 370 $(INSTALL_DATA) itclConfig.sh $(DESTDIR)$(libdir) 371 372#======================================================================== 373# Install binary executables (e.g. .exe files) 374# 375# You should not have to modify this target. 376#======================================================================== 377 378install-bin-binaries: 379 @mkdir -p $(DESTDIR)$(bindir) 380 @list='$(bin_BINARIES)'; for p in $$list; do \ 381 if test -f $$p; then \ 382 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ 383 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ 384 fi; \ 385 done 386 387.SUFFIXES: .c .$(OBJEXT) 388 389#Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 390# cd $(top_builddir) \ 391# && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status 392 393uninstall-binaries: 394 list='$(lib_BINARIES)'; for p in $$list; do \ 395 rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 396 done 397 list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 398 p=`basename $$p`; \ 399 rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 400 done 401 list='$(bin_BINARIES)'; for p in $$list; do \ 402 rm -f $(DESTDIR)$(bindir)/$$p; \ 403 done 404 405.PHONY: all binaries clean depend distclean doc install libraries test 406 407# Tell versions [3.59,3.63) of GNU make to not export all variables. 408# Otherwise a system limit (for SysV at least) may be exceeded. 409.NOEXPORT: 410