aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorlecoanet2003-04-16 10:30:25 +0000
committerlecoanet2003-04-16 10:30:25 +0000
commit4deef84e6a3c5ba71e3ec2d7429fc347edbbc098 (patch)
tree4bc5bfa6f6ad34b1cc99aece84fb8185b147fcc5 /Makefile.in
parent2e434e0a9aa6ca4f249b599191264f76943dd013 (diff)
downloadtkzinc-4deef84e6a3c5ba71e3ec2d7429fc347edbbc098.zip
tkzinc-4deef84e6a3c5ba71e3ec2d7429fc347edbbc098.tar.gz
tkzinc-4deef84e6a3c5ba71e3ec2d7429fc347edbbc098.tar.bz2
tkzinc-4deef84e6a3c5ba71e3ec2d7429fc347edbbc098.tar.xz
Update for the new make tool chain
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in746
1 files changed, 499 insertions, 247 deletions
diff --git a/Makefile.in b/Makefile.in
index 244d44d..eae6dd1 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
-# Copyright (c) 1993 - 2002 CENA, Patrick Lecoanet --
+# Copyright (c) 1993 - 2003 CENA, Patrick Lecoanet --
#
# This code is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
@@ -16,266 +16,518 @@
#
# $Revision$
#
-VPATH = @srcdir@
-srcdir = @srcdir@
-
-SHELL = /bin/sh
-
-CC = @CC@
-RANLIB = @RANLIB@
-
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL = @INSTALL@
-
-PERLCONFIG = INSTALLDIRS=perl
-
-INSTALL_PERL = install_perl
-
-prefix = $(HOME)
-exec_prefix = $(prefix)
-
-bindir = $(exec_prefix)/bin/$(ARCH)
-libdir = $(exec_prefix)/lib/$(ARCH)
-incdir = $(prefix)/include
-mandir = $(prefix)/man/man3
-LDFLAGS = -L. @LDFLAGS@ @X_LIBS@ @LOCAL_X_LIBS@
-# Should be tested in configure. It doesn't work
-# on some systems.
-SHARED_LIB_CFLAGS = @sharedlib_cflags@
-SHARED_TK_LDFLAGS = @sharedlib_buildflags@
-#
-# For memory debugging
-#TCL_TK_DEBUG_SUFFIX=g
-TCL_TK_DEBUG_SUFFIX=
-TCL_TK_VER = 8.3$(TCL_TK_DEBUG_SUFFIX)
-TK_INCLUDE_PATH=/usr/include/tcl$(TCL_TK_VER)
-SHARED_TK_LIBS = @X_LIBS@ @LOCAL_X_LIBS@ @XMU@ -lXext -lX11 @X_EXTRA_LIBS@ -lm
-ZINC_VER = @ZINC_VER@
-ZINC_MAJOR = @ZINC_MAJOR@
-CFLAGS = -Wall $(SHARED_LIB_CFLAGS)
-CPPFLAGS = @DEFS@ @X_CFLAGS@ $(DFLAGS) -I$(srcdir) -DBUILD_LIBRARY
-TKCFLAGS = -I$(TK_INCLUDE_PATH) -DUSE_TCL_STUBS -DUSE_TK_STUBS
-#
-# Linux
-#PTKLIB = /usr/lib/perl5/i386-linux/5.004/Tk/pTk
-#SITEPERL = /usr/local/lib/site_perl
#
-# Solaris
-#PTKLIB = /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Tk/pTk
-#SITEPERL = /usr/local/lib/perl5/site_perl
+# This Makefile.in is derived from the Sample TEA template which is:
#
-# Auto
-PTKLIB = @TKLIB@/pTk
-PTKCFLAGS = -DPTK -I$(PTKLIB)
+# Copyright (c) 1999 Scriptics Corporation.
+# Copyright (c) 2002 ActiveState SRL.
#
-# Define this to use OpenGL
-#
-GLX=-lGL -lpthread
-#GLX=
-
-#
-# Recognized compilation time flags are :
-#
-# PROFILE ask for profile support
-# OM include code for internal overlap manager
-# GLX include code that need GL support.
-# GLX_PRINT_CONFIG display the detected hardware capabilities
-# GLX_DAMAGE redraw only modified areas
-# SHAPE include code for reshaping windows.
-DFLAGS= -DOM -DSHAPE -DGLX -DGLX_DAMAGE -DGLX_PRINT_CONFIG
-#DFLAGS= -DOM -DSHAPE
-#DFLAGS = -DTCL_MEM_DEBUG
+#========================================================================
+# Enumerate the names of the source files included in this package.
+# EXTRA_SOURCES will be replaced by WIN_SOURCES or UNIX_SOURCES, as is
+# appropriate for your platform. It is not important to specify the
+# directory, as long as it is the $(srcdir) or in the generic, win or
+# unix subdirectory.
+#========================================================================
+
+tess_SOURCES =
+Tkzinc_SOURCES = Track.c Tabular.c Reticle.c Map.c Rectangle.c Arc.c Curve.c \
+ Item.c PostScript.c MapInfo.c Attrs.c Draw.c Geo.c List.c \
+ perfos.c Transfo.c Group.c Icon.c Text.c Image.c Color.c \
+ Field.c Triangles.c Window.c tkZinc.c @EXTRA_SOURCES@
+Om_SOURCES = OverlapMan.c
+Tess_SOURCES = dict.c geom.c memalloc.c mesh.c normal.c priorityq.c \
+ render.c sweep.c tess.c tessmono.c
+
+WIN_SOURCES = WinPort.c
+UNIX_SOURCES =
+
+#========================================================================
+# Identify the object files. This replaces .c with .$(OBJEXT) for all
+# the named source files. These objects are created and linked into the
+# final library.
+# Normally we would use $(OBJEXT), but certain make executables won't do
+# the extra macro in a macro conversion properly.
#
-# This set for cc under HP-UX
+# "Tkzinc_LIB_FILE" refers to the library (dynamic or static as per
+# configuration options) composed of the named objects.
+# "Om_LIB_FILE" refers to the optional pluggable overlap manager.
+#========================================================================
+
+Tkzinc_OBJECTS = $(Tkzinc_SOURCES:.c=.@OBJEXT@)
+Om_OBJECTS = $(Om_SOURCES:.c=.@OBJEXT@)
+Tess_OBJECTS = $(Tess_SOURCES:.c=.@OBJEXT@)
+Tkzinc_LIB_FILE = @Tkzinc_LIB_FILE@
+Om_LIB_FILE = @Om_LIB_FILE@
+Tess_LIB_FILE = @Tess_LIB_FILE@
+
+#========================================================================
+# RUNTIME_SOURCES identifies Tcl runtime files that are associated with
+# this package that need to be installed, if any.
+#========================================================================
+
+RUNTIME_SOURCES = zincLogo.tcl zincText.tcl
+
+#========================================================================
+# This is a list of header files to be installed
+#========================================================================
+
+GENERIC_HDRS =
+
+#========================================================================
+# Nothing of the variables below this line need to be changed.
+#========================================================================
+
+lib_BINARIES = $($(PACKAGE)_LIB_FILE)
+aux_BINARIES = $(Om_LIB_FILE)
+bin_BINARIES =
+BINARIES = $(Tess_LIB_FILE) $(Om_LIB_FILE) $(lib_BINARIES)
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+libdir = @libdir@
+datadir = @datadir@
+mandir = @mandir@
+includedir = @includedir@
+
+DESTDIR =
+
+PKG_DIR = $(PACKAGE)$(VERSION)
+pkgdatadir = $(datadir)/$(PKG_DIR)
+pkglibdir = $(libdir)/$(PKG_DIR)
+pkgincludedir = $(includedir)/$(PKG_DIR)
+
+top_builddir = .
+
+tess_dir = $(srcdir)/libtess
+generic_dir = $(srcdir)/generic
+unix_dir = $(srcdir)/unix
+windows_dir = $(srcdir)/win
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+CC = @CC@
+CFLAGS_DEBUG = @CFLAGS_DEBUG@
+CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
+CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@
+CFLAGS_WARNING = @CFLAGS_WARNING@
+CLEANFILES = @CLEANFILES@
+EXEEXT = @EXEEXT@
+LDFLAGS_DEBUG = @LDFLAGS_DEBUG@
+LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
+LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@
+MAKE_LIB = @MAKE_LIB@
+MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
+MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
+OBJEXT = @OBJEXT@
+RANLIB = @RANLIB@
+SHLIB_CFLAGS = @SHLIB_CFLAGS@
+SHLIB_LD = @SHLIB_LD@
+SHLIB_LDFLAGS = @SHLIB_LDFLAGS@
+SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
+STLIB_LD = @STLIB_LD@
+TCL_DEFS = @TCL_DEFS@
+TCL_BIN_DIR = @TCL_BIN_DIR@
+TCL_SRC_DIR = @TCL_SRC_DIR@
+TK_BIN_DIR = @TK_BIN_DIR@
+TK_SRC_DIR = @TK_SRC_DIR@
#
-#
-#------- Nothing to be modified by users below this line (hopefully ;-) ) ----------------
-#
-cfiles = Track.c Tabular.c Reticle.c Map.c Rectangle.c Arc.c Curve.c \
- Item.c PostScript.c MapInfo.c Attrs.c Draw.c Geo.c List.c \
- perfos.c version.c Transfo.c Group.c Icon.c Text.c Image.c Color.c \
- Field.c Triangles.c Window.c
-tkcfiles = tkZinc.c
-omcfiles = OverlapMan.c
-hfiles = MapInfo.h List.h perfos.h patchlvl.h Types.h Transfo.h \
- Attrs.h Item.h Field.h PostScript.h Draw.h Image.h Geo.h \
- OverlapMan.h WidgetInfo.h Track.h Group.h
-dfiles = Copyright
-projfiles = ChangeLog mkinstalldirs
-confiles = configure configure.in acaux.m4 config.h.in Makefile.in install-sh
-afiles = $(cfiles) $(tkcfiles) $(hfiles) $(tfiles) $(dfiles) $(projfiles) $(confiles)
-rtlfiles = $(hfiles) $(tkhfiles) $(tfiles) $(dfiles) $(confiles) $(bins) $(tklibs)
-
-tkobjs = $(cfiles:%.c=tk/%.o) $(tkcfiles:%.c=tk/%.o)
-tkgobjs = $(cfiles:%.c=tk/%.g) $(tkcfiles:%.c=tk/%.g)
-tkpgobjs = $(cfiles:%.c=tk/%.pg) $(tkcfiles:%.c=tk/%.pg)
-ptkobjs = $(cfiles:%.c=ptk/%.o) $(tkcfiles:%.c=ptk/%.o)
-ptkgobjs = $(cfiles:%.c=ptk/%.g) $(tkcfiles:%.c=ptk/%.g)
-omobjs = $(omcfiles:%.c=om/%.o)
-omgobjs = $(omcfiles:%.c=om/%.g)
-
-tklibs = tkzinc$(ZINC_VER).$(ZINC_MAJOR).so
-ptklibs = libptkzinc$(ZINC_VER).$(ZINC_MAJOR).so
-
-fontbins = $(fonts:.bdf=.pcf)
-
-.SUFFIXES: .g .bdf .pcf
-
-tk/%.o: %.c
- $(CC) $(CFLAGS) $(CPPFLAGS) $(TKCFLAGS) -O -c $< -o $@
-tk/%.g: %.c
- $(CC) $(CFLAGS) $(CPPFLAGS) $(TKCFLAGS) -g -c $< -o $@
-tk/%.pg: %.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -pg -c $< -o $@
-
-ptk/%.o: %.c
- $(CC) $(CFLAGS) $(CPPFLAGS) $(PTKCFLAGS) -O -c $< -o $@
-ptk/%.g: %.c
- $(CC) $(CFLAGS) $(CPPFLAGS) $(PTKCFLAGS) -g -c $< -o $@
-
-om/%.o: %.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -O -c $< -o $@
-om/%.g: %.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -g -c $< -o $@
-
-.bdf.pcf:
- bdftopcf $*.bdf >$*.pcf
-
-ptkzinc: libptkzinc$(ZINC_VER).$(ZINC_MAJOR).so Perl/Makefile_nodebug
- (cd Perl; make "LD_RUN_PATH=@X_LIBS@ -L/usr/lib")
-ptkzinc_debug: libptkzinc_debug$(ZINC_VER).$(ZINC_MAJOR).so Perl/Makefile_debug
- (cd Perl; make "LD_RUN_PATH=@X_LIBS@ -L/usr/lib")
-testptk: ptkzinc
- (cd Perl; make test "FULLPERL=PERL_DL_NONLAZY=0 perl")
-Perl/Makefile_nodebug:
- (cd Perl; perl Makefile.PL ptkzinc$(ZINC_VER).$(ZINC_MAJOR) $(PERLCONFIG))
- (cd Perl/debug; perl Makefile.PL $(PERLCONFIG))
-Perl/Makefile_debug:
- (cd Perl; perl Makefile.PL ptkzinc_debug$(ZINC_VER).$(ZINC_MAJOR) $(PERLCONFIG))
- (cd Perl/debug; perl Makefile.PL $(PERLCONFIG))
-
-libptkzinc$(ZINC_VER).$(ZINC_MAJOR).so: libtess/libtess.a ptk $(ptkobjs) libom.so
- $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(ptkobjs) $(SHARED_TK_LIBS) -L. -lom libtess/libtess.a $(GLX)
-libptkzinc_debug$(ZINC_VER).$(ZINC_MAJOR).so: libtess/libtess.a ptk $(ptkgobjs) libom_debug.so
- $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(ptkgobjs) $(SHARED_TK_LIBS) -L. -lom_debug libtess/libtess.a $(GLX)
-
-tkzinc: libtess/libtess.a libtess/libtess.a tkzinc$(ZINC_VER).$(ZINC_MAJOR).so
-tkzinc$(ZINC_VER).$(ZINC_MAJOR).so: tk $(tkobjs) libom.so
- $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(SHARED_TK_LIBS) -L. -ltk$(TCL_TK_VER) -ltcl$(TCL_TK_VER) -lom $(tkobjs) libtess/libtess.a $(GLX)
-tkzinc_debug: libtess/libtess.a tkzinc_debug$(ZINC_VER).$(ZINC_MAJOR).so
-tkzinc_debug$(ZINC_VER).$(ZINC_MAJOR).so: tk $(tkgobjs) libom_debug.so libtess/libtess.a
- $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(SHARED_TK_LIBS) -L. -ltk$(TCL_TK_VER) -ltcl$(TCL_TK_VER) -lom_debug $(tkgobjs) libtess/libtess.a $(GLX)
-tkzinc_profile: tkzinc_profile.a libom.so
- $(CC) -pg -o zincwish $(SHARED_TK_LIBS) -L. -ltk$(TCL_TK_VER) -ltcl$(TCL_TK_VER) -lom tkAppInit.c tkzinc_profile.a -o zincwish
-tkzinc_profile.a: tk $(tkpgobjs) libom_debug.so
- ar rv $@ $(tkpgobjs)
-
-libtess/libtess.a:
- (cd libtess; xmkmf; make)
-libom.so: om $(omobjs)
- $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(omobjs) -lm
-libom_debug.so: om $(omgobjs)
- $(CC) $(SHARED_TK_LDFLAGS) -o $@ $(omgobjs) -lm
-
-python: Python/Zinc.py
-
-Python/Zinc.py: Python/Zinc.py.in
- cd Python;rm -f Zinc.py; sed -e "s/ZINC_VER/$(ZINC_VER)/g" -e "s/ZINC_MAJOR/$(ZINC_MAJOR)/g" Zinc.py.in > Zinc.py
-
-tk:
- -mkdir tk
-
-ptk:
- -mkdir ptk
-
-om:
- -mkdir om
-
-doc: doc/refman.pdf doc/refman.html
-
-doc/refman.html:
- (cd doc; latex2html -split 4 -show_section_numbers -local_icons refman.tex; cp -f *.png refman/)
-
-doc/refman.pdf: doc/refman.tex
+# This is necessary for packages that use private Tcl headers
+TCL_TOP_DIR_NATIVE = @TCL_TOP_DIR_NATIVE@
+TK_TOP_DIR_NATIVE = @TK_TOP_DIR_NATIVE@
+# Not used, but retained for reference of what libs Tcl required
+TCL_LIBS = @TCL_LIBS@
+
+#========================================================================
+# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
+# package without installing. The other environment variables allow us
+# to test against an uninstalled Tcl. Add special env vars that you
+# require for testing here (like TCLX_LIBRARY).
+#========================================================================
+
+EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR)
+TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
+ LD_LIBRARY_PATH="$(EXTRA_PATH):$(LD_LIBRARY_PATH)" \
+ LIBPATH="$(EXTRA_PATH):${LIBPATH}" \
+ SHLIB_PATH="$(EXTRA_PATH):${SHLIB_PATH}" \
+ PATH="$(EXTRA_PATH):$(PATH)" \
+ TCLLIBPATH="$(top_builddir)"
+TCLSH_PROG = @TCLSH_PROG@
+WISH_PROG = @WISH_PROG@
+TCLSH = $(TCLSH_ENV) $(TCLSH_PROG)
+WISH = $(TCLSH_ENV) $(WISH_PROG)
+SHARED_BUILD = @SHARED_BUILD@
+
+# The local includes must come first, because the TK_XINCLUDES can be
+# just a comment
+INCLUDES = -I$(srcdir) -I$(srcdir)/libtess -I$(srcdir)/generic \
+ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
+
+EXTRA_CFLAGS = $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@
+
+DEFS = $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
+
+CONFIG_CLEAN_FILES = Makefile
+
+CPPFLAGS = @CPPFLAGS@
+LIBS = @LIBS@
+AR = ar
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
+#========================================================================
+# Start of user-definable TARGETS section
+#========================================================================
+
+#========================================================================
+# TEA TARGETS. Please note that the "libraries:" target refers to platform
+# independent files, and the "binaries:" target inclues executable programs and
+# platform-dependent libraries. Modify these targets so that they install
+# the various pieces of your package. The make and install rules
+# for the BINARIES that you specified above have already been done.
+#========================================================================
+
+all: binaries libraries doc
+
+#========================================================================
+# The binaries target builds executable programs, Windows .dll's, unix
+# shared/static libraries, and any other platform-dependent files.
+# The list of targets to build for "binaries:" is specified at the top
+# of the Makefile, in the "BINARIES" variable.
+#========================================================================
+
+binaries: $(BINARIES) pkgIndex.tcl
+
+libraries:
+
+#========================================================================
+# The doc target is for building man pages. Currently the zinc doc is
+# only available in html and pdf formats. These formats require tools
+# (LaTeX, pdfTeX, LaTeX2html) that are not readily available on all
+# platforms. To ease automatic construction of the package the target
+# doc does not involve the construction of pdf and html.
+#========================================================================
+
+doc:
+
+pdf: doc/refman.tex
(cd doc; \
rm -f refman.aux refman.ilg refman.ind refman.out; \
rm -f refman.idx refman.lof refman.log refman.lot refman.toc; \
pdflatex refman.tex; \
- makeindex refman.idx; pdflatex refman.tex; \
+ makeindex refman.idx; \
+ pdflatex refman.tex; \
thumbpdf refman.pdf;)
-install: installtk installptk installom
-
-installom: libom.so
- $(INSTALL_DATA) libom.so $(libdir)
-
-installtk: installdirs $(tklibs)
- $(INSTALL_DATA) $(tklibs) $(libdir)
- cd $(libdir) && rm -f libtkzinc.so
- for f in $(hfiles); do $(INSTALL_DATA) $$f $(incdir); done
+html: doc/refman.tex
+ (cd doc; \
+ rm -f refman.ilg refman.ind refman.out; \
+ rm -f refman.idx refman.lof refman.log refman.lot refman.toc; \
+ mkdir -p refman; cp -f *.png refman; \
+ latex2html -split 4 -show_section_numbers -local_icons refman.tex)
+
+install: all install-binaries install-libraries install-demos install-doc
+
+install-binaries: binaries install-lib-binaries install-bin-binaries
+
+#========================================================================
+# This rule installs platform-independent files, such as header files.
+#========================================================================
+
+install-libraries: libraries
+ @mkdir -p $(DESTDIR)$(includedir)
+ @echo "Installing header files in $(DESTDIR)$(includedir)"
+ @for i in $(GENERIC_HDRS) ; do \
+ echo "Installing $$i" ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \
+ done;
+
+#========================================================================
+# This rule installs the demos files and associated images.
+#========================================================================
+
+install-demos:
+ @mkdir -p $(DESTDIR)$(pkglibdir)/demos
+ @echo "Installing demo files in $(DESTDIR)$(pkglibdir)/demos"
+ @for p in $(srcdir)/demos/*; do \
+ if test -f $$p; then \
+ p=`basename $$p`; \
+ echo " Install $$p $(DESTDIR)$(pkglibdir)/demos/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/demos/$$p $(DESTDIR)$(pkglibdir)/demos/$$p; \
+ fi; \
+ done
+ @mkdir -p $(DESTDIR)$(pkglibdir)/demos/images
+ @for p in $(srcdir)/demos/images/*; do \
+ if test -f $$p; then \
+ p=`basename $$p`; \
+ echo " Install $$p $(DESTDIR)$(pkglibdir)/demos/images/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/demos/images/$$p $(DESTDIR)$(pkglibdir)/demos/images/$$p; \
+ fi; \
+ done
+
+#========================================================================
+# Install documentation. Unix manpages should go in the $(mandir)
+# directory.
+#========================================================================
+
+install-doc: doc
+ @mkdir -p $(DESTDIR)$(mandir)/mann
+ @echo "Installing documentation in $(DESTDIR)$(mandir)"
+ @for i in $(srcdir)/doc/*.n; do \
+ if test -f $$i; then \
+ i=`basename $$i`; \
+ echo "Installing $$i"; \
+ rm -f $(DESTDIR)$(mandir)/mann/$$i; \
+ $(INSTALL_DATA) $(srcdir)/doc/$$i $(DESTDIR)$(mandir)/mann/$$i ; \
+ fi \
+ done
+
+test: binaries libraries
+ $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
+
+shell: binaries libraries
+ @$(TCLSH) $(SCRIPT)
+
+gdb:
+ $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
-installptk: $(ptklibs)
- $(INSTALL_DATA) $(ptklibs) $(libdir)
- (cd Perl; make; make $(INSTALL_PERL))
- (cd Perl/debug; make; make $(INSTALL_PERL))
+depend:
-installdirs:
- $(srcdir)/mkinstalldirs $(libdir) $(incdir) $(mandir)
+#========================================================================
+# $($(PACKAGE)_LIB_FILE) should be listed as part of the BINARIES variable
+# mentioned above. That will ensure that this target is built when you
+# run "make binaries".
#
-#------------- Stuff for maintaining ZINC below -----------------------------------
+# The $($(PACKAGE)_OBJECTS) objects are created and linked into the final
+# library. In most cases these object files will correspond to the
+# source files above.
+#========================================================================
+
+$($(PACKAGE)_LIB_FILE): $($(PACKAGE)_OBJECTS)
+ -rm -f $($(PACKAGE)_LIB_FILE)
+ ${MAKE_LIB}
+ $(RANLIB) $($(PACKAGE)_LIB_FILE)
+
+$(Om_LIB_FILE): $(Om_OBJECTS)
+ -rm -f $(Om_LIB_FILE)
+ ${SHLIB_LD} -o $@ $(Om_OBJECTS) ${SHLIB_LDFLAGS}
+ $(RANLIB) $(Om_LIB_FILE)
+
+$(Tess_LIB_FILE): $(Tess_OBJECTS)
+ -rm -f $(Tess_LIB_FILE)
+ ${STLIB_LD} $@ $(Tess_OBJECTS)
+ $(RANLIB) $(Om_LIB_FILE)
+
+#========================================================================
+# We need to enumerate the list of .c to .o lines here.
#
-
-VERSION = @ZINC_VERSION@
-
-Makefile: Makefile.in config.status
- $(SHELL) config.status
-config.status: configure
- $(SHELL) $(srcdir)/configure --no-create
-configure: configure.in
- cd $(srcdir); autoconf
-config.h.in: configure.in
- cd $(srcdir); autoheader; touch config.h.in
-
-dist: zinc$(VERSION).tar.gz
-zinc$(VERSION).tar.gz: temp/zinc$(VERSION)
- cd temp; tar cohf ../zinc$(VERSION).tar zinc$(VERSION)
- -rm -f zinc$(VERSION).tar.gz
- gzip -9 zinc$(VERSION).tar
-temp/zinc$(VERSION): $(afiles)
- -rm -rf temp/zinc$(VERSION)
- -mkdir temp
- mkdir temp/zinc$(VERSION)
- cd temp/zinc$(VERSION); for f in $(afiles); do ln -s ../../$$f .; done
-
-ctags: $(hfiles) $(cfiles) $(tkcfiles) code.doc
- etags $(hfiles) $(cfiles) $(tkcfiles) code.doc
-
-mostlyclean:
- -rm -f core a.out tk/*.o tk/*.g ptk/*.o ptk/*.g
-clean: distclean
-distclean: Perl/Makefile_nodebug
- -rm -f *~ *.bak *.tar *.orig *.rej core a.out tk/*.o tk/*.g ptk/*.o ptk/*.g
- -rm -f *.a *.so* lints tmp*
- -rm -rf *temp
- (cd doc; rm -rf refman.aux refman.dvi refman.idx refman.lof \
- refman.log refman.lot refman.toc refman.pdf refman.ilg \
- refman.ind refman refman.out refman.tpt)
- (cd libtess; rm -f *.bak Makefile *.o *.a)
- (cd Perl; make clean)
-
-depend:
- -$(CPP) $(CPPFLAGS) -MM -I. $(cfiles) $(tkcfiles) > depend.temp
- cat depend.temp | sed -e 's/.o:/.g:/g' > depends
- cat depend.temp >> depends
- rm -f depend.temp
- cat depends | sed -e 's+\(.*\):+tk/\1:+g' > depend.temp
- rm -f depends
- mv depend.temp depends
-
-depends:
- touch depends
-
-include depends
+# In the following lines, $(srcdir) refers to the toplevel directory
+# containing your extension. If your sources are in a subdirectory,
+# you will have to modify the paths to reflect this:
+#
+# sample.$(OBJEXT): $(srcdir)/generic/sample.c
+# $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@
+#
+# Setting the VPATH variable to a list of paths will cause the makefile
+# to look into these paths when resolving .c to .obj dependencies.
+# As necessary, add $(srcdir):$(srcdir)/compat:....
+#========================================================================
+
+VPATH = $(srcdir):$(srcdir)/libtess:$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win
+
+.SUFFIXES: .c .$(OBJEXT)
+
+.c.$(OBJEXT):
+ $(COMPILE) -c `@CYGPATH@ $<` -o $@
+
+#========================================================================
+# Create the pkgIndex.tcl file.
+# It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
+# you may find that you need to customize the package. If so, either
+# modify the -hand version, or create a pkgIndex.tcl.in file and have
+# the configure script output the pkgIndex.tcl by editing configure.in.
+#========================================================================
+
+pkgIndex.tcl:
+ ( echo package require Tk \; pkg_mkIndex -load Tk . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(WISH)
+
+pkgIndex.tcl-hand:
+ (echo 'package ifneeded $(PACKAGE) $(VERSION) \
+ [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\
+ ) > pkgIndex.tcl
+
+#========================================================================
+# Distribution creation
+# You may need to tweak this target to make it work correctly.
+#========================================================================
+
+COMPRESS = tar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
+DIST_ROOT = /tmp/dist
+DIST_DIR = $(DIST_ROOT)/$(PKG_DIR)
+
+dist-clean:
+ rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
+
+dist: dist-clean
+ mkdir -p $(DIST_DIR)
+ cp -p $(srcdir)/BUGS $(srcdir)/README* $(srcdir)/Copyright* \
+ $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
+ $(DIST_DIR)/
+ chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
+ chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
+
+ -cp -p $(srcdir)/*.[ch] $(DIST_DIR)/
+
+ mkdir $(DIST_DIR)/tclconfig
+ cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
+ $(DIST_DIR)/tclconfig/
+ chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
+ chmod +x $(DIST_DIR)/tclconfig/install-sh
+
+ -list='demos doc generic libtess debian redhat library mac tests unix win Perl Python'; \
+ for p in $$list; do \
+ if test -d $(srcdir)/$$p ; then \
+ tar cf - --exclude=CVS --exclude=.cvsignore $$p | \
+ (cd $(DIST_DIR); tar xf -) \
+ fi; \
+ done
+
+ (cd $(DIST_ROOT); $(COMPRESS);)
+
+#========================================================================
+# End of user-definable section
+#========================================================================
+
+#========================================================================
+# Don't modify the file to clean here. Instead, set the "CLEANFILES"
+# variable in configure.in
+#========================================================================
+
+clean:
+ -test -z "$(BINARIES)" || rm -f $(BINARIES)
+ -rm -f *.$(OBJEXT) core *.core
+ -test -z "$(CLEANFILES)" || rm -Rf $(CLEANFILES)
+
+distclean: clean
+ -rm -f *.tab.c *~
+ -rm -f $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log config.status
+
+#========================================================================
+# Install binary object libraries. On Windows this includes both .dll and
+# .lib files. Because the .lib files are not explicitly listed anywhere,
+# we need to deduce their existence from the .dll file of the same name.
+# Library files go into the lib directory.
+# In addition, this will generate the pkgIndex.tcl
+# file in the install location (assuming it can find a usable tclsh shell)
+#
+# You should not have to modify this target.
+#========================================================================
+
+install-lib-binaries:
+ @mkdir -p $(DESTDIR)$(pkglibdir)
+ @list='$(lib_BINARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
+ echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
+ ext=`echo $$p|sed -e "s/.*\.//"`; \
+ if test "x$$ext" = "xdll"; then \
+ lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
+ if test -f $$lib; then \
+ echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
+ $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
+ fi; \
+ fi; \
+ fi; \
+ done
+ @list='$(aux_BINARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " Install $$p $(DESTDIR)$(libdir)/$$p"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(libdir)/$$p; \
+ fi; \
+ done
+ @list='$(RUNTIME_SOURCES)'; for p in $$list; do \
+ if test -f $(srcdir)/library/$$p; then \
+ echo " Install $$p $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \
+ fi; \
+ done
+#
+# Construct a full pkgIndex in the installation directory
+ (cd $(DESTDIR)$(pkglibdir); \
+ (echo package require Tk \; pkg_mkIndex -load Tk . $($(PACKAGE)_LIB_FILE) \
+ $(RUNTIME_SOURCES) \; exit;) | $(TCLSH))
+
+#========================================================================
+# Install binary executables (e.g. .exe files and dependent .dll files)
+# This is for files that must go in the bin directory (located next to
+# wish and tclsh), like dependent .dll files on Windows.
+#
+# You should not have to modify this target, except to define bin_BINARIES
+# above if necessary.
+#========================================================================
+
+install-bin-binaries:
+ @mkdir -p $(DESTDIR)$(bindir)
+ @list='$(bin_BINARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
+ fi; \
+ done
+
+.SUFFIXES: .c .$(OBJEXT)
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+uninstall-binaries:
+ list='$(lib_BINARIES)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(pkglibdir)/$$p; \
+ done
+ list='$(RUNTIME_SOURCES)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(pkglibdir)/$$p; \
+ done
+ list='$(bin_BINARIES)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/$$p; \
+ done
+
+.PHONY: all binaries clean depend distclean doc install libraries test
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
+
+
+#--------------------------------------
+# Targets for perl/Tk
+#--------------------------------------
+
+perl: binaries
+ (cd Perl; perl Makefile.PL; make)
+ (cd Perl/demos; perl Makefile.PL)
+ (cd Perl/debug; perl Makefile.PL)
+
+testperl: binaries
+ (cd Perl; perl Makefile.PL; make test "FULLPERL=PERL_DL_NONLAZY=0 perl")
+
+perlinstall: binaries
+ (cd Perl; make; make $(INSTALL_PERL))
+ (cd Perl/demos; make; make $(INSTALL_PERL))
+ (cd Perl/debug; make; make $(INSTALL_PERL))
+ $(INSTALL_DATA) $($(PACKAGE)_LIB_FILE) $(prefix)/lib