# Generated automatically from Makefile.in by configure.
# Makefile.in --
#
#	This file is a Makefile for Sample TEA Extension.  If it has the name
#	"Makefile.in" then it is a template for a Makefile;  to generate the
#	actual Makefile, run "./configure", which is a configuration script
#	generated by the "autoconf" program (constructs like "@foo@" will get
#	replaced in the actual Makefile.
#
# Copyright (c) 1999 Scriptics Corporation.
# Copyright (c) 2002 ActiveState SRL.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: Makefile.in,v 1.33 2002/03/13 02:11:40 hobbs Exp $

#========================================================================
# Edit the following few lines when writing a new extension
#========================================================================

#========================================================================
# Enumerate the names of the source files included in this package.
# This will be used when a dist target is added to the Makefile.
# 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.
#========================================================================

tclcurl_SOURCES	= tclcurl.c $(UNIX_SOURCES)

WIN_SOURCES  = 
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.  In these do not correspond directly to the source files
# above, you will need to enumerate the object files here.
# Normally we would use $(OBJEXT), but certain make executables won't do
# the extra macro in a macro conversion properly.
#
# "sample_LIB_FILE" refers to the library (dynamic or static as per
# configuration options) composed of the named objects.
#========================================================================

tclcurl_OBJECTS  = $(tclcurl_SOURCES:.c=.o)
tclcurl_LIB_FILE = libtclcurl0.95${DBGX}.so

#========================================================================
# This is a list of header files to be installed
#========================================================================

GENERIC_HDRS	= $(srcdir)/tclcurl.h

#========================================================================
# Add additional lines to handle any additional AC_SUBST cases that
# have been added to the configure script.
#========================================================================

#SAMPLE_NEW_VAR	= @SAMPLE_NEW_VAR@

#========================================================================
# Nothing of the variables below this line need to be changed.  Please
# check the TARGETS section below to make sure the make targets are
# correct.
#========================================================================

#========================================================================
# The variable "$(PACKAGE)_LIB_FILE" is the parameterized name of the
# library that we are building.
#========================================================================

lib_BINARIES	= $($(PACKAGE)_LIB_FILE)
BINARIES	= $(lib_BINARIES)
TCL_SCRIPTS = tclcurl.tcl

SHELL		= /bin/sh

srcdir		= .
prefix		= /usr
exec_prefix	= /usr

bindir		= ${exec_prefix}/bin
libdir		= ${exec_prefix}/lib
datadir		= ${prefix}/share
mandir		= /usr/share/man/mann
includedir	= ${prefix}/include

DESTDIR		=

PKG_DIR		= $(PACKAGE)$(VERSION)
pkgdatadir	= $(datadir)/$(PKG_DIR)
pkglibdir	= $(libdir)/$(PKG_DIR)
pkgincludedir	= $(includedir)/$(PKG_DIR)

top_builddir	= .

INSTALL		= /usr/bin/install -c
INSTALL_PROGRAM	= ${INSTALL}
INSTALL_DATA	= ${INSTALL} -m 644
INSTALL_SCRIPT	= ${INSTALL_PROGRAM}

