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 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319
|
/**/# Run imake -DUseInstalled -I/usr/lib/X11/config to make a Makefile.
/**/# This is an R5 style Imakefile, so will need the R5 config files to
/**/# to make a Makefile. It also assume that X11 is installed in /usr/lib.
SHAR = shar
COMPRESS = compress
BTOA = btoa
SPLIT = split
CAT = cat
/***** Note: probably want to define this to be something else *****/
HELPDIR = /usr/doc/spider
/***** Note: Used to over-ride some declarations in the default Imakefile
configurations. If you want to use some of these things, then
set OverrideDefs to YES below and change the corresponding
definitions to what you would like them to be below. Delete
or comment out those you do not wish to use *****/
#ifndef OverrideDefs
#define OverrideDefs YES
#endif
#if OverrideDefs
# ifdef ManSuffix
# undef ManSuffix
# define ManSuffix 1
# else
# define ManSuffix 1
# endif
MANSUFFIX = ManSuffix
MANDIR = ./man$(MANSUFFIX)
BINDIR = ./bin
MKDIRHIER = /usr/bin/X11/mkdirhier
#endif /* OverrideDefs */
/***** Note: if your OS or libc does not have usleep defined, set this
to YES. (SunOS is one that does have usleep in libc) *****/
#ifndef NeedsLocalUsleep
#define NeedsLocalUsleep NO
#endif
/***** Note: if your OS or libc does not have strdup defined, set this
to YES. (SunOS is one that does have strdup in libc) *****/
#ifndef NeedsLocalStrdup
#define NeedsLocalStrdup NO
#endif
/***** Note: only need XViewHasOlgx when using XView 2.0 or greater *****/
#ifndef XViewHasOlgx
#define XViewHasOlgx YES
#endif
/***** Note: cannot have CompileXlibOnly, CompileXView, and CompileXAW
all be true. Need to pick one *****/
#ifndef CompileXlibOnly
#define CompileXlibOnly NO
#endif
#ifndef CompileXView
#define CompileXView NO
#endif
#ifndef CompileXAW
#define CompileXAW YES
#endif
#if CompileXlibOnly
# if CompileXView
# undef CompileXView
# endif
# if CompileXAW
# undef CompileXAW
# endif
#elif CompileXView
# if CompileXAW
# undef CompileXAW
# endif
#endif
/***** Note: cannot have both Round Cards and Small Cards be true *****/
#ifndef RoundCards
#define RoundCards NO
#endif
#ifndef SmallCards
#define SmallCards YES
#endif
#if SmallCards
# if RoundCards
# undef RoundCards
# endif
#endif
#if CompileXView
/**/# If these are not defined in the site.def file, define them now.
/**/# set up compile time dependencies for XView clients.
XVTOP = $(XVIEWHOME)
XVLIBSRC = $(XVTOP)/lib
# if UseInstalled
DEPXVIEWLIB =
DEPOLGXLIB =
# else
DEPXVIEWLIB = $(XVLIBSRC)/libxview.a
# if XViewNeedsOlgx
DEPOLGXLIB = $(XVLIBSRC)/libolgx.a
# else
DEPOLGXLIB =
# endif
# endif
XVIEWLIB = -L$(XVLIBSRC) -lxview
# if XViewNeedsOlgx
OLGXLIB = -L$(XVLIBSRC) -lolgx
# else
OLGXLIB =
# endif
#endif /* CompileXView */
KL_DIST = main.c
#if CompileXlibOnly
# if RoundCards
DEPLIBS = $(DEPXMULIB) $(DEPXLIB)
LOCAL_LIBRARIES = $(XMULIB) $(XLIB)
# else
DEPLIBS = $(DEPXLIB)
LOCAL_LIBRARIES = $(XLIB)
# endif
TKOBJS = main.o
TKSRCS = main.c
TKHEADERS =
TKBITMAPS =
TKDOCS =
TKDEFINES = -DKITLESS
TKINCLUDES =
TARGET = spider
#endif /* CompileXlibOnly */
XVIEW_DIST = xv_ui.c xv_stubs.c xv_ui.h spider.info
#if CompileXView
# if RoundCards
DEPLIBS = $(DEPXVIEWLIB) $(DEPOLGXLIB) $(DEPXMULIB) $(DEPXLIB)
LOCAL_LIBRARIES = $(XVIEWLIB) $(OLGXLIB) $(XMULIB) $(XLIB)
# else
DEPLIBS = $(DEPXVIEWLIB) $(DEPOLGXLIB) $(DEPXLIB)
LOCAL_LIBRARIES = $(XVIEWLIB) $(OLGXLIB) $(XLIB)
# endif
TKOBJS = xv_ui.o xv_stubs.o
TKSRCS = xv_ui.c xv_stubs.c
TKHEADERS = xv_ui.h
TKBITMAPS =
TKDOCS = spider.info
TKDEFINES = -DXVIEW
TKINCLUDES = -I$(XVTOP)/include
TARGET = spider
#endif /* CompileXView */
XAW_DIST = xaw_ui.c xaw_stubs.c xaw_ui.h
#if CompileXAW
DEPLIBS = XawClientDepLibs
LOCAL_LIBRARIES = XawClientLibs
TKOBJS = xaw_ui.o xaw_stubs.o
TKSRCS = xaw_ui.c xaw_stubs.c
TKHEADERS = xaw_ui.h
TKBITMAPS =
TKDOCS =
TKDEFINES = -DXAW
TKINCLUDES =
TARGET = spider
#endif /* CompileXAW */
BASE_OBJS = gfx.o spider.o events.o windows.o movelog.o util.o version.o
OBJS = $(BASE_OBJS) $(TKOBJS)
BASE_SRCS = gfx.c spider.c events.c windows.c movelog.c util.c version.c
SRCS = $(BASE_SRCS) $(TKSRCS)
BASE_HEADERS = globals.h defs.h assert.h copyright.h
HEADERS = $(BASE_HEADERS) $(TKHEADERS)
BASE_BITMAPS = rank.bm suit.bm face.bm spider.bm cards.bm.aa cards.bm.ab
BITMAPS = $(BASE_BITMAPS) $(TKBITMAPS)
BASE_DOCS = doc.intro doc.rules doc.controls doc.examples doc.misc doc.summary
DOCS = $(BASE_DOCS) $(TKDOCS)
MISC = Imakefile Makefile.sunpro README spider.man
ALL_SRCS = $(MISC) $(BASE_SRCS) $(BASE_HEADERS) $(BASE_BITMAPS) $(BASE_DOCS) \
$(XVIEW_DIST) $(XAW_DIST) $(KL_DIST)
#if NeedsLocalUsleep
# if NeedsLocalStrdup
UTILDEFS = -DLOCAL_USLEEP -DLOCAL_STRDUP
# else
UTILDEFS = -DLOCAL_USLEEP
# endif
#else
# if NeedsLocalStrdup
UTILDEFS = -DLOCAL_STRDUP
# else
UTILDEFS =
# endif
#endif
#if SmallCards
DEFINES = $(TKDEFINES) -DSMALL_CARDS -DHELPDIR="\"$(HELPDIR)\"" $(UTILDEFS)
#else
# if RoundCards
DEFINES = $(TKDEFINES) -DROUND_CARDS -DHELPDIR="\"$(HELPDIR)\"" $(UTILDEFS)
# else
DEFINES = $(TKDEFINES) -DHELPDIR="\"$(HELPDIR)\"" $(UTILDEFS)
# endif
#endif
INCLUDES = -I. $(TKINCLUDES)
CPPFLAGS =
all:: $(TARGET)
#if SmallCards
all::
-@if [ ! -f cards.bm ]; then cat cards.bm.aa cards.bm.ab > cards.bm; fi
#endif
#if OverrideDefs
MakeDirectories(install,$(BINDIR))
MakeDirectories(install.man, $(MANDIR))
#endif
ComplexProgramTarget($(TARGET))
#ifdef SparcArchitecture
/**/# SunOS4.0.3 sparc optimizer slimes this file
util.o: util.c
$(CC) $(CPPFLAGS) $(DEFINES) $(INCLUDES) -c util.c
#endif
version.o: version.c
$(CC) -DDATE="\"`date`\"" -c version.c
MakeDirectories(install.doc,$(HELPDIR))
InstallMultipleDest(install.doc,$(DOCS),$(HELPDIR))
World::
@echo ""
@echo "Begin build of the $(TARGET) application for the"
#if CompileXView
@echo "XView toolkit version."
#else
# if CompileXlibOnly
@echo "Xlib only, no toolkit version."
# else
# if CompileXAW
@echo "Athena Widget toolkit version."
# endif
# endif
#endif
#if SmallCards
@echo "Using cards with small bitmaps for a low resolution display."
#else
# if RoundCards
@echo "Using cards with normal bitmaps and optional rounded edges."
# else
@echo "Using cards with normal bitmaps."
# endif
#endif
@echo ""
@date
@echo ""
$(MAKE) $(MFLAGS) clean
$(MAKE) $(MFLAGS) depend
$(MAKE) $(MFLAGS)
@echo ""
@date
@echo ""
@echo "Begin installation... "
$(MAKE) $(MFLAGS) -k install
$(MAKE) $(MFLAGS) -k install.doc
$(MAKE) $(MFLAGS) -k install.man
@echo ""
@date
@echo ""
@echo "Installation complete...now type 'make clean'"
clean::
$(RM) spider.shar spider.a spider.a.a?a cards.bm
shar::
$(SHAR) $(ALL_SRCS) > spider.shar
dist:: shar
$(RM) spider.shar.Z
$(COMPRESS) spider.shar
$(CAT) spider.shar.Z | $(BTOA) > spider.a
$(SPLIT) spider.a spider.a.
|