1#ifndef XCOMM
2#define XCOMM /**/#
3#endif
4XCOMM X-BASED MASTERBALL(tm)
5XCOMM
6XCOMM	Imakefile
7XCOMM
8XCOMM ##
9XCOMM
10XCOMM Copyright (c) 1994 - 99	David Albert Bagley, bagleyd@tux.org
11XCOMM
12XCOMM			All Rights Reserved
13XCOMM
14XCOMM Permission to use, copy, modify, and distribute this software and
15XCOMM its documentation for any purpose and without fee is hereby granted,
16XCOMM provided that the above copyright notice appear in all copies and
17XCOMM that both that copyright notice and this permission notice appear in
18XCOMM supporting documentation, and that the name of the author not be
19XCOMM used in advertising or publicity pertaining to distribution of the
20XCOMM software without specific, written prior permission.
21XCOMM
22XCOMM This program is distributed in the hope that it will be "playable",
23XCOMM but WITHOUT ANY WARRANTY; without even the implied warranty of
24XCOMM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
25XCOMM
26
27wIDGET = mball
28WIDGET = Mball
29VER = x$(WIDGET)
30DISTVER = $(VER)-5.5
31
32#ifndef __QNX__
33#ifndef MathLibrary
34#define MathLibrary -lm
35#endif
36#else
37#define MathLibrary
38#endif
39
40N=
41C=.c
42XCOMM C++
43XCOMM C=.cc
44O=.o
45XCOMM VMS
46XCOMM O=.obj
47S=$(N) $(N)
48XCOMM VMS
49XCOMM S=,
50E=
51XCOMM VMS
52XCOMM E=.exe
53
54XCOMM please define
55XCOMM C as the C source code extension
56XCOMM O as the object extension
57XCOMM S as the separator for object code
58XCOMM E as the executable extension
59
60XCOMM CC = cc
61XCOMM CC = acc
62XCOMM CC = gcc -Wall
63XCOMM CC = g++ -Wall
64
65XCOMM      *** BEGIN XM CONFIG SECTION ***
66
67XCOMM If your system has libXm (Motif), remove the 'XCOMM ' from the next line.
68XCOMM #define XmLibrary
69
70#ifdef XmLibrary
71XCOMM If its not with your X11 stuff you should set the following
72       MOTIFHOME = /usr/local
73XCOMM       MOTIFHOME = /usr/dt
74
75XCOMM Below is a guess of the location of the Motif include directory.
76           XMINC = -I$(MOTIFHOME)/include
77
78XCOMM If you get an error "Connot find libXm" while linking, set XMLIBPATH
79XCOMM to the directory libXpm.* is in.  Below is a guess.
80           XMLIB = -L$(MOTIFHOME)/lib -lXm
81XCOMM           XMLIB = -lXm
82#endif
83
84XCOMM      *** END XM CONFIG SECTION ***
85
86XCOMM      *** BEGIN RNG CONFIG SECTION ***
87
88XCOMM Uncomment to use your system's Random Number Generator
89XCOMM They usually come in 3 types
90
91XCOMM Uncomment to use high-precision (but expensive) RNG
92XCOMM SRANDDEF = -DSRAND=srand48
93XCOMM LRANDDEF = -DLRAND=lrand48
94
95XCOMM SRANDDEF = -DSRAND=srandom
96XCOMM LRANDDEF = -DLRAND=random
97
98XCOMM Least desirable RNG
99XCOMM SRANDDEF = -DSRAND=srand
100XCOMM LRANDDEF = -DLRAND=rand
101
102XCOMM Normally use the above with (default)
103XCOMM MAXRANDDEF = -DMAXRAND=2147483648.0
104XCOMM Use the following if using srand/rand and NOT AIXV3
105XCOMM MAXRANDDEF = -DMAXRAND=32767.0
106RANDDEF = $(SRANDDEF) $(LRANDDEF) $(MAXRANDDEF)
107
108XCOMM      *** END RNG CONFIG SECTION ***
109
110XCOMM Set your C compiler if necessary
111XCOMM CC		= gcc -g -DDEBUG -Wall
112XCOMM CC		= gcc -O
113
114SCOREFILE = ./$(wIDGET).scores
115DATAFILE  = ./$(wIDGET).data
116
117DEFINES		= -DHAVE_FCNTL_H=1 -DHAVE_UNISTD_H=1 \
118-DSCOREFILE=\"$(SCOREFILE)\" -DDATAFILE=\"$(DATAFILE)\" \
119$(XMINC)
120XWIDGETLIBS = $(XTOOLLIB) $(XLIB) MathLibrary
121# -lICE -lSM
122XMWIDGETLIBS = $(XMLIB) $(XWIDGETLIBS)
123# -lICE -lSM
124
125COREOBJS = $(WIDGET)$(O)$(S)$(WIDGET)U$(O)$(S)rngs$(O)
126XWIDGETOBJS = $(COREOBJS)$(S)x$(wIDGET)$(O)
127XMWIDGETOBJS = $(COREOBJS)$(S)xm$(wIDGET)$(O)
128
129CORESRCS = $(WIDGET)$(C) $(WIDGET)U$(C) rngs$(C)
130XWIDGETSRCS = $(CORESRCS) x$(wIDGET)$(C)
131XMWIDGETSRCS = $(CORESRCS) xm$(wIDGET)$(C)
132
133AllTarget(x$(wIDGET)$(E))
134NormalProgramTarget(x$(wIDGET)$(E), $(XWIDGETOBJS), $(DEPXLIB), $(XWIDGETLIBS), NullParameter)
135#ifdef XmLibrary
136AllTarget(xm$(wIDGET)$(E))
137NormalProgramTarget(xm$(wIDGET)$(E), $(XMWIDGETOBJS), $(DEPXLIB), $(XMWIDGETLIBS), NullParameter)
138#else
139clean::
140	$(RM) xm$(wIDGET)$(E)
141
142#endif
143
144$(WIDGET)$(O) : $(WIDGET)$(C) $(WIDGET)P.h $(WIDGET).h
145$(WIDGET)U$(O) : $(WIDGET)U$(C) $(WIDGET)P.h $(WIDGET).h
146rngs$(O) : rngs$(C)
147x$(wIDGET)$(O) : x$(wIDGET)$(C) $(WIDGET).h
148xm$(wIDGET)$(O) : xm$(wIDGET)$(C) $(WIDGET).h
149
150distclean::	clean
151	$(RM) Makefile config.status config.cache config.log
152
153clean.all::	distclean
154