2 # This file is a Makefile for curses wish. If it has the name "Makefile.in"
3 # then it is a template for a Makefile; to generate the actual Makefile,
4 # run "./configure", which is a configuration script generated by the
5 # "autoconf" program (constructs like "@foo@" will get replaced in the
9 # Current Ck version; used in various names.
11 VERSION = @CK_VERSION@
13 # What I suppose version of Ck itself, regardless of used Tcl
18 #----------------------------------------------------------------
19 # Things you can change to personalize the Makefile for your own
20 # site (you can make these changes in either Makefile.in or
21 # Makefile, but changes to Makefile will get lost if you re-run
22 # the configuration script).
23 #----------------------------------------------------------------
25 # Default top-level directories in which to install architecture-
26 # specific files (exec_prefix) and machine-independent files such
27 # as scripts (prefix). The values specified here may be overridden
28 # at configure-time with the --exec-prefix and --prefix options
29 # to the "configure" script.
32 exec_prefix = @exec_prefix@
34 # The following definition can be set to non-null for special systems
35 # like AFS with replication. It allows the pathnames used for installation
36 # to be different than those used for actually reference files at
37 # run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
38 # when installing files.
41 # Directory from which applications will reference the library of Tcl
42 # scripts (note: you can set the CK_LIBRARY environment variable at
43 # run-time to override the compiled-in location):
44 CK_LIBRARY = $(prefix)/lib/ck$(VERSION)
46 # Path name to use when installing library scripts:
47 SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(CK_LIBRARY)
49 # Directory in which to install the archive libck*:
50 LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
52 # Directory in which to install the program cwsh:
53 BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
55 # Directory from which the program cwsh should be referenced by scripts:
56 BIN_DIR = $(exec_prefix)/bin
58 # Directory in which to install the include file ck.h:
59 INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include
61 # Top-level directory for manual entries:
62 MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man
64 # Directory in which to install manual entry for cwsh:
65 MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1
67 # Directory in which to install manual entries for C library
69 MAN3_INSTALL_DIR = $(MAN_INSTALL_DIR)/man3
71 # Directory in which to install manual entries for the built-in
72 # Tcl commands implemented by Ck:
73 MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/mann
75 # The directory containing the Tcl headers appropriate
76 # for this version ("srcdir" will be replaced or has already
77 # been replaced by the configure script):
78 TCL_VERSION = @TCL_VERSION@
81 # The directory containing the Tcl library archive file appropriate
83 TCL_BIN_DIR = @TCL_BIN_DIR@
85 # A "-I" switch that can be used when compiling to make curses.h
86 # accessible (the configure script will try to set this value, and
87 # will cause it to be an empty string if the include file is accessible
89 CURSES_INCLUDES = @CURSESINCLUDES@ @USE_NCURSES@
91 # Linker switch(es) to use to link with the curses library archive (the
92 # configure script will try to set this value automatically, but you
94 CURSES_LIB_SWITCHES = @CURSESLIBSW@
96 # Libraries to use when linking: must include at least Ck, Tcl, curses,
97 # and the math library (in that order). The "LIBS" part will be
98 # replaced (or has already been replaced) with relevant libraries as
99 # determined by the configure script.
100 LIBS = @TCL_BUILD_LIB_SPEC@ @LIBS@ $(CURSES_LIB_SWITCHES) @DL_LIBS@ @MATH_LIBS@ -lc
102 # To change the compiler switches, for example to change from -O
103 # to -g, change the following line:
104 CFLAGS = -O @TCL_INCLUDE_SPEC@
106 # To disable ANSI-C procedure prototypes reverse the comment characters
107 # on the following lines:
109 #PROTO_FLAGS = -DNO_PROTOTYPE
111 # To enable memory debugging reverse the comment characters on the following
112 # lines. Warning: if you enable memory debugging, you must do it
113 # *everywhere*, including all the code that calls Tcl, and you must use
114 # ckalloc and ckfree everywhere instead of malloc and free.
116 #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
118 # Some versions of make, like SGI's, use the following variable to
119 # determine which shell to use for executing commands:
122 # Ck used to let the configure script choose which program to use
123 # for installing, but there are just too many different versions of
124 # "install" around; better to use the install-sh script that comes
125 # with the distribution, which is slower but guaranteed to work.
127 INSTALL = @srcdir@/install-sh -c
129 #----------------------------------------------------------------
130 # The symbols below provide support for dynamic loading and shared
131 # libraries. The values of the symbols are normally set by the
132 # configure script. You shouldn't normally need to modify any of
133 # these definitions by hand. However, you can reverse the comments
134 # on the pairs of lines to force "no dynamic loading or shared
136 #----------------------------------------------------------------
138 # Additional cc flags needed in order to compile Ck as a shared library.
139 # This will be an empty string if Ck isn't configured as a shared library.
140 CK_SHLIB_CFLAGS = @CK_SHLIB_CFLAGS@
143 # Base command to use for combining object files into a shared
145 SHLIB_LD = @SHLIB_LD@
147 # Suffix to use for the name of the shared library. An empty string
148 # means we don't know how to use shared libraries on this platform.
149 SHLIB_SUFFIX = @SHLIB_SUFFIX@
152 # Version string to tack onto the name of shared libraries (after the
153 # suffix), if it is needed for -lxxx to work during linking (e.g. on
154 # FreeBSD and NetBSD).
155 SHLIB_VERSION = @SHLIB_VERSION@
158 # Library file(s) to include in cwsh and other base applications
159 # in order for the the "load" command to work (e.g. "-ldl").
163 # Flags to pass to the compiler when linking object files into
164 # an executable cwsh.
165 LD_FLAGS = @LD_FLAGS@ @CK_LD_SEARCH_FLAGS@
168 CK_LIB_FILE = @CK_LIB_FILE@
169 #CK_LIB_FILE = libck.a
171 #----------------------------------------------------------------
172 # The information below is modified by the configure script when
173 # Makefile is generated from Makefile.in. You shouldn't normally
174 # modify any of this stuff by hand.
175 #----------------------------------------------------------------
178 INSTALL_PROGRAM = @INSTALL_PROGRAM@
179 INSTALL_DATA = @INSTALL_DATA@
184 #----------------------------------------------------------------
185 # The information below should be usable as is. The configure
186 # script won't modify it and you shouldn't need to modify it
188 #----------------------------------------------------------------
191 CC_SWITCHES = ${CFLAGS} ${CK_SHLIB_CFLAGS} -I${SRC_DIR} -I${TCL_DIR} \
192 ${CURSES_INCLUDES} ${AC_FLAGS} ${PROTO_FLAGS} ${MEM_DEBUG_FLAGS} \
193 -DCK_LIBRARY=\"${CK_LIBRARY}\"
195 WIDGOBJS = ckButton.o ckEntry.o ckFrame.o ckListbox.o \
196 ckMenu.o ckMenubutton.o ckMessage.o ckScrollbar.o ckTree.o
198 TEXTOBJS = ckText.o ckTextBTree.o ckTextDisp.o ckTextIndex.o \
199 ckTextMark.o ckTextTag.o
201 OBJS = ckBind.o ckBorder.o ckCmds.o ckConfig.o ckEvent.o ckFocus.o \
202 ckGeometry.o ckGet.o ckGrid.o ckMain.o ckOption.o ckPack.o ckPlace.o \
203 ckPreserve.o ckRecorder.o ckUtil.o ckWindow.o tkEvent.o \
204 $(WIDGOBJS) $(TEXTOBJS)
206 SRCS = ckBind.c ckBorder.c ckCmds.c ckConfig.c ckEvent.c ckFocus.c \
207 ckGeometry.c ckGet.c ckGrid.c ckMain.c ckOption.c ckPack.c ckPlace.c \
208 ckPreserve.c ckRecorder.c ckUtil.c ckWindow.c tkEvent.c \
209 ckButton.c ckEntry.c ckFrame.c ckListbox.c \
210 ckMenu.c ckMenubutton.c ckMessage.c ckScrollbar.o \
211 ckText.c ckTextBTree.c ckTextDisp.c ckTextIndex.c \
212 ckTextMark.c ckTextTag.c ckTree.c \
215 HDRS = default.h ks_names.h ck.h ckPort.h ckText.h
219 @CK_LIB_FILE@: $(OBJS)
222 $(RANLIB) @CK_LIB_FILE@
224 cwsh: ckAppInit.o $(CK_LIB_FILE)
225 $(CC) $(LD_FLAGS) ckAppInit.o @CK_BUILD_LIB_SPEC@ $(LIBS) -o cwsh
229 @echo "# Definitions and libraries needed to build Ck applications" >> configInfo
230 @echo "# (generated by the configure script):" >> configInfo
231 @echo "CK_CC_SWITCHES = ${AC_FLAGS} ${MEM_DEBUG_FLAGS}" >> configInfo
232 @echo "CK_CURSES_INCLUDES = ${CURSES_INCLUDES}" >> configInfo
233 @echo "CK_LIBS = ${CURSES_LIB_SWITCHES} @LIBS@" >> configInfo
235 install: install-binaries install-libraries
237 install-binaries: $(CK_LIB_FILE) cwsh
238 @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) $(LIB_INSTALL_DIR)/ck$(CK_VERSION) ; \
240 if [ ! -d $$i ] ; then \
241 echo "Making directory $$i"; \
247 @echo "Installing $(CK_LIB_FILE)"
248 @$(INSTALL_DATA) $(CK_LIB_FILE) $(LIB_INSTALL_DIR)/$(CK_LIB_FILE)
249 @$(INSTALL_DATA) pkgIndex.tcl $(LIB_INSTALL_DIR)/ck$(CK_VERSION)/pkgIndex.tcl
250 @$(RANLIB) $(LIB_INSTALL_DIR)/$(CK_LIB_FILE)
251 chmod 555 $(LIB_INSTALL_DIR)/$(CK_LIB_FILE)
252 @echo "Installing cwsh"
253 @$(INSTALL_PROGRAM) cwsh $(BIN_INSTALL_DIR)/cwsh
256 @for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
257 $(SCRIPT_INSTALL_DIR) ; \
259 if [ ! -d $$i ] ; then \
260 echo "Making directory $$i"; \
266 @echo "Installing ck.h"
267 @$(INSTALL_DATA) $(SRC_DIR)/ck.h $(INCLUDE_INSTALL_DIR)
268 for i in $(SRC_DIR)/library/*.tcl $(SRC_DIR)/library/tclIndex \
269 $(SRC_DIR)/ckAppInit.c; do \
270 echo "Installing $$i"; \
271 $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
275 @for i in $(INSTALL_ROOT)$(prefix)/lib $(SCRIPT_INSTALL_DIR) \
276 $(SCRIPT_INSTALL_DIR)/demos \
277 $(SCRIPT_INSTALL_DIR)/demos/images ; \
279 if [ ! -d $$i ] ; then \
280 echo "Making directory $$i"; \
286 @for i in $(SRC_DIR)/library/demos/*; \
288 if [ -f $$i ] ; then \
289 echo "Installing $$i"; \
290 $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos; \
293 @for i in $(DEMOPROGS); \
295 chmod 755 $(SCRIPT_INSTALL_DIR)/demos/$$i; \
297 @for i in $(SRC_DIR)/library/demos/images/*; \
299 if [ -f $$i ] ; then \
300 echo "Installing $$i"; \
301 $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/images; \
306 @for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \
308 if [ ! -d $$i ] ; then \
309 echo "Making directory $$i"; \
315 @cd $(SRC_DIR)/doc; for i in *.1; \
317 echo "Installing doc/$$i"; \
318 rm -f $(MAN1_INSTALL_DIR)/$$i; \
319 sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
320 $$i > $(MAN1_INSTALL_DIR)/$$i; \
321 chmod 444 $(MAN1_INSTALL_DIR)/$$i; \
323 @cd $(SRC_DIR)/doc; for i in *.3; \
325 echo "Installing doc/$$i"; \
326 rm -f $(MAN3_INSTALL_DIR)/$$i; \
327 sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
328 $$i > $(MAN3_INSTALL_DIR)/$$i; \
329 chmod 444 $(MAN3_INSTALL_DIR)/$$i; \
331 @cd $(SRC_DIR)/doc; for i in *.n; \
333 echo "Installing doc/$$i"; \
334 rm -f $(MANN_INSTALL_DIR)/$$i; \
335 sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
336 $$i > $(MANN_INSTALL_DIR)/$$i; \
337 chmod 444 $(MANN_INSTALL_DIR)/$$i; \
340 Makefile: $(SRC_DIR)/Makefile.in
341 $(SHELL) config.status
344 rm -f *.a *.o core errs *~ ./.#* \#* TAGS *.E a.out errors cwsh \
345 config.info libck*.so libck*.a
348 rm -f Makefile config.status config.cache config.log config.sub ckConfig.sh
351 makedepend -- $(CC_SWITCHES) -- $(SRCS)
353 orig: ../libck-tcl_$(SRCVERSION).orig.tar.gz
355 ../libck-tcl_$(SRCVERSION).orig.tar.gz: distclean
356 tar -C .. -czf $@ --exclude "*/debian*" --exclude "*.3ck" --exclude "*/CVS*" `basename \`pwd\``
362 $(CC) -c $(CC_SWITCHES) $<
364 # DO NOT DELETE THIS LINE -- make depend depends on it.