0
|
1 |
#
|
6
|
2 |
# $Header$
|
0
|
3 |
#
|
|
4 |
# -------------- no need to change anything below ----------
|
|
5 |
|
7
|
6 |
TOP=../..
|
0
|
7 |
SUBDIRS=
|
|
8 |
|
13
|
9 |
RCSSOURCES=*.rc patches Make.proto
|
|
10 |
|
6
|
11 |
#
|
|
12 |
# other definitions to use for things compiled here
|
|
13 |
#
|
|
14 |
LOCALDEFS=-DDEBUG
|
7
|
15 |
ST_LDFLAG=
|
0
|
16 |
|
6
|
17 |
#
|
7
|
18 |
# see COMMON/defines for what those XXX_LIB etc. are
|
6
|
19 |
#
|
11
|
20 |
# MINI_LIB = libbasic, libcomp $(PRIVATELIBS)
|
7
|
21 |
# FUNDAMENTAL_LIB = above PLUS libview, libwidg
|
|
22 |
# DEVELOP_LIB = above PLUS libtool
|
|
23 |
# STANDARD_LIB = above PLUS libwidg2, libdbase
|
|
24 |
# EXTENDED_LIB = above PLUS libwidg3
|
6
|
25 |
|
7
|
26 |
#
|
|
27 |
# this defines where the show starts
|
|
28 |
#
|
|
29 |
STARTUP_CLASS="Smalltalk"
|
0
|
30 |
STARTUP_SELECTOR="start"
|
|
31 |
|
10
|
32 |
#
|
|
33 |
# directories from which bitmap files in bitmap subdirectories are to be symlinked
|
|
34 |
# to the bitmaps subdirectory
|
|
35 |
#
|
|
36 |
BITMAPDIRS= \
|
16
|
37 |
$(LIBBASIC2DIR) $(LIBVIEWDIR) $(LIBWIDGDIR) $(LIBWIDG2DIR) \
|
|
38 |
$(LIBWIDG3DIR) $(LIBTABLEDIR) $(LIBTOOLDIR) $(CLIENTDIR)/[A-Z]* \
|
|
39 |
$(OTHERLIBDIRS) \
|
|
40 |
$(TOP)/fileIn $(TOP)/fileIn/* $(TOP)/libtomcat $(TOP)/goodies \
|
10
|
41 |
$(TOP)/goodies/* $(TOP)/goodies/*/*
|
|
42 |
|
|
43 |
#
|
|
44 |
# directories from which binary files are to be symlinked
|
|
45 |
# to the binary subdirectory
|
|
46 |
#
|
|
47 |
BINARYDIRS= \
|
16
|
48 |
$(LIBBASICDIR) $(LIBBASIC2DIR) $(LIBVIEWDIR) $(LIBWIDGDIR) \
|
|
49 |
$(LIBWIDG2DIR) $(LIBWIDG3DIR) $(LIBTOOLDIR) $(CLIENTDIR)/[A-Z]* \
|
|
50 |
$(LIBCOMPDIR) $(LIBTABLEDIR) $(OTHERLIBDIRS) \
|
|
51 |
$(TOP)/fileIn $(TOP)/libtomcat $(TOP)/goodies $(TOP)/goodies/* \
|
10
|
52 |
$(TOP)/goodies/*/*
|
|
53 |
|
|
54 |
#
|
|
55 |
# directories from which source files are to be symlinked
|
|
56 |
# to the source subdirectory
|
|
57 |
#
|
|
58 |
SOURCEDIRS= \
|
16
|
59 |
$(LIBBASICDIR) $(LIBBASIC2DIR) $(LIBCOMPDIR) $(LIBVIEWDIR) $(LIBWIDGDIR) \
|
|
60 |
$(LIBWIDG2DIR) $(LIBWIDG3DIR) $(LIBTOOLDIR) $(CLIENTDIR)/[A-Z]* \
|
21
|
61 |
$(LIBTABLEDIR) $(LIBPRODIR) $(OTHERLIBDIRS) \
|
16
|
62 |
$(TOP)/fileIn $(TOP)/libtomcat $(TOP)/goodies $(TOP)/goodies/* \
|
|
63 |
$(TOP)/goodies/*/*
|
10
|
64 |
|
11
|
65 |
#
|
|
66 |
# including your own private lib in the make process and executable:
|
|
67 |
#
|
8
|
68 |
# for example, if you have a libprivate directory,
|
11
|
69 |
# where libprivate.obj is built, and that one should be included,
|
|
70 |
# add lines as below to your configuration/.../defines file:
|
8
|
71 |
# PRIVATEOBJ=$(TOP)/libprivate/libprivate.obj
|
|
72 |
# PRIVATE_SO=$(TOP)/libprivate/libprivate.so
|
|
73 |
# PRIVATELIBS=libprivate
|
|
74 |
|
|
75 |
# ---------------------- end additional stuff --------------------
|
|
76 |
|
|
77 |
|
6
|
78 |
#
|
|
79 |
# default target: create the TARGET (usually smalltalk),
|
|
80 |
# create subdirectories with source-links, bitmap-links and resource-links
|
|
81 |
#
|
11
|
82 |
all:: $(TARGET) symlinks
|
6
|
83 |
|
|
84 |
#
|
|
85 |
# same, force recreation of link-directories
|
|
86 |
#
|
8
|
87 |
allNew: $(TARGET) newResources styles newSource newBitmaps binary include misc
|
0
|
88 |
|
6
|
89 |
#
|
11
|
90 |
# create symbolic links to sources, resources etc.
|
|
91 |
# normally (on an end-user system) these should go into usr/local/lib/smalltalk
|
|
92 |
#
|
|
93 |
symlinks: resources styles newSource bitmaps binary include misc
|
|
94 |
|
|
95 |
#
|
6
|
96 |
# the standard smalltalk executable:
|
|
97 |
# basic classes + view & widgets + tools + persistency
|
|
98 |
# persistency needs DBLIB
|
|
99 |
#
|
7
|
100 |
smalltalk: $(TARGET)
|
|
101 |
|
|
102 |
smalltalk_static:
|
15
|
103 |
@$(MAKE) linkIt LIBOBJS="$(LIBOBJS) $(PERSOBJ)" EXTRA_OBJ="$(EXTRA_OBJ)"
|
8
|
104 |
|
7
|
105 |
|
|
106 |
smalltalk_shared:
|
15
|
107 |
@$(MAKE) linkIt LIBOBJS="$(LIBOBJS_SHARED) $(PERS_SO)" EXTRA_OBJ="$(EXTRA_OBJ)"
|
8
|
108 |
|
10
|
109 |
#
|
|
110 |
# a "smaller" smalltalk (does not include development classes)
|
|
111 |
#
|
|
112 |
smalltalk_exec:
|
|
113 |
-rm classList.stc
|
15
|
114 |
@$(MAKE) classList.stc \
|
10
|
115 |
EXTRA_CLASSES="$(EXTRA_CLASSES) DebugView" \
|
|
116 |
EXTRA_OBJ="$(EXTRA_OBJ) $(LIBTOOLDIR)/DebugView.so" \
|
|
117 |
LIBLIST="$(FUNDAMENTAL_LIST)"
|
15
|
118 |
@$(MAKE) smalltalk \
|
10
|
119 |
EXTRA_OBJ="$(EXTRA_OBJ) $(LIBTOOLDIR)/DebugView.so" \
|
|
120 |
LIBOBJS="$(FUNDAMENTAL_LIB)" \
|
|
121 |
LIBOBJS_SHARED="$(FUNDAMENTAL_LIB_SHARED)"
|
7
|
122 |
|
|
123 |
linkIt: main.$(O) $(LIBOBJS) $(LIBRUN) $(EXTRA_LIBS) $(EXTRA_OBJ)
|
|
124 |
@-echo "Making classList ..."
|
15
|
125 |
@$(MAKE) classList.$(O) LIBS="$(LIBOBJS)"
|
|
126 |
@-echo "linking ..."
|
6
|
127 |
$(LD) $(ST_LDFLAG) $(LDFLAGS) -o smalltalk$(EXE) \
|
|
128 |
$(CRT0) classList.$(O) main.$(O) \
|
7
|
129 |
$(OPTIONAL_SHARED_LIB_PATH) \
|
|
130 |
$(LIBOBJS) $(EXTRA_OBJ) \
|
|
131 |
$(LIBRUNDIR)/hidata.$(O) $(LIBRUNDIR)/$(LIBRUNTARGET) \
|
0
|
132 |
$(DBLIB) \
|
2
|
133 |
$(MATHLIB) $(EXTRA_LIBS) $(SYSLIBS) $(CRTN)
|
0
|
134 |
|
|
135 |
classList: classList.c
|
15
|
136 |
@$(CC) $(_C) $(CFLAGS) classList.c
|
0
|
137 |
rm -f classList.c
|
|
138 |
|
|
139 |
#
|
|
140 |
# make list of classes for a standard smalltalk
|
2
|
141 |
# (includes basic, view & widgets and Persistency)
|
0
|
142 |
#
|
7
|
143 |
BASICLIST: $(CLASSLISTS)
|
|
144 |
-cat $(CLASSLISTS) > $(CLASSLIST)
|
6
|
145 |
|
7
|
146 |
# classList.stc: $(LIBS) $(OTHERLIBRARIES)
|
6
|
147 |
|
11
|
148 |
classList.stc: Makefile
|
|
149 |
@-rm classList.stc classList.c
|
7
|
150 |
@$(MAKE) GENERICLIST CLASSLIST=classList.stc \
|
|
151 |
EXTRA_CLASSES="$(EXTRA_CLASSES)" \
|
16
|
152 |
LIBLIST="$(LIBLIST)" \
|
7
|
153 |
CLASSLIBRARIES=" \
|
|
154 |
$(LIBLIST) \
|
|
155 |
$(OTHERLIBRARIES) \
|
|
156 |
" \
|
|
157 |
CLASSLISTS=" \
|
|
158 |
$(EXTRACLASSLISTS) \
|
|
159 |
$(CLIENTCLASSLISTS) \
|
6
|
160 |
"
|
|
161 |
|
|
162 |
#
|
15
|
163 |
# dont want this abbrev.stc be included ...
|
|
164 |
#
|
16
|
165 |
abbrev.stc::
|
|
166 |
-rm ttt*.*
|
|
167 |
|
15
|
168 |
collectAbbrev::
|
|
169 |
-rm abbrev.stc
|
|
170 |
|
|
171 |
#
|
0
|
172 |
# make a new source subdirectory
|
6
|
173 |
# the source directory consists of sym-links to all .st files we find
|
0
|
174 |
#
|
|
175 |
newSource:
|
|
176 |
-rm -rf source
|
|
177 |
$(MAKE) sourceLink
|
|
178 |
|
|
179 |
Source: source
|
|
180 |
|
7
|
181 |
source:
|
0
|
182 |
$(MAKE) sourceLink
|
|
183 |
|
6
|
184 |
#
|
7
|
185 |
# make a new include subdirectory and link to abbreviation file
|
|
186 |
newInclude:
|
|
187 |
-rm -rf include
|
|
188 |
$(MAKE) include
|
|
189 |
|
|
190 |
include:
|
16
|
191 |
-rm ttt*.H
|
7
|
192 |
-mkdir include
|
|
193 |
-(cd include; $(LNS) ../$(INCLUDE)/abbrev.stc .)
|
16
|
194 |
-if [ -f $(INCLUDE)/symbols.stc ]; then \
|
|
195 |
(cd include; $(LNS) ../$(INCLUDE)/symbols.stc .); \
|
9
|
196 |
fi
|
8
|
197 |
rm -f include/RCS
|
|
198 |
|
|
199 |
misc: examples
|
|
200 |
|
|
201 |
examples:
|
|
202 |
-mkdir examples examples/3D
|
|
203 |
-(cd examples/3D; $(LNS) ../../$(TOP)/clients/GLdemos/*.data .)
|
0
|
204 |
|
2
|
205 |
#
|
|
206 |
# make a new binary subdirectory
|
|
207 |
# (this is only useful on systems that support dynamic loading;
|
|
208 |
# autoloaded classes will then be loaded from machine code files
|
|
209 |
# instead of source)
|
|
210 |
#
|
0
|
211 |
newBinary:
|
|
212 |
-rm -rf binary
|
|
213 |
$(MAKE) binaryLink
|
|
214 |
|
|
215 |
binary:
|
|
216 |
$(MAKE) binaryLink
|
|
217 |
|
|
218 |
#
|
|
219 |
# make a new bitmaps subdirectory
|
2
|
220 |
# (simply collect the contents of all bitmap directories)
|
0
|
221 |
#
|
|
222 |
newBitmaps:
|
|
223 |
-rm -rf bitmaps
|
|
224 |
$(MAKE) bitmaps
|
|
225 |
|
|
226 |
Bitmaps: bitmaps
|
|
227 |
|
10
|
228 |
bitmaps:
|
|
229 |
$(MAKE) bitmapLink
|
0
|
230 |
|
2
|
231 |
#
|
|
232 |
# clean out intermediate chunk
|
|
233 |
#
|
0
|
234 |
cleanjunk::
|
|
235 |
-rm -f a.out changes SymbolTable ttt main.c
|
6
|
236 |
-rm -f classList.c fclassList.c nxclassList.c basicclassList.c
|
|
237 |
-rm -f betaclassList.c miniList.c tinyList.c
|
16
|
238 |
-rm -f pers* pers2 data data2 data.boss tetris.scores
|
0
|
239 |
|
2
|
240 |
#
|
|
241 |
# clean out all that is not needed to run smalltalk
|
|
242 |
#
|
0
|
243 |
clean::
|
|
244 |
-rm -f a.out changes SymbolTable ttt main.c
|
11
|
245 |
-rm -f classList.stc classList.c classList.o
|
0
|
246 |
-rm -f fclassList.stc fclassList.c
|
|
247 |
-rm -f nxclassList.stc nxclassList.c
|
6
|
248 |
-rm -f basicclassList.stc basicclassList.c
|
|
249 |
-rm -f betaclassList.stc betaclassList.c
|
2
|
250 |
-rm -f miniList.stc miniList.c
|
|
251 |
-rm -f tinyList.stc tinyList.c
|
16
|
252 |
-rm -f pers pers2 data data2 data.boss tetris.scores
|
|
253 |
-rm -f st.img st2.img
|
0
|
254 |
|
2
|
255 |
#
|
|
256 |
# clean out all that can be regenerated
|
|
257 |
#
|
0
|
258 |
clobber::
|
8
|
259 |
-rm -rf resources source bitmaps changes include examples
|
7
|
260 |
-rm -f smalltalk minitalk tinytalk st.img
|
0
|
261 |
-rm -f main.o
|
|
262 |
|
|
263 |
#
|
|
264 |
# make a new resources subdirectory
|
|
265 |
#
|
|
266 |
newResources:
|
|
267 |
rm -rf resources
|
7
|
268 |
$(MAKE) resources styles
|
0
|
269 |
|
|
270 |
resources:
|
|
271 |
-mkdir resources
|
16
|
272 |
$(MAKE) resourceLink
|
|
273 |
resourceLink:
|
8
|
274 |
-if [ "`echo $(LIBBASICDIR)/resources/*`" != '$(LIBBASICDIR)/resources/*' ]; then \
|
|
275 |
(cd resources; $(LNS) ../$(LIBBASICDIR)/resources/* .); \
|
|
276 |
rm -f resources/RCS; \
|
|
277 |
fi
|
|
278 |
-if [ "`echo $(LIBVIEWDIR)/resources/*`" != '$(LIBVIEWDIR)/resources/*' ]; then \
|
|
279 |
(cd resources; $(LNS) ../$(LIBVIEWDIR)/resources/* .); \
|
|
280 |
rm -f resources/RCS; \
|
|
281 |
fi
|
|
282 |
-if [ "`echo $(LIBWIDGDIR)/resources/*`" != '$(LIBWIDGDIR)/resources/*' ]; then \
|
|
283 |
(cd resources; $(LNS) ../$(LIBWIDGDIR)/resources/* .); \
|
|
284 |
rm -f resources/RCS; \
|
|
285 |
fi
|
|
286 |
-if [ "`echo $(LIBWIDG2DIR)/resources/*`" != '$(LIBWIDG2DIR)/resources/*' ]; then \
|
|
287 |
(cd resources; $(LNS) ../$(LIBWIDG2DIR)/resources/* .); \
|
|
288 |
rm -f resources/RCS; \
|
|
289 |
fi
|
|
290 |
-if [ "`echo $(LIBWIDG3DIR)/resources/*`" != '$(LIBWIDG3DIR)/resources/*' ]; then \
|
|
291 |
(cd resources; $(LNS) ../$(LIBWIDG3DIR)/resources/* .); \
|
|
292 |
rm -f resources/RCS; \
|
|
293 |
fi
|
|
294 |
-if [ "`echo $(LIBTOOLDIR)/resources/*`" != '$(LIBTOOLDIR)/resources/*' ]; then \
|
|
295 |
(cd resources; $(LNS) ../$(LIBTOOLDIR)/resources/* .); \
|
|
296 |
rm -f resources/RCS; \
|
|
297 |
fi
|
16
|
298 |
-if [ "`echo $(LIBTABLEDIR)/resources/*`" != '$(LIBTABLEDIR)/resources/*' ]; then \
|
|
299 |
(cd resources; $(LNS) ../$(LIBTABLEDIR)/resources/* .); \
|
|
300 |
rm -f resources/RCS; \
|
|
301 |
fi
|
8
|
302 |
-if [ "`echo $(TOP)/fileIn/resources/*`" != '$(TOP)/fileIn/resources/*' ]; then \
|
|
303 |
(cd resources; $(LNS) ../$(TOP)/fileIn/resources/* .); \
|
|
304 |
rm -f resources/RCS; \
|
|
305 |
fi
|
|
306 |
-if [ "`echo $(CLIENTDIR)/*/resources/*`" != '$(CLIENTDIR)/*/resources/*' ]; then \
|
|
307 |
(cd resources; $(LNS) ../$(CLIENTDIR)/*/resources/* .); \
|
|
308 |
rm -f resources/RCS; \
|
|
309 |
fi
|
0
|
310 |
|
7
|
311 |
styles:
|
8
|
312 |
-(cd resources; $(LNS) ../$(LIBVIEWDIR)/styles/* .)
|
|
313 |
rm -f resources/RCS
|
0
|
314 |
|
|
315 |
$(TARGET): $(INCLUDE)/stc.h $(INCLUDE)/stcIntern.h
|
|
316 |
|
6
|
317 |
#
|
|
318 |
# installation rules
|
|
319 |
#
|
0
|
320 |
|
6
|
321 |
install:: installThis
|
|
322 |
|
|
323 |
#
|
|
324 |
# install binary only
|
|
325 |
#
|
0
|
326 |
binInstall::
|
|
327 |
-mkdir $(DESTLIBDIR)
|
|
328 |
-mkdir $(DESTBINDIR)
|
|
329 |
$(INSTALL) smalltalk $(DESTBINDIR)
|
|
330 |
-strip $(DESTBINDIR)/smalltalk
|
|
331 |
|
6
|
332 |
#
|
|
333 |
# install all local stuff
|
0
|
334 |
#
|
|
335 |
# notice the [x-y]* patterns; some unixes (at&t) dont like too many arguments ...
|
|
336 |
#
|
|
337 |
installThis::
|
|
338 |
-mkdir $(DESTLIBDIR)
|
|
339 |
-mkdir $(DESTBINDIR)
|
|
340 |
$(INSTALL) smalltalk $(DESTBINDIR)
|
|
341 |
-strip $(DESTBINDIR)/smalltalk
|
|
342 |
-mkdir $(DESTLIBDIR)/source
|
|
343 |
-chmod a+rx $(DESTLIBDIR)/source
|
|
344 |
-cp source/[A-G]* $(DESTLIBDIR)/source
|
|
345 |
-cp source/[H-P]* $(DESTLIBDIR)/source
|
|
346 |
-cp source/[Q-Z]* $(DESTLIBDIR)/source
|
|
347 |
-chmod a+r $(DESTLIBDIR)/source/[A-G]*
|
|
348 |
-chmod a+r $(DESTLIBDIR)/source/[H-P]*
|
|
349 |
-chmod a+r $(DESTLIBDIR)/source/[Q-Z]*
|
|
350 |
-mkdir $(DESTLIBDIR)/bitmaps
|
|
351 |
-chmod a+rx $(DESTLIBDIR)/bitmaps
|
|
352 |
-cp bitmaps/[A-I]* $(DESTLIBDIR)/bitmaps
|
|
353 |
-cp bitmaps/[J-Z]* $(DESTLIBDIR)/bitmaps
|
|
354 |
-cp bitmaps/[a-i]* $(DESTLIBDIR)/bitmaps
|
|
355 |
-cp bitmaps/[j-z]* $(DESTLIBDIR)/bitmaps
|
|
356 |
-chmod a+r $(DESTLIBDIR)/bitmaps/[A-I]*
|
|
357 |
-chmod a+r $(DESTLIBDIR)/bitmaps/[J-Z]*
|
|
358 |
-chmod a+r $(DESTLIBDIR)/bitmaps/[a-i]*
|
|
359 |
-chmod a+r $(DESTLIBDIR)/bitmaps/[j-z]*
|
|
360 |
-chmod a+rx $(DESTLIBDIR)/resources
|
|
361 |
-mkdir $(DESTLIBDIR)/resources
|
|
362 |
-cp resources/* $(DESTLIBDIR)/resources
|
|
363 |
-chmod a+r $(DESTLIBDIR)/resources/*.rs
|
|
364 |
-cp *.rc *.stc patches $(DESTLIBDIR)
|
|
365 |
-chmod a+r $(DESTLIBDIR)/*.rc $(DESTLIBDIR)/*.stc $(DESTLIBDIR)/patches
|
|
366 |
|
|
367 |
qinstall:: installThis
|