PACKAGE		= tclcurl
VERSION		= 0.95
CC		= gcc -pipe
CFLAGS_DEBUG	= -g
CFLAGS_DEFAULT	= $(CFLAGS_OPTIMIZE)
CFLAGS_OPTIMIZE	= -O -D__NO_STRING_INLINES -D__NO_MATH_INLINES
CLEANFILES	= 
EXEEXT		= 
LDFLAGS_DEBUG	= 
LDFLAGS_DEFAULT	= $(LDFLAGS_OPTIMIZE)
LDFLAGS_OPTIMIZE = 
MAKE_LIB	= ${SHLIB_LD} -o $@ $($(PACKAGE)_OBJECTS) ${SHLIB_LDFLAGS} ${SHLIB_LD_LIBS} $(TCL_LIBS) 
MAKE_SHARED_LIB	= ${SHLIB_LD} -o $@ $($(PACKAGE)_OBJECTS) ${SHLIB_LDFLAGS} ${SHLIB_LD_LIBS}
MAKE_STATIC_LIB	= ${STLIB_LD} $@ $($(PACKAGE)_OBJECTS)
OBJEXT		= o
RANLIB		= :
SHLIB_CFLAGS	= -fPIC
SHLIB_LD	= gcc -pipe -shared
SHLIB_LDFLAGS	= 
SHLIB_LD_LIBS	=   -lcurl  -lssl -lcrypto -ldl -L/usr/lib -ltclstub
STLIB_LD	= ${AR} cr
TCL_BIN_DIR	= /usr/lib
TCL_DEFS	=  -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1 -DSTDC_HEADERS=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_SYS_IOCTL_H=1 
TCL_EXTRA_CFLAGS = 
TCLCURL_CFLAGS =  -I/usr/include
TCL_LD_FLAGS	= -rdynamic
TCL_LIBS	= -ldl  -lieee -lm
TCL_SHLIB_LD_LIBS = ${LIBS}
TCL_SRC_DIR	= /usr/src/build/77334-i386/BUILD/tcltk-8.3.3/tcl8.3.3
TCL_DBGX	= 
TCL_STUB_LIB_FILE = libtclstub.a
TCL_STUB_LIB_SPEC = -L/usr/lib -ltclstub
TCLSH_PROG	= TCL_LIBRARY=`echo $(TCL_SRC_DIR)/library` /usr/bin/tclsh
SHARED_BUILD	= 1

INCLUDES	= -I"/usr/include"

EXTRA_CFLAGS	= $(TCL_DEFS) $(PROTO_FLAGS) $(SECURITY_FLAGS) $(MEM_DEBUG_FLAGS) $(KEYSYM_FLAGS) $(NO_DEPRECATED_FLAGS) $(TCL_EXTRA_CFLAGS) ${TCLCURL_CFLAGS}

DEFS		=  -DVERSION=\"0.95\" -DUSE_TCL_STUBS=1  $(EXTRA_CFLAGS)

ACLOCAL_M4	= $(srcdir)/aclocal.m4
CONFIGDIR	= ./tclconfig
CONFIG_CLEAN_FILES = mkIndex.tcl

CPPFLAGS	= 
LIBS		= 
AR		= ar
CFLAGS	= ${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_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)

libraries:

scripts: $(TCL_SCRIPTS)

doc:
#	@echo "If you have documentation to create, place the commands to"
#	@echo "build the docs in the 'doc:' target.  For example:"
#	@echo "        xml2nroff sample.xml > sample.n"
#	@echo "        xml2html sample.xml > sample.html"

install: all installdirs install-scripts install-binaries install-libraries install-doc

install-binaries: binaries install-lib-binaries install-bin-binaries
	$(TCLSH_PROG) mkIndex.tcl $($(PACKAGE)_LIB_FILE)
	if test "x$(SHARED_BUILD)" = "x1"; then \
	    $(TCLSH_PROG) mkIndex.tcl $($(PACKAGE)_LIB_FILE); \
	fi

#========================================================================
# This rule installs platform-independent files, such as header files.
#========================================================================

install-libraries: libraries
#	mkdir -p $(includedir)
#	@echo "Installing header files in $(includedir)"
#	@for i in $(GENERIC_HDRS) ; do \
#	    echo "Installing $$i" ; \
#	    $(INSTALL_DATA) $$i $(includedir) ; \
#	done;

#========================================================================
# This rule installs the scripts that are part of TclCurl.
#========================================================================

install-scripts: scripts
		@for i in $(TCL_SCRIPTS) ; do                \
		echo "Installing $$i" ;                      \
		$(INSTALL_DATA) $$i $(DESTDIR)$(pkglibdir) ; \
	done;

#========================================================================
# Install documentation.  Unix manpages should go in the $(mandir)
# directory.
#========================================================================

