Artifact Content

Artifact d1aff0f5a406254c7aa6175968f61f4705eae41f:

# This file is a Makefile for CTk.  If it has the name ""
# 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.
# @(#) $Id: ctk.shar,v 1.50 1996/01/15 14:47:16 andrewm Exp andrewm $

# Current CTk version;  used in various names.


# Things you can change to personalize the Makefile for your own
# site (you can make these changes in either or
# Makefile, but changes to Makefile will get lost if you re-run
# the configuration script).

# Default top-level directories in which to install architecture-
# specific files (exec_prefix) and machine-independent files such
# as scripts (prefix).  The values specified here may be overridden
# at configure-time with the --exec-prefix and --prefix options
# to the "configure" script.

prefix =	@prefix@
exec_prefix =	@exec_prefix@

# The following definition can be set to non-null for special systems
# like AFS with replication.  It allows the pathnames used for installation
# to be different than those used for actually reference files at
# run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
# when installing files.

# Directory from which applications will reference the library of Tcl
# scripts (note: you can set the CTK_LIBRARY environment variable at
# run-time to override the compiled-in location):
CTK_LIBRARY =		$(prefix)/lib/ctk$(VERSION)

# Path name to use when installing library scripts:

# Directory in which to install the archive libctk.a:
LIB_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/lib

# Directory in which to install the program cwish:
BIN_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/bin

# Directory from which the program cwish should be referenced by scripts:
BIN_DIR =		$(exec_prefix)/bin

# Directory in which to install the include file ctk.h:

# Top-level directory for manual entries:

# Directory in which to install manual entry for cwish:

# Libraries to use when linking:  must include at least the
# appropriate version of Tcl for this version of CTk, curses,
# and the math library (in that order).  It is (hopefully) filled
# in properly by the configure script.

# To change the compiler switches, for example to change from -O
# to -g, change the following line:

# Linker options (-L/.../lib) necessary to find the TCL
# and curses libraries (if any).  It is (hopefully) filled in
# properly by the configure script.

# Linker options when compiling a shared object

# Preprocessor options (-I/.../include) necessary to find the TCL
# and curses header files (if any).  It is (hopefully) filled in
# properly by the configure script.

# Preprocessor definitions.  It should be filled in properly by the
# configure script, but if configure did not find the curses library
# then you may have to add some definitions by hand.  The curses
# definitions are:
#   -DUSE_NCURSES_H=1	Curses include file is called "ncurses.h"
#   -DHAVE_CURS_SET=1	Curses package supports the curs_set() function
#   -DHAVE_SET_TERM=1	Curses package supports the set_term() function
#   -DHAVE_BEEP=1	Curses package supports the beep() function
#   -DHAVE_KEYPAD=1	Curses package supports the keypad() function

# To turn off the security checks that disallow incoming sends when
# the X server appears to be insecure, reverse the comments on the
# following lines:

# To disable ANSI-C procedure prototypes reverse the comment characters
# on the following lines:

# To enable memory debugging reverse the comment characters on the following
# lines.  Warning:  if you enable memory debugging, you must do it
# *everywhere*, including all the code that calls Tcl, and you must use
# ckalloc and ckfree everywhere instead of malloc and free.

# Some versions of make, like SGI's, use the following variable to
# determine which shell to use for executing commands:
SHELL =		/bin/sh

# CTk used to let the configure script choose which program to use
# for installing, but there are just too many different versions of
# "install" around;  better to use the install-sh script that comes
# with the distribution, which is slower but guaranteed to work.

INSTALL = @srcdir@/install-sh -c

# The information below is modified by the configure script when
# Makefile is generated from  You shouldn't normally
# modify any of this stuff by hand.

SRC_DIR =		@srcdir@
VPATH =			@srcdir@

# The information below should be usable as is.  The configure
# script won't modify it and you shouldn't need to modify it
# either.

CC =		@CC@

WIDGOBJS = tkButton.o tkEntry.o tkFrame.o tkListbox.o \
	tkMenu.o tkMenubutton.o tkScrollbar.o

TEXTOBJS = tkText.o tkTextBTree.o tkTextDisp.o tkTextIndex.o \
	tkTextMark.o tkTextTag.o

OBJS = ctkDisplay.o ctkRegion.o tkAppInit.o tkArgv.o tkBind.o tkCmds.o \
	tkConfig.o tkFocus.o tkFont.o tkGeometry.o tkGet.o \
	tkMain.o tkOption.o tkPack.o tkPlace.o tkPreserve.o tkUtil.o \
	tkWindow.o tkXEvent.o \

