1#
2# This file is a Makefile for MEMCHAN 2.2a4.  If it has the
3# name "Makefile.in" then it is a template for a Makefile;  to generate
4# the actual Makefile, run "./configure", which is a configuration
5# script generated by the "autoconf" program (constructs like "@foo@"
6# will get replaced in the actual Makefile.
7#
8# Distribution as of AUG-20-2002
9#
10# $Id: Makefile.in,v 1.20 2004/06/03 23:39:13 patthoyts Exp $
11
12EXTENSION	=	Memchan
13VERSION		=	2.2.0
14
15#----------------------------------------------------------------
16# Things you can change to personalize the Makefile for your own
17# site (you can make these changes in either Makefile.in or
18# Makefile, but changes to Makefile will get lost if you re-run
19# the configuration script).
20#----------------------------------------------------------------
21
22# Directory containing the unix specific part of the extension
23srcdir		=	@srcdir@
24TOP_DIR		=	@srcdir@/..
25GENERIC_DIR	=	$(TOP_DIR)/generic
26ISAAC_DIR	=	$(TOP_DIR)/isaac
27UNIX_DIR	=	@srcdir@
28
29
30# Directories in which the tcl core can be found
31TCL_INCLUDE_DIR		=	@TCL_INCLUDE_DIR@
32TCL_LIB_DIR		=	@TCL_LIB_DIR@
33
34
35# Default top-level directories in which to install architecture-
36# specific files (exec_prefix) and machine-independent files such
37# as scripts (prefix).  The values specified here may be overridden
38# at configure-time with the --exec-prefix and --prefix options
39# to the "configure" script.
40
41prefix		=	@prefix@
42exec_prefix	=	@exec_prefix@
43
44# Directory containing scripts supporting the work of this makefile
45tool		=	$(TOP_DIR)/tools
46top_tool	=	./tools
47
48
49
50# The following definition can be set to non-null for special systems
51# like AFS with replication.  It allows the pathnames used for installation
52# to be different than those used for actually reference files at
53# run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
54# when installing files.
55INSTALL_ROOT =
56
57
58# Directory in which libMEMCHAN.a is at runtime:
59LIB_RUNTIME_DIR =	$(exec_prefix)/lib/$(EXTENSION)$(VERSION)
60
61
62# Directory in which to install the archive libMEMCHAN.a:
63LIB_INSTALL_DIR =	$(INSTALL_ROOT)$(LIB_RUNTIME_DIR)
64
65
66# Directory in which to install the extended shell tclsh:
67BIN_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/bin
68
69
70# Directory in which to install the include file transform.h:
71INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/include
72
73
74# Top-level directory in which to install manual entries:
75MAN_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/man
76
77
78# To change the compiler switches, for example to change from -O
79# to -g, change the following line:
80CFLAGS		=	-O
81
82
83# To disable ANSI-C procedure prototypes reverse the comment characters
84# on the following lines:
85PROTO_FLAGS =
86#PROTO_FLAGS = -DNO_PROTOTYPE
87
88
89# To enable memory debugging reverse the comment characters on the following
90# lines.  Warning:  if you enable memory debugging, you must do it
91# *everywhere*, including all the code that calls Tcl, and you must use
92# ckalloc and ckfree everywhere instead of malloc and free.
93MEM_DEBUG_FLAGS =
94#MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
95
96
97# Some versions of make, like SGI's, use the following variable to
98# determine which shell to use for executing commands:
99SHELL =		/bin/sh
100
101
102# Tcl used to let the configure script choose which program to use
103# for installing, but there are just too many different versions of
104# "install" around;  better to use the install-sh script that comes
105# with the distribution, which is slower but guaranteed to work.
106
107INSTALL = $(tool)/install-sh -c
108
109
110# The symbols below provide support for dynamic loading and shared
111# libraries.  The values of the symbols are normally set by the
112# configure script.  You shouldn't normally need to modify any of
113# these definitions by hand.
114
115MEMCHAN_SHLIB_CFLAGS = @MEMCHAN_SHLIB_CFLAGS@
116
117
118# The symbol below provides support for dynamic loading and shared
119# libraries.  See configure.in for a description of what it means.
120# The values of the symbolis normally set by the configure script.
121
122SHLIB_LD = @SHLIB_LD@
123
124
125# Libraries to use when linking:  must include at least the dynamic
126# loading library and the math library (in that order).  This
127# definition is determined by the configure script.
128LIBS = @TCL_LIB_SPEC@ -lc
129
130MEMCHAN_LIB_FILE = @MEMCHAN_LIB_FILE@
131#MEMCHAN_LIB_FILE = libmemchan.a
132
133#----------------------------------------------------------------
134# The information below is modified by the configure script when
135# Makefile is generated from Makefile.in.  You shouldn't normally
136# modify any of this stuff by hand.
137#----------------------------------------------------------------
138
139INSTALL_PROGRAM =	$(INSTALL) -m 755
140INSTALL_DATA =		$(INSTALL) -m 644
141RANLIB =		@RANLIB@
142
143#----------------------------------------------------------------
144# The information below should be usable as is.  The configure
145# script won't modify it and you shouldn't need to modify it
146# either.
147#----------------------------------------------------------------
148
149CC		=	@CC@
150
151CC_SWITCHES	=	$(CFLAGS) $(MEMCHAN_SHLIB_CFLAGS) $(CPPFLAGS) -DMEMCHAN_VERSION=\"$(VERSION)\"
152# $(TCL_CC_SWITCHES)
153CPPFLAGS	=	$(DEFINES) $(INCLUDES)
154
155INCLUDES	=	-I. -I$(srcdir) -I$(GENERIC_DIR) -I$(TOP_DIR)	\
156			-I$(TCL_INCLUDE_DIR)
157
158DEFINES		=	$(PROTO_FLAGS) $(MEM_DEBUG_FLAGS) @DEFS@ @TCL_DEFS@
159
160HEADER		=	
161
162SOURCES		=	$(GENERIC_DIR)/memchan.c	\
163			$(GENERIC_DIR)/init.c		\
164			$(GENERIC_DIR)/fifo.c		\
165			$(GENERIC_DIR)/fifo2.c		\
166			$(GENERIC_DIR)/null.c		\
167			$(GENERIC_DIR)/zero.c		\
168			$(GENERIC_DIR)/random.c		\
169			$(GENERIC_DIR)/buf.c		\
170			$(GENERIC_DIR)/bufRange.c	\
171			$(GENERIC_DIR)/bufFix.c		\
172			$(GENERIC_DIR)/bufExt.c		\
173			$(GENERIC_DIR)/bufQueue.c	\
174			$(GENERIC_DIR)/counter.c	\
175			$(GENERIC_DIR)/bufStubInit.c	\
176			$(GENERIC_DIR)/bufStubLib.c     \
177			$(ISAAC_DIR)/randport.c
178
179OBJECTS		=	init.o counter.o	\
180			memchan.o fifo.o	\
181			fifo2.o null.o		\
182			zero.o random.o		\
183			buf.o bufQueue.o	\
184			bufRange.o bufExt.o	\
185			bufFix.o bufStubInit.o	\
186			bufStubLib.o randport.o
187
188#-------------------------------------------------------#
189
190all:	library
191
192clean:
193	rm -f $(OBJECTS) $(MEMCHAN_LIB_FILE)
194	rm -f TAGS *~ */*~ core*
195
196distclean:	clean
197	rm -f config.status config.cache config.log Makefile pkgIndex.tcl
198
199install:	install-lib @install_other@
200
201install-lib: $(MEMCHAN_LIB_FILE)
202	$(tool)/mkinstalldirs $(LIB_INSTALL_DIR)
203	@echo "Installing $(MEMCHAN_LIB_FILE)"
204	@$(INSTALL_DATA) $(MEMCHAN_LIB_FILE) $(LIB_INSTALL_DIR)
205	@$(RANLIB) $(LIB_INSTALL_DIR)/$(MEMCHAN_LIB_FILE)
206	@$(INSTALL_DATA) $(UNIX_DIR)/pkgIndex.tcl $(LIB_INSTALL_DIR)/pkgIndex.tcl
207
208# Important in 'test': Move win/pkgIndex.tcl out of the way, prevent its usage.
209
210check:	test
211test:
212	mv $(TOP_DIR)/win/pkgIndex.tcl $(TOP_DIR)/win/pkgIndex.tclX
213	LD_LIBRARY_PATH="$(srcdir):$(TCL_LIB_DIR)";	export LD_LIBRARY_PATH; \
214	SHLIB_PATH="$LD_LIBRARY_PATH";			export SHLIB_PATH; \
215	wish $(TOP_DIR)/testlib/tester -auto -delay 1
216	mv $(TOP_DIR)/win/pkgIndex.tclX $(TOP_DIR)/win/pkgIndex.tcl
217
218ctest:
219	LD_LIBRARY_PATH="$(srcdir):$(TCL_LIB_DIR)"; \
220	echo set auto_path [concat [pwd] $$auto_path] \; package require Memchan \; \
221	cd $(TOP_DIR)/tests \; source all | tclsh
222
223#	echo lappend auto_path [pwd] \; package require Memchan \; \
224
225
226
227#-------------------------------------------------------#
228
229lib:	library
230
231library:	$(MEMCHAN_LIB_FILE)
232	@echo ... done
233
234#-------------------------------------------------------#
235
236TAGS:
237		etags *.[ch]
238
239#-------------------------------------------------------#
240# unix specific files
241
242.c.o:
243	$(CC) -c $(CC_SWITCHES) $< -o $@
244
245#-------------------------------------------------------#
246# generic files
247
248memchan.o: $(GENERIC_DIR)/memchan.c
249	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/memchan.c -o $@
250
251fifo.o: $(GENERIC_DIR)/fifo.c
252	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/fifo.c -o $@
253
254fifo2.o: $(GENERIC_DIR)/fifo2.c
255	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/fifo2.c -o $@
256
257null.o: $(GENERIC_DIR)/null.c
258	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/null.c -o $@
259
260zero.o: $(GENERIC_DIR)/zero.c
261	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/zero.c -o $@
262
263random.o: $(GENERIC_DIR)/random.c
264	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/random.c -o $@
265
266buf.o: $(GENERIC_DIR)/buf.c
267	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/buf.c -o $@
268
269bufQueue.o: $(GENERIC_DIR)/bufQueue.c
270	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/bufQueue.c -o $@
271
272bufFix.o: $(GENERIC_DIR)/bufFix.c
273	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/bufFix.c -o $@
274
275bufExt.o: $(GENERIC_DIR)/bufExt.c
276	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/bufExt.c -o $@
277
278bufRange.o: $(GENERIC_DIR)/bufRange.c
279	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/bufRange.c -o $@
280
281init.o: $(GENERIC_DIR)/init.c
282	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/init.c -o $@
283
284counter.o: $(GENERIC_DIR)/counter.c
285	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/counter.c -o $@
286
287bufStubInit.o: $(GENERIC_DIR)/bufStubInit.c
288	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/bufStubInit.c -o $@
289
290bufStubLib.o: $(GENERIC_DIR)/bufStubLib.c
291	$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/bufStubLib.c -o $@
292
293randport.o: $(ISAAC_DIR)/randport.c
294	$(CC) -c $(CC_SWITCHES) -I$(ISAAC_DIR) $(ISAAC_DIR)/randport.c -o $@
295
296#-------------------------------------------------------#
297
298$(MEMCHAN_LIB_FILE):	$(OBJECTS)
299	rm -f		$(MEMCHAN_LIB_FILE)
300	@MAKE_LIB@
301	$(RANLIB)	$(MEMCHAN_LIB_FILE)
302
303#-------------------------------------------------------#
304# DO NOT DELETE THIS LINE -- make depend depends on it.
305