]> www.wagner.pp.ru Git - oss/ck.git/blob - Makefile.in
Ck console graphics toolkit
[oss/ck.git] / Makefile.in
1 #
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
6 # actual Makefile.
7 #
8
9 # Current Ck version;  used in various names.
10
11 VERSION = @CK_VERSION@
12
13 # What I suppose version of Ck itself, regardless of used Tcl
14
15 SRCVERSION=8.1.2
16
17
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 #----------------------------------------------------------------
24
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.
30
31 prefix =                @prefix@
32 exec_prefix =           @exec_prefix@
33
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.
39 INSTALL_ROOT =
40
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)
45
46 # Path name to use when installing library scripts:
47 SCRIPT_INSTALL_DIR =    $(INSTALL_ROOT)$(CK_LIBRARY)
48
49 # Directory in which to install the archive libck*:
50 LIB_INSTALL_DIR =       $(INSTALL_ROOT)$(exec_prefix)/lib
51
52 # Directory in which to install the program cwsh:
53 BIN_INSTALL_DIR =       $(INSTALL_ROOT)$(exec_prefix)/bin
54
55 # Directory from which the program cwsh should be referenced by scripts:
56 BIN_DIR =               $(exec_prefix)/bin
57
58 # Directory in which to install the include file ck.h:
59 INCLUDE_INSTALL_DIR =   $(INSTALL_ROOT)$(prefix)/include
60
61 # Top-level directory for manual entries:
62 MAN_INSTALL_DIR =       $(INSTALL_ROOT)$(prefix)/man
63
64 # Directory in which to install manual entry for cwsh:
65 MAN1_INSTALL_DIR =      $(MAN_INSTALL_DIR)/man1
66
67 # Directory in which to install manual entries for C library
68 # procedures:
69 MAN3_INSTALL_DIR =      $(MAN_INSTALL_DIR)/man3
70
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
74
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@
79 TCL_DIR =               @TCL_DIR@
80
81 # The directory containing the Tcl library archive file appropriate
82 # for this version:
83 TCL_BIN_DIR =           @TCL_BIN_DIR@
84
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
88 # via /usr/include).
89 CURSES_INCLUDES = @CURSESINCLUDES@ @USE_NCURSES@
90
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
93 # can override it).
94 CURSES_LIB_SWITCHES =   @CURSESLIBSW@
95
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
101
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@
105
106 # To disable ANSI-C procedure prototypes reverse the comment characters
107 # on the following lines:
108 PROTO_FLAGS =
109 #PROTO_FLAGS = -DNO_PROTOTYPE
110
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.
115 MEM_DEBUG_FLAGS =
116 #MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
117
118 # Some versions of make, like SGI's, use the following variable to
119 # determine which shell to use for executing commands:
120 SHELL =         /bin/sh
121
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.
126
127 INSTALL = @srcdir@/install-sh -c
128
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
135 # libraries".
136 #----------------------------------------------------------------
137
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@
141 #CK_SHLIB_CFLAGS =
142
143 # Base command to use for combining object files into a shared
144 # library:
145 SHLIB_LD = @SHLIB_LD@
146
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@
150 #SHLIB_SUFFIX =
151
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@
156 #SHLIB_VERSION =
157
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").
160 DL_LIBS = @DL_LIBS@
161 #DL_LIBS =
162
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@
166 #LD_FLAGS =
167
168 CK_LIB_FILE = @CK_LIB_FILE@
169 #CK_LIB_FILE = libck.a
170
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 #----------------------------------------------------------------
176
177 AC_FLAGS =              @DEFS@
178 INSTALL_PROGRAM =       @INSTALL_PROGRAM@
179 INSTALL_DATA =          @INSTALL_DATA@
180 RANLIB =                @RANLIB@
181 SRC_DIR =               @srcdir@
182 VPATH =                 @srcdir@
183
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
187 # either.
188 #----------------------------------------------------------------
189
190 CC =            @CC@
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}\"
194
195 WIDGOBJS = ckButton.o ckEntry.o ckFrame.o ckListbox.o \
196         ckMenu.o ckMenubutton.o ckMessage.o ckScrollbar.o ckTree.o
197
198 TEXTOBJS = ckText.o ckTextBTree.o ckTextDisp.o ckTextIndex.o \
199         ckTextMark.o ckTextTag.o
200
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)
205
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 \
213         ckAppInit.c
214
215 HDRS = default.h ks_names.h ck.h ckPort.h ckText.h
216
217 all: cwsh
218
219 @CK_LIB_FILE@: $(OBJS)
220         rm -f @CK_LIB_FILE@
221         @MAKE_LIB@
222         $(RANLIB) @CK_LIB_FILE@
223
224 cwsh: ckAppInit.o $(CK_LIB_FILE)
225         $(CC) $(LD_FLAGS) ckAppInit.o @CK_BUILD_LIB_SPEC@ $(LIBS) -o cwsh
226
227 configInfo: Makefile
228         @rm -f configInfo
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
234
235 install: install-binaries install-libraries
236
237 install-binaries: $(CK_LIB_FILE) cwsh
238         @for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) $(LIB_INSTALL_DIR)/ck$(CK_VERSION) ; \
239             do \
240             if [ ! -d $$i ] ; then \
241                 echo "Making directory $$i"; \
242                 mkdir $$i; \
243                 chmod 755 $$i; \
244                 else true; \
245                 fi; \
246             done;
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
254
255 install-libraries:
256         @for i in $(INSTALL_ROOT)$(prefix)/lib $(INCLUDE_INSTALL_DIR) \
257                 $(SCRIPT_INSTALL_DIR) ; \
258             do \
259             if [ ! -d $$i ] ; then \
260                 echo "Making directory $$i"; \
261                 mkdir $$i; \
262                 chmod 755 $$i; \
263                 else true; \
264                 fi; \
265             done;
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); \
272             done;
273
274 install-demos:
275         @for i in $(INSTALL_ROOT)$(prefix)/lib $(SCRIPT_INSTALL_DIR) \
276                 $(SCRIPT_INSTALL_DIR)/demos \
277                 $(SCRIPT_INSTALL_DIR)/demos/images ; \
278             do \
279             if [ ! -d $$i ] ; then \
280                 echo "Making directory $$i"; \
281                 mkdir $$i; \
282                 chmod 755 $$i; \
283                 else true; \
284                 fi; \
285             done;
286         @for i in $(SRC_DIR)/library/demos/*; \
287             do \
288             if [ -f $$i ] ; then \
289                 echo "Installing $$i"; \
290                 $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos; \
291             fi; \
292             done;
293         @for i in $(DEMOPROGS); \
294             do \
295             chmod 755 $(SCRIPT_INSTALL_DIR)/demos/$$i; \
296             done;
297         @for i in $(SRC_DIR)/library/demos/images/*; \
298             do \
299             if [ -f $$i ] ; then \
300                 echo "Installing $$i"; \
301                 $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR)/demos/images; \
302                 fi; \
303             done;
304
305 install-man:
306         @for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \
307             do \
308             if [ ! -d $$i ] ; then \
309                 echo "Making directory $$i"; \
310                 mkdir $$i; \
311                 chmod 755 $$i; \
312                 else true; \
313                 fi; \
314             done;
315         @cd $(SRC_DIR)/doc; for i in *.1; \
316             do \
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; \
322             done;
323         @cd $(SRC_DIR)/doc; for i in *.3; \
324             do \
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; \
330             done;
331         @cd $(SRC_DIR)/doc; for i in *.n; \
332             do \
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; \
338             done;
339
340 Makefile: $(SRC_DIR)/Makefile.in
341         $(SHELL) config.status
342
343 clean:
344         rm -f *.a *.o core errs *~ ./.#* \#* TAGS *.E a.out errors cwsh \
345                 config.info libck*.so libck*.a 
346
347 distclean: clean
348         rm -f Makefile config.status config.cache config.log config.sub ckConfig.sh
349
350 depend:
351         makedepend -- $(CC_SWITCHES) -- $(SRCS)
352
353 orig: ../libck-tcl_$(SRCVERSION).orig.tar.gz
354
355 ../libck-tcl_$(SRCVERSION).orig.tar.gz: distclean
356         tar -C .. -czf $@ --exclude "*/debian*" --exclude "*.3ck" --exclude "*/CVS*" `basename \`pwd\``  
357
358 deb: orig
359         debuild 
360
361 .c.o:
362         $(CC) -c $(CC_SWITCHES) $<
363
364 # DO NOT DELETE THIS LINE -- make depend depends on it.