SRCS = ctkDisplay.c ctkRegion.c tkAppInit.c tkArgv.c tkBind.c tkButton.c \
	tkCmds.c tkConfig.c tkEntry.c tkFocus.c tkFont.c tkFrame.c \
	tkGeometry.c tkGet.c tkListbox.c tkMain.c tkMenu.c tkMenubutton.c \
	tkOption.c tkPack.c tkPlace.c tkPreserve.c tkScrollbar.c tkText.c \
	tkTextBTree.c tkTextDisp.c tkTextIndex.c tkTextMark.c tkTextTag.c \
	tkUtil.c tkWindow.c tkXEvent.c

HDRS = default.h keyCodes.h ks_names.h patchlevel.h tk.h tkInt.h \
	tkPort.h tkText.h

DEMOPROGS = widget

all: @TARGETS@

libctk.a: $(OBJS)
	rm -f libctk.a
	ar cr libctk.a $(OBJS)
	$(RANLIB) libctk.a

libctk.@SHOBJEXT@: $(OBJS)
	rm -f libctk.@SHOBJEXT@

configInfo: Makefile
	@rm -f configInfo
	@echo "# Definitions and libraries needed to build Tk applications" >> configInfo
	@echo "# (generated by the configure script):" >> configInfo
	@echo "TK_CC_SWITCHES = ${AC_FLAGS} ${MEM_DEBUG_FLAGS}" >> configInfo
	@echo "TK_LIBS = @LIBS@" >> configInfo

install: install-binaries install-libraries install-demos install-man

install-binaries: libctk.a
	@for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	@echo "Installing libctk.a"
	@$(RANLIB) $(LIB_INSTALL_DIR)/libctk.a

	@for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	@echo "Installing ctk.h"
	for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/tclIndex; \
	    do \
	    echo "Installing $$i"; \

	@for i in $(INSTALL_ROOT)$(prefix)/lib $(SCRIPT_INSTALL_DIR) \
		$(SCRIPT_INSTALL_DIR)/demos; \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	@cd $(SRC_DIR)/library/demos; for i in *; \
	    do \
	    if [ -f $$i ] ; then \
		echo "Installing library/demos/$$i"; \
		sed -e '1 s|/usr/local/bin/cwish|$(BIN_DIR)/cwish$(VERSION)|' \
			$$i > $(SCRIPT_INSTALL_DIR)/demos/$$i; \
	    fi; \
	@for i in $(DEMOPROGS); \
	    do \
	    chmod 755 $(SCRIPT_INSTALL_DIR)/demos/$$i; \

	@for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR); \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	@for i in *.1; \
	    do \
	    echo "Installing doc/$$i"; \

Makefile: $(SRC_DIR)/
	$(SHELL) config.status

	rm -f libctk.a
	rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors tktest cwish$(VERSION) \

distclean: clean
	rm -f Makefile config.status config.log

	makedepend -- $(CC_SWITCHES) -- $(SRCS)

	$(CC) -c $(CC_SWITCHES) $<

# Target to check for proper usage of UCHAR macro.

	-egrep isalnum\|isalpha\|iscntrl\|isdigit\|islower\|isprint\|ispunct\|isspace\|isupper\|isxdigit $(SRCS) | grep -v UCHAR

# Target to make sure that only symbols with "Tk" or "Ctk" prefixes are
# exported.

checkexports: libctk.a
	-nm -p libctk.a | awk '$$2 ~ /[TDB]/ { print $$3 }' | sort -n | grep -v '^[Cc]?[Tt]k'

# Target to create a proper Tk distribution from information in the
# master source directory.  DISTDIR must be defined to indicate where
# to put the distribution.

dist:   configure
	rm -rf $(DISTDIR)
	mkdir $(DISTDIR)
	cp license.terms $(DISTDIR)
	chmod 664 $(DISTDIR)/
	cp -p $(SRCS) $(HDRS) $(DISTDIR)
	mkdir $(DISTDIR)/compat
	cp -p license.terms compat/unistd.h compat/stdlib.h $(DISTDIR)/compat
	cp -p README README.TERM ToDo changes porting.notes *.1 $(DISTDIR)
	cp -p configure install-sh $(DISTDIR)
	chmod 775 $(DISTDIR)/configure $(DISTDIR)/
	chmod +x $(DISTDIR)/install-sh
	mkdir $(DISTDIR)/library
	cp -p license.terms library/*.tcl library/tclIndex $(DISTDIR)/library
	mkdir $(DISTDIR)/library/demos
	cp -pr library/demos/widget library/demos/README \
		license.terms $(DISTDIR)/library/demos

	@echo ctk README README.TERM ToDo changes porting.notes license.terms \ install-sh \
		$(SRCS) $(HDRS) compat library
# DO NOT DELETE THIS LINE -- make depend depends on it.