# # This file is a Makefile for curses wish. 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. # # Current Ck version; used in various names. VERSION = @CK_VERSION@ # What I suppose version of Ck itself, regardless of used Tcl SRCVERSION=8.1.2 #---------------------------------------------------------------- # Things you can change to personalize the Makefile for your own # site (you can make these changes in either Makefile.in 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. INSTALL_ROOT = # Directory from which applications will reference the library of Tcl # scripts (note: you can set the CK_LIBRARY environment variable at # run-time to override the compiled-in location): CK_LIBRARY = $(prefix)/lib/ck$(VERSION) # Path name to use when installing library scripts: SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(CK_LIBRARY) # Directory in which to install the archive libck*: LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib # Directory in which to install the program cwsh: BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin # Directory from which the program cwsh should be referenced by scripts: BIN_DIR = $(exec_prefix)/bin # Directory in which to install the include file ck.h: INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include # Top-level directory for manual entries: MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man # Directory in which to install manual entry for cwsh: MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1 # Directory in which to install manual entries for C library # procedures: MAN3_INSTALL_DIR = $(MAN_INSTALL_DIR)/man3 # Directory in which to install manual entries for the built-in # Tcl commands implemented by Ck: MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/mann # The directory containing the Tcl headers appropriate # for this version ("srcdir" will be replaced or has already # been replaced by the configure script): TCL_VERSION = @TCL_VERSION@ TCL_DIR = @TCL_DIR@ # The directory containing the Tcl library archive file appropriate # for this version: TCL_BIN_DIR = @TCL_BIN_DIR@ # A "-I" switch that can be used when compiling to make curses.h # accessible (the configure script will try to set this value, and # will cause it to be an empty string if the include file is accessible # via /usr/include). CURSES_INCLUDES = @CURSESINCLUDES@ @USE_NCURSES@ # Linker switch(es) to use to link with the curses library archive (the # configure script will try to set this value automatically, but you # can override it). CURSES_LIB_SWITCHES = @CURSESLIBSW@ # Libraries to use when linking: must include at least Ck, Tcl, curses, # and the math library (in that order). The "LIBS" part will be # replaced (or has already been replaced) with relevant libraries as # determined by the configure script. LIBS = @TCL_BUILD_LIB_SPEC@ @LIBS@ $(CURSES_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc # To change the compiler switches, for example to change from -O # to -g, change the following line: CFLAGS = -O @TCL_INCLUDE_SPEC@ # To disable ANSI-C procedure prototypes reverse the comment characters # on the following lines: PROTO_FLAGS = #PROTO_FLAGS = -DNO_PROTOTYPE # 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. MEM_DEBUG_FLAGS = #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG # Some versions of make, like SGI's, use the following variable to # determine which shell to use for executing commands: SHELL = /bin/sh # Ck 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 symbols below provide support for dynamic loading and shared # libraries. The values of the symbols are normally set by the # configure script. You shouldn't normally need to modify any of # these definitions by hand. However, you can reverse the comments # on the pairs of lines to force "no dynamic loading or shared # libraries". #---------------------------------------------------------------- # Additional cc flags needed in order to compile Ck as a shared library. # This will be an empty string if Ck isn't configured as a shared library. CK_SHLIB_CFLAGS = @CK_SHLIB_CFLAGS@ #CK_SHLIB_CFLAGS = # Base command to use for combining object files into a shared # library: SHLIB_LD = @SHLIB_LD@ # Suffix to use for the name of the shared library. An empty string # means we don't know how to use shared libraries on this platform. SHLIB_SUFFIX = @SHLIB_SUFFIX@ #SHLIB_SUFFIX = # Version string to tack onto the name of shared libraries (after the # suffix), if it is needed for -lxxx to work during linking (e.g. on # FreeBSD and NetBSD). SHLIB_VERSION = @SHLIB_VERSION@ #SHLIB_VERSION = # Library file(s) to include in cwsh and other base applications # in order for the the "load" command to work (e.g. "-ldl"). DL_LIBS = @DL_LIBS@ #DL_LIBS = # Flags to pass to the compiler when linking object files into # an executable cwsh. LD_FLAGS = @LD_FLAGS@ @CK_LD_SEARCH_FLAGS@ #LD_FLAGS = CK_LIB_FILE = @CK_LIB_FILE@ #CK_LIB_FILE = libck.a #---------------------------------------------------------------- # The information below is modified by the configure script when # Makefile is generated from Makefile.in. You shouldn't normally # modify any of this stuff by hand. #---------------------------------------------------------------- AC_FLAGS = @DEFS@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ RANLIB = @RANLIB@ 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@ CC_SWITCHES = ${CFLAGS} ${CK_SHLIB_CFLAGS} -I${SRC_DIR} -I${TCL_DIR} \ ${CURSES_INCLUDES} ${AC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \ -DCK_LIBRARY=\"${CK_LIBRARY}\" WIDGOBJS = ckButton.o ckEntry.o ckFrame.o ckListbox.o \ ckMenu.o ckMenubutton.o ckMessage.o ckScrollbar.o ckTree.o TEXTOBJS = ckText.o ckTextBTree.o ckTextDisp.o ckTextIndex.o \ ckTextMark.o ckTextTag.o OBJS = ckBind.o ckBorder.o ckCmds.o ckConfig.o ckEvent.o ckFocus.o \ ckGeometry.o ckGet.o ckGrid.o ckMain.o ckOption.o ckPack.o ckPlace.o \ ckPreserve.o ckRecorder.o ckUtil.o ckWindow.o tkEvent.o \ $(WIDGOBJS) $(TEXTOBJS) SRCS = ckBind.c ckBorder.c ckCmds.c ckConfig.c ckEvent.c ckFocus.c \ ckGeometry.c ckGet.c ckGrid.c ckMain.c ckOption.c ckPack.c ckPlace.c \ ckPreserve.c ckRecorder.c ckUtil.c ckWindow.c tkEvent.c \ ckButton.c ckEntry.c ckFrame.c ckListbox.c \ ckMenu.c ckMenubutton.c ckMessage.c ckScrollbar.o \ ckText.c ckTextBTree.c ckTextDisp.c ckTextIndex.c \ ckTextMark.c ckTextTag.c ckTree.c \ ckAppInit.c HDRS = default.h ks_names.h ck.h ckPort.h ckText.h all: cwsh @CK_LIB_FILE@: $(OBJS) rm -f @CK_LIB_FILE@ @MAKE_LIB@ $(RANLIB) @CK_LIB_FILE@ cwsh: ckAppInit.o $(CK_LIB_FILE) $(CC) $(LD_FLAGS) ckAppInit.o @CK_BUILD_LIB_SPEC@ $(LIBS) -o cwsh configInfo: Makefile @rm -f configInfo @echo "# Definitions and libraries needed to build Ck applications" >> configInfo @echo "# (generated by the configure script):" >> configInfo @echo "CK_CC_SWITCHES = ${AC_FLAGS} ${MEM_DEBUG_FLAGS}" >> configInfo @echo "CK_CURSES_INCLUDES = ${CURSES_INCLUDES}" >> configInfo @echo "CK_LIBS = ${CURSES_LIB_SWITCHES} @LIBS@" >> configInfo install: install-binaries install-libraries install-binaries: $(CK_LIB_FILE) cwsh @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) $(LIB_INSTALL_DIR)/ck$(CK_VERSION) ; \ do \ if [ ! -d $$i ] ; then \ echo "Making directory $$i"; \ mkdir $$i; \ chmod 755 $$i; \ else true; \ fi; \ done; @echo "Installing $(CK_LIB_FILE)" @$(INSTALL_DATA) $(CK_LIB_FILE) $(LIB_INSTALL_DIR)/$(CK_LIB_FILE) @$(INSTALL_DATA) pkgIndex.tcl $(LIB_INSTALL_DIR)/ck$(CK_VERSION)/pkgIndex.tcl @$(RANLIB) $(LIB_INSTALL_DIR)/$(CK_LIB_FILE) chmod 555 $(LIB_INSTALL_DIR)/$(CK_LIB_FILE) @echo "Installing cwsh" @$(INSTALL_PROGRAM) cwsh $(BIN_INSTALL_DIR)/cwsh install-libraries: @for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \ $(SCRIPT_INSTALL_DIR) ; \ do \ if [ ! -d $$i ] ; then \ echo "Making directory $$i"; \ mkdir $$i; \ chmod 755 $$i; \ else true; \ fi; \ done; @echo "Installing ck.h" @$(INSTALL_DATA) $(SRC_DIR)/ck.h $(INCLUDE_INSTALL_DIR) for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/tclIndex \ $(SRC_DIR)/ckAppInit.c; do \ echo "Installing $$i"; \ $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \ done; install-demos: @for i in $(INSTALL_ROOT)$(prefix)/lib $(SCRIPT_INSTALL_DIR) \ $(SCRIPT_INSTALL_DIR)/demos \ $(SCRIPT_INSTALL_DIR)/demos/images ; \ do \ if [ ! -d $$i ] ; then \ echo "Making directory $$i"; \ mkdir $$i; \ chmod 755 $$i; \ else true; \ fi; \ done; @for i in $(SRC_DIR)/library/demos/*; \ do \ if [ -f $$i ] ; then \ echo "Installing $$i"; \ $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos; \ fi; \ done; @for i in $(DEMOPROGS); \ do \ chmod 755 $(SCRIPT_INSTALL_DIR)/demos/$$i; \ done; @for i in $(SRC_DIR)/library/demos/images/*; \ do \ if [ -f $$i ] ; then \ echo "Installing $$i"; \ $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/images; \ fi; \ done; install-man: @for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \ do \ if [ ! -d $$i ] ; then \ echo "Making directory $$i"; \ mkdir $$i; \ chmod 755 $$i; \ else true; \ fi; \ done; @cd $(SRC_DIR)/doc; for i in *.1; \ do \ echo "Installing doc/$$i"; \ rm -f $(MAN1_INSTALL_DIR)/$$i; \ sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \ $$i > $(MAN1_INSTALL_DIR)/$$i; \ chmod 444 $(MAN1_INSTALL_DIR)/$$i; \ done; @cd $(SRC_DIR)/doc; for i in *.3; \ do \ echo "Installing doc/$$i"; \ rm -f $(MAN3_INSTALL_DIR)/$$i; \ sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \ $$i > $(MAN3_INSTALL_DIR)/$$i; \ chmod 444 $(MAN3_INSTALL_DIR)/$$i; \ done; @cd $(SRC_DIR)/doc; for i in *.n; \ do \ echo "Installing doc/$$i"; \ rm -f $(MANN_INSTALL_DIR)/$$i; \ sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \ $$i > $(MANN_INSTALL_DIR)/$$i; \ chmod 444 $(MANN_INSTALL_DIR)/$$i; \ done; Makefile: $(SRC_DIR)/Makefile.in $(SHELL) config.status clean: rm -f *.a *.o core errs *~ ./.#* \#* TAGS *.E a.out errors cwsh \ config.info libck*.so libck*.a distclean: clean rm -f Makefile config.status config.cache config.log config.sub ckConfig.sh depend: makedepend -- $(CC_SWITCHES) -- $(SRCS) orig: ../libck-tcl_$(SRCVERSION).orig.tar.gz ../libck-tcl_$(SRCVERSION).orig.tar.gz: distclean tar -C .. -czf $@ --exclude "*/debian*" --exclude "*.3ck" --exclude "*/CVS*" `basename \`pwd\`` deb: orig debuild .c.o: $(CC) -c $(CC_SWITCHES) $< # DO NOT DELETE THIS LINE -- make depend depends on it.