1342175Scy# Makefile.in --
2342175Scy#
3342175Scy#	This file is a Makefile for Sample TEA Extension.  If it has the name
4342175Scy#	"Makefile.in" then it is a template for a Makefile;  to generate the
5342175Scy#	actual Makefile, run "./configure", which is a configuration script
6342175Scy#	generated by the "autoconf" program (constructs like "@foo@" will get
7342175Scy#	replaced in the actual Makefile.
8342175Scy#
9342175Scy# Copyright (c) 1999 Scriptics Corporation.
10342175Scy# Copyright (c) 2002-2005 ActiveState Corporation.
11342175Scy#
12342175Scy# See the file "license.terms" for information on usage and redistribution
13342175Scy# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
14342175Scy#
15342175Scy# RCS: @(#) $Id: Makefile.in,v 1.59 2005/07/26 19:17:02 mdejong Exp $
16342175Scy
17342175Scy#========================================================================
18342175Scy# Add additional lines to handle any additional AC_SUBST cases that
19342175Scy# have been added in a customized configure script.
20342175Scy#========================================================================
21342175Scy
22342175Scy#SAMPLE_NEW_VAR	= @SAMPLE_NEW_VAR@
23342175Scy
24342175Scy#========================================================================
25342175Scy# Nothing of the variables below this line should need to be changed.
26342175Scy# Please check the TARGETS section below to make sure the make targets
27342175Scy# are correct.
28342175Scy#========================================================================
29342175Scy
30342175Scy#========================================================================
31342175Scy# The names of the source files is defined in the configure script.
32342175Scy# The object files are used for linking into the final library.
33342175Scy# This will be used when a dist target is added to the Makefile.
34342175Scy# It is not important to specify the directory, as long as it is the
35342175Scy# $(srcdir) or in the generic, win or unix subdirectory.
36342175Scy#========================================================================
37342175Scy
38342175ScyPKG_SOURCES	= @PKG_SOURCES@
39342175ScyPKG_OBJECTS	= @PKG_OBJECTS@
40342175Scy
41342175ScyPKG_STUB_SOURCES = @PKG_STUB_SOURCES@
42342175ScyPKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@
43342175Scy
44342175Scy#========================================================================
45342175Scy# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
46342175Scy# this package that need to be installed, if any.
47342175Scy#========================================================================
48342175Scy
49342175ScyPKG_TCL_SOURCES = @PKG_TCL_SOURCES@
50342175Scy
51342175Scy#========================================================================
52342175Scy# This is a list of public header files to be installed, if any.
53342175Scy#========================================================================
54342175Scy
55342175ScyPKG_HEADERS	= @PKG_HEADERS@
56342175Scy
57342175Scy#========================================================================
58342175Scy# "PKG_LIB_FILE" refers to the library (dynamic or static as per
59342175Scy# configuration options) composed of the named objects.
60342175Scy#========================================================================
61342175Scy
62342175ScyPKG_LIB_FILE	= @PKG_LIB_FILE@
63342175ScyPKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
64342175Scy
65342175Scylib_BINARIES	= $(PKG_LIB_FILE)
66342175ScyBINARIES	= $(lib_BINARIES)
67342175Scy
68342175ScySHELL		= @SHELL@
69342175Scy
70342175Scysrcdir		= @srcdir@
71342175Scyprefix		= @prefix@
72342175Scyexec_prefix	= @exec_prefix@
73342175Scy
74342175Scybindir		= @bindir@
75342175Scylibdir		= @libdir@
76342175Scydatarootdir	= @datarootdir@
77342175Scydatadir		= @datadir@
78342175Scymandir		= @mandir@
79342175Scyincludedir	= @includedir@
80342175Scy
81342175ScyDESTDIR		=
82342175Scy
83342175ScyPKG_DIR		= $(PACKAGE_NAME)$(PACKAGE_VERSION)
84342175Scypkgdatadir	= $(datadir)/$(PKG_DIR)
85342175Scypkglibdir	= $(libdir)/$(PKG_DIR)
86342175Scypkgincludedir	= $(includedir)/$(PKG_DIR)
87342175Scy
88342175Scytop_builddir	= .
89342175Scy
90342175ScyINSTALL		= @INSTALL@
91342175ScyINSTALL_PROGRAM	= @INSTALL_PROGRAM@
92342175ScyINSTALL_DATA	= @INSTALL_DATA@
93342175ScyINSTALL_SCRIPT	= @INSTALL_SCRIPT@
94342175Scy
95342175ScyPACKAGE_NAME	= @PACKAGE_NAME@
96342175ScyPACKAGE_VERSION	= @PACKAGE_VERSION@
97342175ScyCC		= @CC@
98342175ScyCFLAGS_DEFAULT	= @CFLAGS_DEFAULT@
99342175ScyCFLAGS_WARNING	= @CFLAGS_WARNING@
100342175ScyCLEANFILES	= @CLEANFILES@
101342175ScyEXEEXT		= @EXEEXT@
102342175ScyLDFLAGS_DEFAULT	= @LDFLAGS_DEFAULT@
103342175ScyMAKE_LIB	= @MAKE_LIB@
104342175ScyMAKE_SHARED_LIB	= @MAKE_SHARED_LIB@
105342175ScyMAKE_STATIC_LIB	= @MAKE_STATIC_LIB@
106342175ScyMAKE_STUB_LIB	= @MAKE_STUB_LIB@
107342175ScyOBJEXT		= @OBJEXT@
108342175ScyRANLIB		= @RANLIB@
109342175ScyRANLIB_STUB	= @RANLIB_STUB@
110342175ScySHLIB_CFLAGS	= @SHLIB_CFLAGS@
111342175ScySHLIB_LD	= @SHLIB_LD@
112342175ScySHLIB_LD_LIBS	= @SHLIB_LD_LIBS@
113342175ScySTLIB_LD	= @STLIB_LD@
114342175Scy#TCL_DEFS	= @TCL_DEFS@
115342175ScyTCL_BIN_DIR	= @TCL_BIN_DIR@
116342175ScyTCL_SRC_DIR	= @TCL_SRC_DIR@
117342175Scy#TK_BIN_DIR	= @TK_BIN_DIR@
118342175Scy#TK_SRC_DIR	= @TK_SRC_DIR@
119342175Scy
120342175Scy# This is no longer necessary even for packages that use private Tcl headers
121342175Scy#TCL_TOP_DIR_NATIVE	= @TCL_TOP_DIR_NATIVE@
122342175Scy# Not used, but retained for reference of what libs Tcl required
123342175Scy#TCL_LIBS	= @TCL_LIBS@
124342175Scy
125342175Scy#========================================================================
126342175Scy# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
127342175Scy# package without installing.  The other environment variables allow us
128342175Scy# to test against an uninstalled Tcl.  Add special env vars that you
129342175Scy# require for testing here (like TCLX_LIBRARY).
130342175Scy#========================================================================
131342175Scy
132342175ScyEXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR)
133342175Scy#EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
134342175ScyTCLLIBPATH	= $(top_builddir)
135342175ScyTCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
136342175Scy		  @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
137342175Scy		  PATH="$(EXTRA_PATH):$(PATH)" \
138342175Scy		  TCLLIBPATH="$(TCLLIBPATH)"
139342175Scy#		  TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`
140342175Scy
141342175ScyTCLSH_PROG	= @TCLSH_PROG@
142342175ScyTCLSH	= $(TCLSH_ENV) $(TCLSH_PROG)
143342175Scy
144342175Scy#WISH_PROG	= @WISH_PROG@
145342175Scy#WISH	= $(TCLSH_ENV) $(WISH_PROG)
146342175Scy
147342175Scy
148342175ScySHARED_BUILD	= @SHARED_BUILD@
149342175Scy
150342175ScyINCLUDES	= @PKG_INCLUDES@ @TCL_INCLUDES@ -I$(srcdir)/..
151342175Scy#INCLUDES	= @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
152342175Scy
153342175ScyPKG_CFLAGS	= @PKG_CFLAGS@
154342175Scy
155342175Scy# TCL_DEFS is not strictly need here, but if you remove it, then you
156342175Scy# must make sure that configure.in checks for the necessary components
157342175Scy# that your library may use.  TCL_DEFS can actually be a problem if
158342175Scy# you do not compile with a similar machine setup as the Tcl core was
159342175Scy# compiled with.
160342175Scy#DEFS		= $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
161342175ScyDEFS		= @DEFS@ $(PKG_CFLAGS)
162342175Scy
163342175ScyCONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
164342175Scy
165342175ScyCPPFLAGS	= @CPPFLAGS@
166342175ScyLIBS		= @PKG_LIBS@ @LIBS@
167342175ScyAR		= @AR@
168342175ScyCFLAGS		= @CFLAGS@
169342175ScyCOMPILE		= $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
170342175Scy
171342175Scy#========================================================================
172342175Scy# Start of user-definable TARGETS section
173342175Scy#========================================================================
174342175Scy
175342175Scy#========================================================================
176342175Scy# TEA TARGETS.  Please note that the "libraries:" target refers to platform
177342175Scy# independent files, and the "binaries:" target inclues executable programs and
178342175Scy# platform-dependent libraries.  Modify these targets so that they install
179342175Scy# the various pieces of your package.  The make and install rules
180342175Scy# for the BINARIES that you specified above have already been done.
181342175Scy#========================================================================
182342175Scy
183342175Scyall: binaries libraries doc
184342175Scy
185342175Scy#========================================================================
186342175Scy# The binaries target builds executable programs, Windows .dll's, unix
187342175Scy# shared/static libraries, and any other platform-dependent files.
188342175Scy# The list of targets to build for "binaries:" is specified at the top
189342175Scy# of the Makefile, in the "BINARIES" variable.
190342175Scy#========================================================================
191342175Scy
192342175Scybinaries: $(BINARIES)
193342175Scy
194342175Scylibraries:
195342175Scy
196342175Scy
197342175Scy#========================================================================
198342175Scy# Your doc target should differentiate from doc builds (by the developer)
199342175Scy# and doc installs (see install-doc), which just install the docs on the
200342175Scy# end user machine when building from source.
201342175Scy#========================================================================
202342175Scy
203342175Scydoc:
204342175Scy	@echo "If you have documentation to create, place the commands to"
205342175Scy	@echo "build the docs in the 'doc:' target.  For example:"
206342175Scy	@echo "        xml2nroff sample.xml > sample.n"
207342175Scy	@echo "        xml2html sample.xml > sample.html"
208342175Scy
209342175Scyinstall: all install-binaries install-libraries install-doc
210342175Scy
211342175Scyinstall-binaries: binaries install-lib-binaries install-bin-binaries
212342175Scy
213342175Scy#========================================================================
214342175Scy# This rule installs platform-independent files, such as header files.
215342175Scy# The list=...; for p in $$list handles the empty list case x-platform.
216342175Scy#========================================================================
217342175Scy
218342175Scyinstall-libraries: libraries
219342175Scy	@mkdir -p $(DESTDIR)$(includedir)
220342175Scy	@echo "Installing header files in $(DESTDIR)$(includedir)"
221342175Scy	@list='$(PKG_HEADERS)'; for i in $$list; do \
222342175Scy	    echo "Installing $(srcdir)/$$i" ; \
223342175Scy	    $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \
224342175Scy	done;
225342175Scy
226342175Scy#========================================================================
227342175Scy# Install documentation.  Unix manpages should go in the $(mandir)
228342175Scy# directory.
229342175Scy#========================================================================
230342175Scy
231342175Scyinstall-doc: doc
232342175Scy	@mkdir -p $(DESTDIR)$(mandir)/mann
233342175Scy	@echo "Installing documentation in $(DESTDIR)$(mandir)"
234342175Scy	@list='$(srcdir)/doc/*.n'; for i in $$list; do \
235342175Scy	    echo "Installing $$i"; \
236342175Scy	    rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \
237342175Scy	    $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \
238342175Scy	done
239342175Scy
240342175Scytest: binaries libraries
241342175Scy	@echo "SQLite TEA distribution does not include tests"
242342175Scy
243342175Scyshell: binaries libraries
244342175Scy	@$(TCLSH) $(SCRIPT)
245342175Scy
246342175Scygdb:
247342175Scy	$(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
248342175Scy
249342175Scydepend:
250342175Scy
251342175Scy#========================================================================
252342175Scy# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
253342175Scy# mentioned above.  That will ensure that this target is built when you
254342175Scy# run "make binaries".
255342175Scy#
256342175Scy# The $(PKG_OBJECTS) objects are created and linked into the final
257342175Scy# library.  In most cases these object files will correspond to the
258342175Scy# source files above.
259342175Scy#========================================================================
260342175Scy
261342175Scy$(PKG_LIB_FILE): $(PKG_OBJECTS)
262342175Scy	-rm -f $(PKG_LIB_FILE)
263342175Scy	${MAKE_LIB}
264342175Scy	$(RANLIB) $(PKG_LIB_FILE)
265342175Scy
266342175Scy$(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS)
267342175Scy	-rm -f $(PKG_STUB_LIB_FILE)
268342175Scy	${MAKE_STUB_LIB}
269342175Scy	$(RANLIB_STUB) $(PKG_STUB_LIB_FILE)
270342175Scy
271342175Scy#========================================================================
272342175Scy# We need to enumerate the list of .c to .o lines here.
273342175Scy#
274342175Scy# In the following lines, $(srcdir) refers to the toplevel directory
275342175Scy# containing your extension.  If your sources are in a subdirectory,
276342175Scy# you will have to modify the paths to reflect this:
277342175Scy#
278342175Scy# sample.$(OBJEXT): $(srcdir)/generic/sample.c
279342175Scy# 	$(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@
280342175Scy#
281342175Scy# Setting the VPATH variable to a list of paths will cause the makefile
282342175Scy# to look into these paths when resolving .c to .obj dependencies.
283342175Scy# As necessary, add $(srcdir):$(srcdir)/compat:....
284342175Scy#========================================================================
285342175Scy
286342175ScyVPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win
287342175Scy
288342175Scy.c.@OBJEXT@:
289342175Scy	$(COMPILE) -c `@CYGPATH@ $<` -o $@
290342175Scy
291342175Scy#========================================================================
292342175Scy# Distribution creation
293342175Scy# You may need to tweak this target to make it work correctly.
294342175Scy#========================================================================
295342175Scy
296342175Scy#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
297342175ScyCOMPRESS	= gtar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
298342175ScyDIST_ROOT	= /tmp/dist
299342175ScyDIST_DIR	= $(DIST_ROOT)/$(PKG_DIR)
300342175Scy
301342175Scydist-clean:
302342175Scy	rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
303342175Scy
304342175Scydist: dist-clean
305342175Scy	mkdir -p $(DIST_DIR)
306342175Scy	cp -p $(srcdir)/README* $(srcdir)/license* \
307342175Scy		$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
308342175Scy		$(DIST_DIR)/
309342175Scy	chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
310342175Scy	chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
311342175Scy
312342175Scy	for i in $(srcdir)/*.[ch]; do \
313342175Scy	    if [ -f $$i ]; then \
314342175Scy		cp -p $$i $(DIST_DIR)/ ; \
315342175Scy	    fi; \
316342175Scy	done;
317342175Scy
318342175Scy	mkdir $(DIST_DIR)/tclconfig
319342175Scy	cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
320342175Scy		$(DIST_DIR)/tclconfig/
321342175Scy	chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
322342175Scy	chmod +x $(DIST_DIR)/tclconfig/install-sh
323342175Scy
324342175Scy	list='demos doc generic library mac tests unix win'; \
325342175Scy	for p in $$list; do \
326342175Scy	    if test -d $(srcdir)/$$p ; then \
327342175Scy		mkdir $(DIST_DIR)/$$p; \
328342175Scy		cp -p $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \
329342175Scy	    fi; \
330342175Scy	done
331342175Scy
332342175Scy	(cd $(DIST_ROOT); $(COMPRESS);)
333342175Scy
334342175Scy#========================================================================
335342175Scy# End of user-definable section
336342175Scy#========================================================================
337342175Scy
338342175Scy#========================================================================
339342175Scy# Don't modify the file to clean here.  Instead, set the "CLEANFILES"
340342175Scy# variable in configure.in
341342175Scy#========================================================================
342342175Scy
343342175Scyclean:  
344342175Scy	-test -z "$(BINARIES)" || rm -f $(BINARIES)
345342175Scy	-rm -f *.$(OBJEXT) core *.core
346342175Scy	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
347342175Scy
348342175Scydistclean: clean
349342175Scy	-rm -f *.tab.c
350342175Scy	-rm -f $(CONFIG_CLEAN_FILES)
351342175Scy	-rm -f config.h config.cache config.log config.status
352342175Scy
353342175Scy#========================================================================
354342175Scy# Install binary object libraries.  On Windows this includes both .dll and
355342175Scy# .lib files.  Because the .lib files are not explicitly listed anywhere,
356342175Scy# we need to deduce their existence from the .dll file of the same name.
357342175Scy# Library files go into the lib directory.
358342175Scy# In addition, this will generate the pkgIndex.tcl
359342175Scy# file in the install location (assuming it can find a usable tclsh shell)
360342175Scy#
361342175Scy# You should not have to modify this target.
362342175Scy#========================================================================
363342175Scy
364342175Scyinstall-lib-binaries: binaries
365342175Scy	@mkdir -p $(DESTDIR)$(pkglibdir)
366342175Scy	@list='$(lib_BINARIES)'; for p in $$list; do \
367342175Scy	  if test -f $$p; then \
368342175Scy	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
369342175Scy	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
370342175Scy	    stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
371342175Scy	    if test "x$$stub" = "xstub"; then \
372342175Scy		echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
373342175Scy		$(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \
374342175Scy	    else \
375342175Scy		echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
376342175Scy		$(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
377342175Scy	    fi; \
378342175Scy	    ext=`echo $$p|sed -e "s/.*\.//"`; \
379342175Scy	    if test "x$$ext" = "xdll"; then \
380342175Scy		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
381342175Scy		if test -f $$lib; then \
382342175Scy		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
383342175Scy	            $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
384342175Scy		fi; \
385342175Scy	    fi; \
386342175Scy	  fi; \
387342175Scy	done
388342175Scy	@list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
389342175Scy	  if test -f $(srcdir)/$$p; then \
390342175Scy	    destp=`basename $$p`; \
391342175Scy	    echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
392342175Scy	    $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
393342175Scy	  fi; \
394342175Scy	done
395342175Scy	@if test "x$(SHARED_BUILD)" = "x1"; then \
396342175Scy	    echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \
397342175Scy	    $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
398342175Scy	fi
399342175Scy
400342175Scy#========================================================================
401342175Scy# Install binary executables (e.g. .exe files and dependent .dll files)
402342175Scy# This is for files that must go in the bin directory (located next to
403342175Scy# wish and tclsh), like dependent .dll files on Windows.
404342175Scy#
405342175Scy# You should not have to modify this target, except to define bin_BINARIES
406342175Scy# above if necessary.
407342175Scy#========================================================================
408342175Scy
409342175Scyinstall-bin-binaries: binaries
410342175Scy	@mkdir -p $(DESTDIR)$(bindir)
411342175Scy	@list='$(bin_BINARIES)'; for p in $$list; do \
412342175Scy	  if test -f $$p; then \
413342175Scy	    echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
414342175Scy	    $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
415342175Scy	  fi; \
416342175Scy	done
417342175Scy
418342175Scy.SUFFIXES: .c .$(OBJEXT)
419342175Scy
420342175ScyMakefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
421342175Scy	cd $(top_builddir) \
422342175Scy	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
423342175Scy
424342175Scyuninstall-binaries:
425342175Scy	list='$(lib_BINARIES)'; for p in $$list; do \
426342175Scy	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
427342175Scy	done
428342175Scy	list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
429342175Scy	  p=`basename $$p`; \
430342175Scy	  rm -f $(DESTDIR)$(pkglibdir)/$$p; \
431342175Scy	done
432342175Scy	list='$(bin_BINARIES)'; for p in $$list; do \
433342175Scy	  rm -f $(DESTDIR)$(bindir)/$$p; \
434342175Scy	done
435342175Scy
436342175Scy.PHONY: all binaries clean depend distclean doc install libraries test
437342175Scy
438342175Scy# Tell versions [3.59,3.63) of GNU make to not export all variables.
439342175Scy# Otherwise a system limit (for SysV at least) may be exceeded.
440342175Scy.NOEXPORT:
441