author | Claus Gittinger <cg@exept.de> |
Tue, 08 Feb 2011 10:04:09 +0100 | |
changeset 13287 | f59520cfb701 |
parent 13179 | f7307b5736ca |
child 13685 | 069f722252d9 |
permissions | -rw-r--r-- |
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
1 |
" |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
2 |
COPYRIGHT (c) 2006 by eXept Software AG |
12095 | 3 |
All Rights Reserved |
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
4 |
|
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
5 |
This software is furnished under a license and may be used |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
6 |
only in accordance with the terms of that license and with the |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
7 |
inclusion of the above copyright notice. This software may not |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
8 |
be provided or otherwise made available to, or used by, any |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
9 |
other person. No title to or ownership of the software is |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
10 |
hereby transferred. |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
11 |
" |
9671 | 12 |
"{ Package: 'stx:libbasic' }" |
9493 | 13 |
|
9568 | 14 |
ProjectDefinition subclass:#LibraryDefinition |
9616 | 15 |
instanceVariableNames:'' |
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'System-Support-Projects' |
|
9493 | 19 |
! |
20 |
||
9568 | 21 |
!LibraryDefinition class methodsFor:'documentation'! |
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
22 |
|
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
23 |
copyright |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
24 |
" |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
25 |
COPYRIGHT (c) 2006 by eXept Software AG |
12095 | 26 |
All Rights Reserved |
9526
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
27 |
|
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
28 |
This software is furnished under a license and may be used |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
29 |
only in accordance with the terms of that license and with the |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
30 |
inclusion of the above copyright notice. This software may not |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
31 |
be provided or otherwise made available to, or used by, any |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
32 |
other person. No title to or ownership of the software is |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
33 |
hereby transferred. |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
34 |
" |
6760ab786028
changed name from '..._Definition' to '...'
Claus Gittinger <cg@exept.de>
parents:
9517
diff
changeset
|
35 |
! ! |
9493 | 36 |
|
9999 | 37 |
!LibraryDefinition class methodsFor:'code generation'! |
38 |
||
39 |
forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition |
|
40 |
super forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition. |
|
41 |
||
42 |
"Created: / 10-08-2006 / 16:35:47 / cg" |
|
43 |
"Modified: / 18-08-2006 / 16:22:49 / cg" |
|
44 |
! ! |
|
45 |
||
11577
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
46 |
!LibraryDefinition class methodsFor:'description - compilation'! |
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
47 |
|
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
48 |
primaryTarget |
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
49 |
"the primary make target in Make.proto/bc.mak" |
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
50 |
|
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
51 |
^ 'classLibRule' |
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
52 |
! ! |
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
53 |
|
9576 | 54 |
!LibraryDefinition class methodsFor:'description - project information'! |
55 |
||
56 |
description |
|
57 |
"Returns a description string which will appear in nt.def / bc.def" |
|
58 |
||
59 |
self module = 'stx' ifTrue:[ |
|
12095 | 60 |
^ 'Smalltalk/X Class library' |
9576 | 61 |
]. |
62 |
||
9586 | 63 |
^ 'Class Library' |
9576 | 64 |
|
65 |
"Created: / 17-08-2006 / 20:52:16 / cg" |
|
9586 | 66 |
"Modified: / 18-08-2006 / 16:15:53 / cg" |
9847 | 67 |
! |
68 |
||
69 |
fileDescription |
|
10417 | 70 |
"Return a description string which will appear in nt.def / bc.def and the rc-file" |
9847 | 71 |
|
11550 | 72 |
^self description , ' (LIB)' |
9847 | 73 |
|
74 |
"Created: / 14-09-2006 / 10:55:23 / cg" |
|
13179 | 75 |
! |
76 |
||
77 |
productType |
|
78 |
"Returns the product type for autopackage" |
|
79 |
||
80 |
^ 'Library' |
|
81 |
||
82 |
"Created: / 21-12-2010 / 09:28:59 / cg" |
|
9576 | 83 |
! ! |
84 |
||
9568 | 85 |
!LibraryDefinition class methodsFor:'file generation'! |
9493 | 86 |
|
9853 | 87 |
basicFileNamesToGenerate |
10865
59a7977261af
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10805
diff
changeset
|
88 |
"answer a dictionary (filename -> generator method) with all the files, that have to be generated for this |
59a7977261af
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10805
diff
changeset
|
89 |
package" |
59a7977261af
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10805
diff
changeset
|
90 |
|
59a7977261af
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10805
diff
changeset
|
91 |
|dict| |
9576 | 92 |
|
10865
59a7977261af
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10805
diff
changeset
|
93 |
dict := super basicFileNamesToGenerate. |
59a7977261af
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10805
diff
changeset
|
94 |
|
12095 | 95 |
dict |
96 |
at:'libInit.cc' put:#'generate_libInit_dot_cc'. |
|
10865
59a7977261af
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10805
diff
changeset
|
97 |
|
59a7977261af
Use dictionary to hold filename->generatorMethpd mapping
Stefan Vogel <sv@exept.de>
parents:
10805
diff
changeset
|
98 |
^ dict. |
9582 | 99 |
! |
100 |
||
9622 | 101 |
generateFile:filename |
102 |
filename = 'libInit.cc' ifTrue:[ |
|
12095 | 103 |
^ self generate_libInit_dot_cc |
9622 | 104 |
]. |
9832 | 105 |
((filename = 'lib.rc') or:[filename = self rcFilename]) ifTrue:[ |
12095 | 106 |
^ self generate_packageName_dot_rc |
9622 | 107 |
]. |
108 |
^ super generateFile:filename |
|
109 |
||
110 |
"Created: / 22-08-2006 / 18:36:24 / cg" |
|
9832 | 111 |
"Modified: / 07-09-2006 / 17:07:46 / cg" |
9622 | 112 |
! |
113 |
||
9582 | 114 |
generate_libInit_dot_cc |
12095 | 115 |
^ self replaceMappings: self libInit_dot_cc_mappings |
116 |
in: self libInit_dot_cc |
|
9582 | 117 |
|
9960
13b44d7b8f54
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9957
diff
changeset
|
118 |
" |
13b44d7b8f54
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9957
diff
changeset
|
119 |
bosch_dapasx_datenbasis generate_libInit_dot_cc |
13b44d7b8f54
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9957
diff
changeset
|
120 |
bosch_dapasx_application generate_libInit_dot_cc |
13b44d7b8f54
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9957
diff
changeset
|
121 |
" |
9582 | 122 |
|
123 |
"Created: / 08-08-2006 / 12:47:16 / fm" |
|
124 |
"Modified: / 09-08-2006 / 11:30:52 / fm" |
|
9960
13b44d7b8f54
also generate modules.c (precompiled-in init list for app)
Claus Gittinger <cg@exept.de>
parents:
9957
diff
changeset
|
125 |
"Modified: / 19-09-2006 / 22:41:40 / cg" |
9493 | 126 |
! ! |
127 |
||
12365 | 128 |
!LibraryDefinition class methodsFor:'file mappings'! |
129 |
||
130 |
bc_dot_mak_mappings |
|
131 |
|d resFileName| |
|
132 |
||
133 |
resFileName := (self package copyFrom:(self package lastIndexOfAny:':/')+1),'.res'. |
|
134 |
||
135 |
d := super bc_dot_mak_mappings. |
|
136 |
d |
|
137 |
at: 'LIBRARY_NAME' put: ( self libraryName ); |
|
138 |
at: 'COMMONSYMFLAG' put: (self commonSymbolsFlag); |
|
139 |
at: 'HEADEROUTPUTARG' put: (self headerFileOutputArg); |
|
140 |
at: 'RESFILENAME' put: resFileName; |
|
141 |
at: 'DEPENDENCIES' put: (self generateDependencies_win32); |
|
142 |
yourself. |
|
143 |
^ d. |
|
144 |
||
145 |
"Created: / 09-08-2006 / 11:44:36 / fm" |
|
146 |
"Modified: / 09-08-2006 / 20:00:01 / fm" |
|
147 |
"Modified: / 14-09-2006 / 18:58:15 / cg" |
|
148 |
! |
|
149 |
||
150 |
extensionLine_libInit_dot_cc_mappings |
|
151 |
||
152 |
^Dictionary new |
|
153 |
at: 'LIBRARY_NAME' put: ( self st2c:(self package copy asString replaceAny:':/' with:$_) ); |
|
154 |
yourself |
|
155 |
||
156 |
"Created: / 09-08-2006 / 11:19:59 / fm" |
|
157 |
"Modified: / 14-09-2006 / 18:56:26 / cg" |
|
158 |
! |
|
159 |
||
160 |
libInit_dot_cc_mappings |
|
161 |
||
162 |
^Dictionary new |
|
163 |
at: 'LIBRARY_NAME' put: (self libraryName); |
|
164 |
at: 'PACKAGE' put: (self package); |
|
12770
520a17d353eb
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12365
diff
changeset
|
165 |
at: 'DEFINITION_CLASSES' put: (self generate_definitionClassLine_libInit_dot_cc); |
12365 | 166 |
at: 'CLASSES' put: (self generateClassLines_libInit_dot_cc); |
167 |
at: 'EXTENSION' put: (self generateExtensionLine_libInit_dot_cc); |
|
168 |
||
169 |
yourself |
|
170 |
||
171 |
"Created: / 09-08-2006 / 11:20:24 / fm" |
|
172 |
"Modified: / 16-08-2006 / 18:19:03 / User" |
|
173 |
"Modified: / 14-09-2006 / 18:56:42 / cg" |
|
174 |
! |
|
175 |
||
176 |
vc_dot_def_mappings |
|
177 |
||
178 |
^Dictionary new |
|
179 |
at: 'LIBRARY_NAME' put: (self libraryName); |
|
180 |
at: 'DESCRIPTION' put: (self description asString storeString); |
|
181 |
at: 'VERSION_NUMBER' put: (self versionNumber); |
|
182 |
yourself |
|
183 |
||
184 |
"Created: / 09-08-2006 / 11:21:21 / fm" |
|
185 |
"Modified: / 14-09-2006 / 18:58:07 / cg" |
|
186 |
! ! |
|
187 |
||
188 |
!LibraryDefinition class methodsFor:'file mappings support'! |
|
189 |
||
190 |
commonSymbolsFlag |
|
191 |
"some libraries are compiled with COMMONSYMBOLS - |
|
192 |
This saves a lot of space in the generated dll/so files; |
|
193 |
However, it also requires the librun to be rebuilt, whenever one of |
|
194 |
the commonSymbols-libs changes. |
|
195 |
Therefore, NEVER do this for end-user or application libraries; |
|
196 |
ONLY do it for a subset of the predefined, eXept-provided standard stx libraries" |
|
197 |
||
198 |
( |
|
199 |
#( |
|
200 |
'stx:libbasic' 'stx:libview' 'stx:libtool' |
|
201 |
'stx:libbasic2' 'stx:libview2' 'stx:libtool2' |
|
202 |
'stx:libbasic3' 'stx:libwidg' 'stx:libhtml' |
|
203 |
'stx:libcomp' 'stx:libwidg2' 'stx:libui' |
|
204 |
'stx:libboss' 'stx:libdb' |
|
205 |
) |
|
206 |
includes:self package) ifTrue:[ |
|
207 |
^ '$(COMMONSYMBOLS)' |
|
208 |
]. |
|
209 |
^ '' |
|
210 |
||
211 |
"Created: / 18-08-2006 / 13:01:52 / cg" |
|
212 |
"Modified: / 23-08-2006 / 09:48:11 / cg" |
|
213 |
! |
|
214 |
||
215 |
generateExtensionLine_libInit_dot_cc |
|
216 |
|mappings| |
|
217 |
||
218 |
^self hasExtensionMethods |
|
219 |
ifFalse:[''] |
|
220 |
ifTrue:[ |
|
221 |
mappings := self extensionLine_libInit_dot_cc_mappings. |
|
222 |
self replaceMappings: mappings in: self extensionLine_libInit_dot_cc.] |
|
223 |
||
224 |
" |
|
225 |
DapasXProject generateExtensionLine_libInit_dot_cc |
|
226 |
DapasX_Datenbasis generateExtensionLine_libInit_dot_cc |
|
227 |
" |
|
228 |
||
229 |
"Created: / 09-08-2006 / 11:23:34 / fm" |
|
230 |
"Modified: / 14-09-2006 / 14:19:59 / cg" |
|
231 |
! ! |
|
232 |
||
9568 | 233 |
!LibraryDefinition class methodsFor:'file templates'! |
9493 | 234 |
|
235 |
bc_dot_def |
|
9576 | 236 |
"the template code for the bc.def file" |
9493 | 237 |
|
12772 | 238 |
"/^ |
239 |
"/'LIBRARY %(LIBRARY_NAME) |
|
240 |
"/DESCRIPTION %(DESCRIPTION) |
|
241 |
"/CODE PRELOAD MOVEABLE DISCARDABLE |
|
242 |
"/SEGMENTS |
|
243 |
"/ INITCODE PRELOAD DISCARDABLE |
|
244 |
"/EXPORTS |
|
245 |
"/ __%(LIBRARY_NAME)_Init @1 |
|
246 |
"/ __%(LIBRARY_NAME)_InitDefinition @2 |
|
247 |
"/' |
|
248 |
||
12095 | 249 |
^ |
9608 | 250 |
'LIBRARY %(LIBRARY_NAME) |
9493 | 251 |
DESCRIPTION %(DESCRIPTION) |
252 |
CODE PRELOAD MOVEABLE DISCARDABLE |
|
253 |
SEGMENTS |
|
254 |
INITCODE PRELOAD DISCARDABLE |
|
255 |
EXPORTS |
|
12770
520a17d353eb
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12365
diff
changeset
|
256 |
__%(LIBRARY_NAME)_Init @1 |
9504 | 257 |
' |
9493 | 258 |
|
259 |
"Created: / 08-08-2006 / 12:26:58 / fm" |
|
260 |
"Modified: / 08-08-2006 / 19:32:27 / fm" |
|
9590 | 261 |
"Modified: / 18-08-2006 / 17:13:45 / cg" |
9493 | 262 |
! |
263 |
||
10305 | 264 |
bc_dot_mak |
10318
bef855ddbb59
bc.def - no longer generated it is now in rules\bc_dll.def or
Stefan Vogel <sv@exept.de>
parents:
10305
diff
changeset
|
265 |
"answer a template for the bc.mak makefile. |
bef855ddbb59
bc.def - no longer generated it is now in rules\bc_dll.def or
Stefan Vogel <sv@exept.de>
parents:
10305
diff
changeset
|
266 |
Any variable definition %(Variable) will be later replaced by the mapping. |
bef855ddbb59
bc.def - no longer generated it is now in rules\bc_dll.def or
Stefan Vogel <sv@exept.de>
parents:
10305
diff
changeset
|
267 |
$% characters have to be duplicated" |
10305 | 268 |
|
269 |
^ |
|
270 |
'# $','Header','$ |
|
271 |
# |
|
12095 | 272 |
# DO NOT EDIT |
10305 | 273 |
# automagically generated from the projectDefinition: ',self name,'. |
274 |
# |
|
275 |
# Warning: once you modify this file, do not rerun |
|
276 |
# stmkmp or projectDefinition-build again - otherwise, your changes are lost. |
|
277 |
# |
|
278 |
# This file contains make rules for the win32 platform (using borland-bcc). |
|
279 |
# It shares common definitions with the unix-make in Make.spec. |
|
280 |
# The nt.mak supports the following targets: |
|
281 |
# bmake - compile all st-files to a classLib (dll) |
|
282 |
# bmake clean - clean all temp files |
|
283 |
# bmake clobber - clean all |
|
284 |
# |
|
285 |
# |
|
286 |
TOP=%(TOP) |
|
287 |
INCLUDE_TOP=$(TOP)\.. |
|
288 |
||
11941
56b21fa6c358
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11687
diff
changeset
|
289 |
%(ADDITIONAL_BASE_ADDRESS_DEFINITION) |
56b21fa6c358
base address definition moved into a separate spec
Claus Gittinger <cg@exept.de>
parents:
11687
diff
changeset
|
290 |
|
10305 | 291 |
!!INCLUDE $(TOP)\rules\stdHeader_bc |
292 |
||
293 |
!!INCLUDE Make.spec |
|
294 |
||
295 |
LIBNAME=%(LIBRARY_NAME) |
|
296 |
RESFILES=%(RESFILENAME) |
|
10536
d1da7d71bcf5
Put additionalDefinitions before localIncludes
Stefan Vogel <sv@exept.de>
parents:
10417
diff
changeset
|
297 |
|
d1da7d71bcf5
Put additionalDefinitions before localIncludes
Stefan Vogel <sv@exept.de>
parents:
10417
diff
changeset
|
298 |
%(ADDITIONAL_DEFINITIONS) |
d1da7d71bcf5
Put additionalDefinitions before localIncludes
Stefan Vogel <sv@exept.de>
parents:
10417
diff
changeset
|
299 |
|
10305 | 300 |
LOCALINCLUDES=%(LOCAL_INCLUDES) |
10980 | 301 |
LOCALDEFINES=%(LOCAL_DEFINES) |
10305 | 302 |
|
303 |
STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) %(HEADEROUTPUTARG) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) %(COMMONSYMFLAG) -varPrefix=$(LIBNAME) |
|
304 |
LOCALLIBS=%(ADDITIONAL_LINK_LIBRARIES) |
|
305 |
||
306 |
OBJS= $(COMMON_OBJS) $(WIN32_OBJS) |
|
307 |
||
11577
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
308 |
ALL:: %(ADDITIONAL_TARGETS) %(PRIMARY_TARGET) |
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
309 |
|
12152
9d03dd3552a0
changed: classLibRule to include OUTDIR.
Claus Gittinger <cg@exept.de>
parents:
12095
diff
changeset
|
310 |
classLibRule: $(OUTDIR) $(OUTDIR)$(LIBNAME).dll |
10305 | 311 |
|
312 |
!!INCLUDE $(TOP)\rules\stdRules_bc |
|
313 |
||
11155
c816b5f0f90b
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
10980
diff
changeset
|
314 |
# build all prerequisite packages for this package |
c816b5f0f90b
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
10980
diff
changeset
|
315 |
prereq: |
c816b5f0f90b
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
10980
diff
changeset
|
316 |
%(MAKE_PREREQUISITES) |
c816b5f0f90b
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
10980
diff
changeset
|
317 |
|
10305 | 318 |
%(ADDITIONAL_RULES) |
319 |
||
320 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it |
|
321 |
%(DEPENDENCIES) |
|
322 |
# ENDMAKEDEPEND --- do not remove this line |
|
323 |
' |
|
324 |
||
325 |
"Created: / 09-08-2006 / 11:44:20 / fm" |
|
326 |
"Modified: / 09-08-2006 / 19:59:32 / fm" |
|
327 |
"Modified: / 14-09-2006 / 15:48:18 / cg" |
|
328 |
! |
|
329 |
||
9493 | 330 |
extensionLine_libInit_dot_cc |
331 |
||
332 |
^'_%(LIBRARY_NAME)_extensions_Init(pass,__pRT__,snd);' |
|
333 |
||
334 |
"Created: / 08-08-2006 / 15:48:56 / fm" |
|
335 |
"Modified: / 08-08-2006 / 19:32:33 / fm" |
|
336 |
! |
|
337 |
||
338 |
libInit_dot_cc |
|
9576 | 339 |
"the template code for the libInit.cc file" |
9493 | 340 |
|
12095 | 341 |
^ |
9493 | 342 |
'/* |
9576 | 343 |
* $','Header','$ |
344 |
* |
|
12095 | 345 |
* DO NOT EDIT |
9576 | 346 |
* automagically generated from the projectDefinition: ',self name,'. |
9493 | 347 |
*/ |
348 |
#define __INDIRECTVMINITCALLS__ |
|
10377 | 349 |
#include <stc.h> |
10332
5fe4d84d78fe
Add DLL_EXPORT to libInit_dot_cc
Stefan Vogel <sv@exept.de>
parents:
10318
diff
changeset
|
350 |
|
9493 | 351 |
#ifdef WIN32 |
352 |
# pragma codeseg INITCODE "INITCODE" |
|
12095 | 353 |
#endif |
10332
5fe4d84d78fe
Add DLL_EXPORT to libInit_dot_cc
Stefan Vogel <sv@exept.de>
parents:
10318
diff
changeset
|
354 |
|
5fe4d84d78fe
Add DLL_EXPORT to libInit_dot_cc
Stefan Vogel <sv@exept.de>
parents:
10318
diff
changeset
|
355 |
#if defined(INIT_TEXT_SECTION) || defined(DLL_EXPORT) |
5fe4d84d78fe
Add DLL_EXPORT to libInit_dot_cc
Stefan Vogel <sv@exept.de>
parents:
10318
diff
changeset
|
356 |
DLL_EXPORT void _%(LIBRARY_NAME)_Init() INIT_TEXT_SECTION; |
12772 | 357 |
// DLL_EXPORT void _%(LIBRARY_NAME)_InitDefinition() INIT_TEXT_SECTION; |
9493 | 358 |
#endif |
10332
5fe4d84d78fe
Add DLL_EXPORT to libInit_dot_cc
Stefan Vogel <sv@exept.de>
parents:
10318
diff
changeset
|
359 |
|
12772 | 360 |
// void _%(LIBRARY_NAME)_InitDefinition(pass, __pRT__, snd) |
361 |
// OBJ snd; struct __vmData__ *__pRT__; { |
|
362 |
// __BEGIN_PACKAGE2__("%(LIBRARY_NAME)__DFN", _%(LIBRARY_NAME)_InitDefinition, "%(PACKAGE)"); |
|
363 |
// %(DEFINITION_CLASSES) |
|
364 |
// __END_PACKAGE__(); |
|
365 |
// } |
|
12770
520a17d353eb
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12365
diff
changeset
|
366 |
|
9493 | 367 |
void _%(LIBRARY_NAME)_Init(pass, __pRT__, snd) |
368 |
OBJ snd; struct __vmData__ *__pRT__; { |
|
369 |
__BEGIN_PACKAGE2__("%(LIBRARY_NAME)", _%(LIBRARY_NAME)_Init, "%(PACKAGE)"); |
|
370 |
%(CLASSES) |
|
371 |
%(EXTENSION) |
|
372 |
__END_PACKAGE__(); |
|
9902
74fab44fab6e
Add newline at end of libInit.cc
Stefan Vogel <sv@exept.de>
parents:
9899
diff
changeset
|
373 |
} |
74fab44fab6e
Add newline at end of libInit.cc
Stefan Vogel <sv@exept.de>
parents:
9899
diff
changeset
|
374 |
' |
9493 | 375 |
|
376 |
"Created: / 08-08-2006 / 12:40:45 / fm" |
|
377 |
"Modified: / 08-08-2006 / 19:33:01 / fm" |
|
9576 | 378 |
"Modified: / 18-08-2006 / 12:57:02 / cg" |
379 |
! |
|
380 |
||
9493 | 381 |
make_dot_proto |
382 |
||
12024 | 383 |
^ |
9576 | 384 |
'# $','Header','$ |
385 |
# |
|
12024 | 386 |
# DO NOT EDIT |
9576 | 387 |
# automagically generated from the projectDefinition: ',self name,'. |
388 |
# |
|
9493 | 389 |
# Warning: once you modify this file, do not rerun |
9576 | 390 |
# stmkmp or projectDefinition-build again - otherwise, your changes are lost. |
9493 | 391 |
# |
392 |
# The Makefile as generated by this Make.proto supports the following targets: |
|
393 |
# make - compile all st-files to a classLib |
|
394 |
# make clean - clean all temp files |
|
395 |
# make clobber - clean all |
|
9576 | 396 |
# |
397 |
# This file contains definitions for Unix based platforms. |
|
9851 | 398 |
# It shares common definitions with the win32-make in Make.spec. |
9493 | 399 |
|
400 |
# |
|
401 |
# position (of this package) in directory hierarchy: |
|
402 |
# (must point to ST/X top directory, for tools and includes) |
|
403 |
TOP=%(TOP) |
|
9879 | 404 |
INCLUDE_TOP=$(TOP)/.. |
9493 | 405 |
|
406 |
# subdirectories where targets are to be made: |
|
407 |
SUBDIRS=%(SUBDIRECTORIES) |
|
408 |
||
409 |
||
410 |
# subdirectories where Makefiles are to be made: |
|
411 |
# (only define if different from SUBDIRS) |
|
412 |
# ALLSUBDIRS= |
|
413 |
||
11155
c816b5f0f90b
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
10980
diff
changeset
|
414 |
REQUIRED_SUPPORT_DIRS=%(REQUIRED_SUPPORT_DIRS) |
9493 | 415 |
|
12024 | 416 |
# if your embedded C code requires any system includes, |
417 |
# add the path(es) here:, |
|
9493 | 418 |
# ********** OPTIONAL: MODIFY the next lines *** |
419 |
# LOCALINCLUDES=-Ifoo -Ibar |
|
420 |
LOCALINCLUDES=%(LOCAL_INCLUDES) |
|
421 |
||
422 |
||
12024 | 423 |
# if you need any additional defines for embedded C code, |
424 |
# add them here:, |
|
9493 | 425 |
# ********** OPTIONAL: MODIFY the next lines *** |
426 |
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG |
|
427 |
LOCALDEFINES=%(LOCAL_DEFINES) |
|
428 |
||
9818 | 429 |
LIBNAME=%(LIBRARY_NAME) |
9613 | 430 |
STCLOCALOPT=''-package=$(PACKAGE)'' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) %(HEADEROUTPUTARG) %(COMMONSYMFLAG) -varPrefix=$(LIBNAME) |
9493 | 431 |
|
432 |
||
433 |
# ********** OPTIONAL: MODIFY the next line *** |
|
434 |
# additional C-libraries that should be pre-linked with the class-objects |
|
9734 | 435 |
LD_OBJ_LIBS=%(ADDITIONAL_LINK_LIBRARIES) |
9971
57890631d67a
Allow shared libraries to be defined for a class lib (needed for liboracle)
Stefan Vogel <sv@exept.de>
parents:
9960
diff
changeset
|
436 |
LOCAL_SHARED_LIBS=%(ADDITIONAL_SHARED_LINK_LIBRARIES) |
9493 | 437 |
|
438 |
||
439 |
# ********** OPTIONAL: MODIFY the next line *** |
|
440 |
# additional C targets or libraries should be added below |
|
441 |
LOCAL_EXTRA_TARGETS= |
|
442 |
||
9606 | 443 |
OBJS= $(COMMON_OBJS) $(UNIX_OBJS) |
444 |
||
9626 | 445 |
%(ADDITIONAL_DEFINITIONS) |
446 |
||
11577
d9ad27e7ca5e
Allow to define primary make target (needed, if sub.makes have to be performed -
Stefan Vogel <sv@exept.de>
parents:
11550
diff
changeset
|
447 |
all:: preMake %(PRIMARY_TARGET) postMake |
9493 | 448 |
|
12024 | 449 |
pre_objs:: %(ADDITIONAL_TARGETS) %(ADDITIONAL_TARGETS_SVN) |
9626 | 450 |
|
451 |
%(ADDITIONAL_RULES) |
|
9493 | 452 |
|
12024 | 453 |
%(ADDITIONAL_RULES_SVN) |
454 |
||
9493 | 455 |
# add more install actions here |
456 |
install:: |
|
457 |
||
458 |
# add more install actions for aux-files (resources) here |
|
459 |
installAux:: |
|
460 |
||
461 |
# add more preMake actions here |
|
462 |
preMake:: |
|
463 |
||
464 |
# add more postMake actions here |
|
465 |
postMake:: cleanjunk |
|
466 |
||
11155
c816b5f0f90b
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
10980
diff
changeset
|
467 |
prereq: $(REQUIRED_SUPPORT_DIRS) |
c816b5f0f90b
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
10980
diff
changeset
|
468 |
%(MAKE_PREREQUISITES) |
c816b5f0f90b
prereq rule also for libraries
Claus Gittinger <cg@exept.de>
parents:
10980
diff
changeset
|
469 |
|
9493 | 470 |
cleanjunk:: |
471 |
||
472 |
clean:: |
|
9576 | 473 |
%(TAB)-rm -f *.o *.H |
9493 | 474 |
|
10805
92df6c9281f9
Fix prereq: definition in Make.proto
Stefan Vogel <sv@exept.de>
parents:
10536
diff
changeset
|
475 |
clobber:: clean |
9576 | 476 |
%(TAB)-rm -f *.so *.dll |
9493 | 477 |
|
478 |
', |
|
479 |
" |
|
480 |
$(INSTALLBASE):: |
|
9576 | 481 |
%(TAB)@test -d $@ || mkdir $@ |
9493 | 482 |
|
483 |
$(INSTALLBASE)/packages:: $(INSTALLBASE) |
|
9576 | 484 |
%(TAB)@test -d $@ || mkdir $@ |
9493 | 485 |
|
486 |
$(INSTALLBASE)/packages/$(MODULE):: $(INSTALLBASE)/packages |
|
9576 | 487 |
%(TAB)@test -d $@ || mkdir $@ |
9493 | 488 |
|
489 |
$(INSTALLBASE)/packages/$(MODULE)/dapasx:: $(INSTALLBASE)/packages/$(MODULE) |
|
9576 | 490 |
%(TAB)@test -d $@ || mkdir $@ |
9493 | 491 |
|
492 |
$(INSTALLBASE)/packages/$(MODULE)/dapasx/interactiver_editor:: $(INSTALLBASE)/packages/$(MODULE)/dapasx |
|
9576 | 493 |
%(TAB)@test -d $@ || mkdir $@ |
9493 | 494 |
|
495 |
$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR):: $(INSTALLBASE)/packages/$(MODULE) |
|
9576 | 496 |
%(TAB)@test -d $@ || mkdir $@ |
9493 | 497 |
" |
498 |
' |
|
499 |
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it |
|
9851 | 500 |
%(DEPENDENCIES) |
9493 | 501 |
# ENDMAKEDEPEND --- do not remove this line |
502 |
||
503 |
' |
|
504 |
||
505 |
"Created: / 08-08-2006 / 20:45:36 / fm" |
|
506 |
"Modified: / 09-08-2006 / 16:50:23 / fm" |
|
9879 | 507 |
"Modified: / 14-09-2006 / 15:48:02 / cg" |
12024 | 508 |
"Modified: / 24-06-2009 / 21:39:29 / Jan Vrany <vranyj1@fel.cvut.cz>" |
9493 | 509 |
! |
510 |
||
10305 | 511 |
vc_dot_def |
9493 | 512 |
|
12772 | 513 |
"/^ |
514 |
"/'LIBRARY %(LIBRARY_NAME) |
|
515 |
"/DESCRIPTION %(DESCRIPTION) |
|
516 |
"/VERSION %(VERSION_NUMBER) |
|
517 |
"/CODE EXECUTE READ |
|
518 |
"/DATA READ WRITE |
|
519 |
"/SECTIONS |
|
520 |
"/ INITCODE READ EXECUTE |
|
521 |
"/ INITDATA READ WRITE |
|
522 |
"/EXPORTS |
|
523 |
"/ _%(LIBRARY_NAME)_Init @1 |
|
524 |
"/ _%(LIBRARY_NAME)_InitDefinition @2 |
|
525 |
"/IMPORTS' |
|
526 |
||
9493 | 527 |
^ |
528 |
'LIBRARY %(LIBRARY_NAME) |
|
529 |
DESCRIPTION %(DESCRIPTION) |
|
530 |
VERSION %(VERSION_NUMBER) |
|
12095 | 531 |
CODE EXECUTE READ |
9493 | 532 |
DATA READ WRITE |
533 |
SECTIONS |
|
12095 | 534 |
INITCODE READ EXECUTE |
9493 | 535 |
INITDATA READ WRITE |
12095 | 536 |
EXPORTS |
12770
520a17d353eb
add an extra entry to the libInit.cc code:
Claus Gittinger <cg@exept.de>
parents:
12365
diff
changeset
|
537 |
_%(LIBRARY_NAME)_Init @1 |
9493 | 538 |
IMPORTS' |
539 |
||
540 |
"Modified: / 08-08-2006 / 19:33:14 / fm" |
|
541 |
! ! |
|
542 |
||
12087 | 543 |
!LibraryDefinition class methodsFor:'misc ui support'! |
544 |
||
545 |
iconInBrowserSymbol |
|
546 |
<resource: #programImage> |
|
547 |
||
548 |
self theNonMetaclass isLibraryDefinition ifTrue:[^ #libraryDefinitionClassIcon ]. |
|
549 |
^ super iconInBrowserSymbol |
|
550 |
||
551 |
"/ (c == LibraryDefinition) ifTrue:[ |
|
552 |
"/ aClass ~~ LibraryDefinition ifTrue:[ |
|
553 |
"/ ^ self packageIconSmall |
|
554 |
"/ ]. |
|
555 |
"/ ]. |
|
556 |
! ! |
|
557 |
||
11550 | 558 |
!LibraryDefinition class methodsFor:'obsolete'! |
559 |
||
560 |
lib_dot_rc |
|
561 |
<resource: #obsolete> |
|
562 |
||
12095 | 563 |
^ |
11550 | 564 |
'/*------------------------------------------------------------------------ |
12095 | 565 |
* $','Header','$ |
11550 | 566 |
* |
12095 | 567 |
* DO NOT EDIT |
11550 | 568 |
* automagically generated from the projectDefinition: ',self name,'. |
569 |
*------------------------------------------------------------------------*/ |
|
570 |
||
571 |
// #if (__BORLANDC__ < 0x0550) |
|
572 |
// #include <ver.h> |
|
573 |
// #endif |
|
574 |
||
575 |
VS_VERSION_INFO VERSIONINFO |
|
576 |
FILEVERSION %(FILEVERSION) |
|
577 |
PRODUCTVERSION %(PRODUCTVERSION) |
|
578 |
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE |
|
579 |
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD |
|
580 |
FILEOS VOS_NT_WINDOWS32 |
|
581 |
FILETYPE %(FILETYPE) |
|
582 |
FILESUBTYPE VS_USER_DEFINED |
|
583 |
||
584 |
BEGIN |
|
585 |
BLOCK "StringFileInfo" |
|
586 |
BEGIN |
|
587 |
BLOCK "040904E4" |
|
588 |
BEGIN |
|
589 |
VALUE "CompanyName", %(COMPANYNAME) |
|
590 |
VALUE "FileDescription", "Smalltalk/X Additional Developer Basic Classes Library\0" |
|
591 |
VALUE "FileVersion", "5.2.8.1\0" |
|
592 |
VALUE "InternalName", "libbasic3\0" |
|
593 |
VALUE "LegalCopyright", "Copyright eXept Software AG 1998-2006\0" |
|
594 |
VALUE "ProductName", "Smalltalk/X\0" |
|
595 |
VALUE "ProductVersion", "5.2.8.1\0" |
|
596 |
END |
|
597 |
||
598 |
END |
|
599 |
||
600 |
BLOCK "VarFileInfo" |
|
601 |
BEGIN // Language | Translation |
|
602 |
VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual |
|
603 |
END |
|
604 |
END |
|
605 |
' |
|
606 |
||
607 |
"Created: / 17-08-2006 / 19:37:50 / cg" |
|
608 |
"Modified: / 18-08-2006 / 12:57:09 / cg" |
|
609 |
! ! |
|
610 |
||
9812 | 611 |
!LibraryDefinition class methodsFor:'queries'! |
612 |
||
613 |
canHaveExtensions |
|
614 |
"return true, if this class allows extensions from other packages. |
|
12333 | 615 |
Private classes, namespaces and projectDefinitions don't allow this" |
9812 | 616 |
|
12333 | 617 |
^ self == LibraryDefinition |
9812 | 618 |
|
619 |
" |
|
620 |
Smalltalk allClasses select:[:each | each canHaveExtensions not] |
|
621 |
" |
|
622 |
||
623 |
"Created: / 30-08-2006 / 15:29:53 / cg" |
|
12333 | 624 |
! |
625 |
||
626 |
projectType |
|
627 |
^ LibraryType |
|
9812 | 628 |
! ! |
629 |
||
9568 | 630 |
!LibraryDefinition class methodsFor:'sanity checks'! |
9493 | 631 |
|
632 |
searchForInconsistencies |
|
633 |
self searchForNeverCompiledSuperclasses. |
|
634 |
||
635 |
" |
|
636 |
self searchForInconsistencies |
|
12095 | 637 |
DapasX_Datenbasis searchForInconsistencies |
9493 | 638 |
" |
639 |
||
640 |
"Created: / 09-08-2006 / 16:30:46 / fm" |
|
641 |
! |
|
642 |
||
643 |
searchForNeverCompiledSuperclasses |
|
12095 | 644 |
self compiled_classesDo:[:includedClass | |
12214
96d417c20fb8
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
12152
diff
changeset
|
645 |
includedClass allSuperclassesDo:[:eachSuperClass | |
96d417c20fb8
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
12152
diff
changeset
|
646 |
eachSuperClass package == PackageId noProjectID ifTrue:[ |
96d417c20fb8
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
12152
diff
changeset
|
647 |
self inconsistency:'uncompiled superclass: ' , eachSuperClass name |
96d417c20fb8
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
12152
diff
changeset
|
648 |
]. |
96d417c20fb8
Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents:
12152
diff
changeset
|
649 |
] |
9493 | 650 |
]. |
651 |
||
652 |
" |
|
653 |
self searchForNeverCompiledSuperclasses |
|
12095 | 654 |
DapasX_Datenbasis searchForNeverCompiledSuperclasses |
9493 | 655 |
" |
656 |
||
657 |
"Created: / 09-08-2006 / 16:31:54 / fm" |
|
658 |
! ! |
|
659 |
||
9568 | 660 |
!LibraryDefinition class methodsFor:'testing'! |
9558 | 661 |
|
12310
3a8e985b4625
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12214
diff
changeset
|
662 |
isAbstract |
3a8e985b4625
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12214
diff
changeset
|
663 |
^ self == LibraryDefinition |
3a8e985b4625
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12214
diff
changeset
|
664 |
! |
3a8e985b4625
added: #isConsoleApplication
Claus Gittinger <cg@exept.de>
parents:
12214
diff
changeset
|
665 |
|
9666 | 666 |
isLibraryDefinition |
667 |
^ self ~~ LibraryDefinition |
|
668 |
||
669 |
" |
|
670 |
stx_libboss isLibraryDefinition |
|
671 |
ProjectDefinition isLibraryDefinition |
|
672 |
LibraryDefinition isLibraryDefinition |
|
673 |
" |
|
674 |
||
675 |
"Created: / 23-08-2006 / 15:17:50 / cg" |
|
676 |
! |
|
677 |
||
9558 | 678 |
isProjectDefinition |
13287 | 679 |
^ self ~~ LibraryDefinition "/ skip myself - I am abstract |
9558 | 680 |
|
9612 | 681 |
" |
682 |
stx_libboss isProjectDefinition |
|
683 |
ProjectDefinition isProjectDefinition |
|
684 |
" |
|
685 |
||
9558 | 686 |
"Created: / 17-08-2006 / 14:11:46 / cg" |
13287 | 687 |
"Modified: / 08-02-2011 / 10:03:42 / cg" |
9558 | 688 |
! ! |
689 |
||
9568 | 690 |
!LibraryDefinition class methodsFor:'documentation'! |
9493 | 691 |
|
692 |
version |
|
13287 | 693 |
^ '$Header: /cvs/stx/stx/libbasic/LibraryDefinition.st,v 1.100 2011-02-08 09:04:09 cg Exp $' |
12087 | 694 |
! |
695 |
||
696 |
version_CVS |
|
13287 | 697 |
^ '$Header: /cvs/stx/stx/libbasic/LibraryDefinition.st,v 1.100 2011-02-08 09:04:09 cg Exp $' |
9493 | 698 |
! ! |