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