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