install-doc: doc
	mkdir -p $(mandir)/mann
	@echo "Installing documentation in $(mandir)"
	@for i in $(srcdir)/docs/*.n; \
	    do \
	    echo "Installing $$i"; \
	    rm -f $(mandir)/mann/$$i.gz; \
        gzip $$i; \
	    $(INSTALL_DATA) $$i.gz $(DESTDIR)$(mandir)/mann ; \
        gunzip $$i.gz; \
	    done

test: binaries libraries
	( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH_PROG)
	LD_LIBRARY_PATH="$(BUILD_DIR):$(TCL_BIN_DIR):$(LD_LIBRARY_PATH)" \
	LIBPATH="$(BUILD_DIR):$(TCL_BIN_DIR):${LIBPATH}" \
	SHLIB_PATH="$(BUILD_DIR):$(TCL_BIN_DIR):${SHLIB_PATH}" \
	TCLLIBPATH=. \
	PATH="$(BUILD_DIR):$(TCL_BIN_DIR):$(PATH)" \
	$(TCLSH_PROG) `echo $(srcdir)/tests/all.tcl` $(TESTFLAGS)

depend:

#========================================================================
# $($(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".
#
# 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)

#========================================================================
# We need to enumerate the list of .c to .o lines here.
# Unfortunately, there does not seem to be any other way to do this
# in a Makefile-independent way.  We can't use VPATH because it picks up
# object files that may be located in the source directory.
#
# 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 `echo $(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.
#========================================================================

VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win

.c.$(OBJEXT):
	$(COMPILE) -c `echo $<` -o $@

#========================================================================
# Distribution creation
# You may need to tweak this target to make it work correctly.
#========================================================================

#COMPRESS	= tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
COMPRESS	= gtar 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)/ChangeLog $(srcdir)/README* $(srcdir)/license* \
		$(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 library mac tests unix win'; \
	for p in $$list; do \
	    if test -d $(srcdir)/$$p ; then \
		mkdir $(DIST_DIR)/$$p; \
		cp -p $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \
	    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 -f $(CLEANFILES)

distclean: clean
	-rm -f *.tab.c
	-rm -f Makefile $(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.
# Additionally, the .dll files go into the bin directory, but the .lib
# files go into the lib directory.  On Unix platforms, all 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 tclsh8.2 shell)
#
# You should not have to modify this target.
#========================================================================

install-lib-binaries: installdirs
	@list='$(lib_BINARIES)'; for p in $$list; do \
	  if test -f $$p; then \
	    ext=`echo $$p|sed -e "s/.*\.//"`; \
	    if test "x$$ext" = "xdll"; then \
	        echo " $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p"; \
	        $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p; \
		lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
		if test -f $$lib; then \
		    echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib"; \
	            $(INSTALL_DATA) $$lib $(DESTDIR)$(libdir)/$$lib; \
		fi; \
	    else \
		echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
	        $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
	    fi; \
	  else :; fi; \
	done
	@list='$(lib_BINARIES)'; for p in $$list; do \
	  if test -f $$p; then \
	    echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
	    $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
	  else :; fi; \
	done

#========================================================================
# Install binary executables (e.g. .exe files)
#
# You should not have to modify this target.
#========================================================================

install-bin-binaries: installdirs checkAutoPath
	@list='$(bin_BINARIES)'; for p in $$list; do \
	  if test -f $$p; then \
	    echo " $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p"; \
	    $(INSTALL_DATA) $$p $(DESTDIR)$(bindir)/$$p; \
	  else :; 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='$(BINARIES)'; for p in $$list; do \
	  rm -f $(DESTDIR)$(libdir)/$$p; \
	done

installdirs:
	mkdir -p $(DESTDIR)$(libdir)
	mkdir -p $(DESTDIR)$(bindir)
	mkdir -p $(DESTDIR)$(pkglibdir)


checkAutoPath:
	if test "x$(DESTDIR)$(libdir)" != x/usr; then \
        echo "Checking Tcl's autoPath variable" ; \
		$(TCLSH_PROG) $(srcdir)/checkAutoPath.tcl $(DESTDIR)$(libdir); \
	fi;

.PHONY: all binaries clean depend distclean doc install installdirs \
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:
