1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
|
#
#----------------------------------------------------------------
# This file is a Makefile for Memchan 2.2a4 (as of AUG-20-2002), usable for CygWin B20.1
# Donated by Jan Nijtmans <jan.nijtmans@cmg.nl> <nijtmans@wxs.nl>
#----------------------------------------------------------------
EXTENSION = Memchan
VERSION = 2.2a4
TCL_VERSION = 81
MEMCHAN_DLL_FILE= memchan22.dll
#
#----------------------------------------------------------------
# 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).
#----------------------------------------------------------------
# Directory in which the source of this extension can be found
srcdir = .
TMPDIR = .
# Directories in which the Tcl core can be found
TCL_INC_DIR = /progra~1/tcl/include
TCL_LIB_DIR = /progra~1/tcl/lib
#TCL_LIB_SPEC = /progra~1/tcl/lib/libtclstub81.a
TCL_LIB_SPEC = /progra~1/tcl/lib/libtclstub82.a
# Libraries to be included with memchan.dll
TCL_SHARED_LIBS =
# 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 = /progra~1/Tcl
exec_prefix = $(prefix)
# Directory containing scripts supporting the work of this makefile
tool = $(srcdir)/tools
# 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 where memchan.dll is at run-time:
LIB_RUNTIME_DIR = $(exec_prefix)/lib/$(EXTENSION)$(VERSION)
# Directory in which to install the archive memchan.dll:
LIB_INSTALL_DIR = $(INSTALL_ROOT)$(LIB_RUNTIME_DIR)
# Directory in which to install the extended shell tclsh:
BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
# Directory in which to install the include file transform.h:
INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include
# Top-level directory in which to install manual entries:
MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man
# To change the compiler switches, for example to change from -O
# to -g, change the following line:
#CFLAGS = -O2 -mno-cygwin -DNDEBUG -D__WIN32__
CFLAGS = -O2 -mno-cygwin -DNDEBUG -D__WIN32__ -DTCL_THREADS
# 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
# Tcl 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 = $(tool)/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.
MEMCHAN_SHLIB_CFLAGS =
# The symbol below provipng support for dynamic loading and shared
# libraries. See configure.in for a pngcription of what it means.
# The values of the symbolis normally set by the configure script.
SHLIB_LD =
# Libraries to use when linking: must include at least the dynamic
# loading library and the math library (in that order). This
# definition is determined by the configure script.
ALL_LIBS = $(TCL_LIB)
LIBS =
#----------------------------------------------------------------
# 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.
#----------------------------------------------------------------
INSTALL_PROGRAM = $(INSTALL) -m 744
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_SHLIB = $(INSTALL) -m 555
RANLIB = ranlib
SHLIB_SUFFIX = .dll
#----------------------------------------------------------------
# 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 = gcc
AS = as
LD = ld
DLLTOOL = dlltool
DLLWRAP = dllwrap
WINDRES = windres
DLL_LDFLAGS = -mwindows -Wl,-e,_DllMain@12
#DLL_LDLIBS = -L/progra~1/tcl/lib -ltclstub81
DLL_LDLIBS = -L/progra~1/tcl/lib -ltclstub82
baselibs = -lkernel32 $(optlibs) -ladvapi32
winlibs = $(baselibs) -luser32 -lgdi32 -lcomdlg32 -lwinspool
guilibs = $(libc) $(winlibs)
guilibsdll = $(libcdll) $(winlibs)
MEMCHAN_DEFINES = -D__WIN32__ -DSTATIC_BUILD -DUSE_TCL_STUBS -DMEMCHAN_VERSION="\"${VERSION}\"" -DHAVE_LTOA
# $(TCL_CC_SWITCHES)
INCLUDES = -I. -I$(srcdir) -I$(TCL_INC_DIR)
DEFINES = $(PROTO_FLAGS) $(MEM_DEBUG_FLAGS) $(MEMCHAN_SHLIB_CFLAGS) \
$(MEMCHAN_DEFINES)
CC_SWITCHES = $(CFLAGS) $(DEFINES) $(INCLUDES)
# fundamentals of this library
SOURCES = ../generic/counter.c \
../generic/fifo.c \
../generic/init.c \
../generic/memchan.c
OBJECTS = counter.o \
fifo.o \
init.o \
memchan.o
#-------------------------------------------------------#
default: $(MEMCHAN_DLL_FILE)
all: default
test: $(MEMCHAN_DLL_FILE)
wish${TK_VERSION} demo.tcl
#-------------------------------------------------------#
counter.o: ../generic/counter.c
$(CC) -c $(CC_SWITCHES) ../generic/counter.c -o $@
fifo.o: ../generic/fifo.c
$(CC) -c $(CC_SWITCHES) ../generic/fifo.c -o $@
init.o: ../generic/init.c
$(CC) -c $(CC_SWITCHES) ../generic/init.c -o $@
memchan.o: ../generic/memchan.c
$(CC) -c $(CC_SWITCHES) ../generic/memchan.c -o $@
dllEntry.o: dllEntry.c
$(CC) -c $(CC_SWITCHES) dllEntry.c -o $@
#-------------------------------------------------------#
$(MEMCHAN_DLL_FILE): $(OBJECTS) mcres.o dllEntry.o memchan.def
$(DLLWRAP) -s $(DLL_LDFLAGS) -mno-cygwin -o $@ $(OBJECTS) \
mcres.o dllEntry.o --def memchan.def \
$(DLL_LDLIBS)
memchan.def: $(OBJECTS)
$(DLLTOOL) --export-all --exclude-symbols DllMain@12 --output-def $@ $(OBJECTS)
mcres.o: mc.rc
$(WINDRES) --include . --define VS_VERSION_INFO=1 mc.rc mcres.o
#-------------------------------------------------------#
clean:
del $(OBJECTS) $(MEMCHAN_DLL_FILE)
del TAGS depend *~ */*~ core* tests/core* so_locations lib*.so*
distclean: clean
del config.* $(jpegdir)/config.log $(jpegdir)/config.status
del Makefile
del pkgIndex.tcl
#-------------------------------------------------------#
# DO NOT DELETE THIS LINE -- make depend depends on it.
|