File: commpre.nmk

package info (click to toggle)
storm-lang 0.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 52,028 kB
  • sloc: ansic: 261,471; cpp: 140,432; sh: 14,891; perl: 9,846; python: 2,525; lisp: 2,504; asm: 860; makefile: 678; pascal: 70; java: 52; xml: 37; awk: 12
file content (363 lines) | stat: -rw-r--r-- 9,490 bytes parent folder | download | duplicates (2)
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
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
# commpre.nmk: FIRST COMMON FRAGMENT FOR PLATFORMS USING NMAKE -*- makefile -*-1
#
# $Id$
# Copyright (c) 2001-2020 Ravenbrook Limited.  See end of file for license.
#
# DESCRIPTION
#
# .description: This makefile fragment is included in more specific
# makefiles for platforms which use the "mv" builder.  This is
# the first of two common makefile fragements (the other is commpost.nmk).
# Alas, due to shortcomings in nmake, it is not possible to use only one
# common fragment.
#
# %%PART: When adding a new part, add a new parameter for the files included
# in the part
# Parameters:
#   PFM        platform code, e.g. "w3i3mv"
#   PFMDEFS    /D options to define platforms preprocessor symbols
#              to the compiler. Avoid using this if possible, as it
#              prevents the MPS being built with a simple command like
#              "cl mps.c".
#   MPMCOMMON  list of sources which make up the "mpm" part for all
#              platforms. Each source is stripped of its .c extension
#              and surrounded with [brackets].
#   MPMPF      as above for the current platform.
#   PLINTH     as above for the "plinth" part
#   AMC        as above for the "amc" part
#   AMS        as above for the "ams" part
#   LO         as above for the "lo" part
#   POOLN      as above for the "pooln" part
#   SNC        as above for the "snc" part
#   POOLS      as above for all pools included in the target
#   MPM        as above for the MPMCOMMON + MPMPF + PLINTH + POOLS
#   DW         as above for the "dw" part
#   FMTTEST    as above for the "fmttest" part
#   FMTSCHEME  as above for the "fmtscheme" part
#   TESTLIB    as above for the "testlib" part
#   TESTTHR    as above for the "testthr" part
#   NOISY      if defined, causes command to be emitted
#
#
# EDITING
#
# To add new targets. varieties, and parts:
# Search for the string "%%TARGET", "%%VARIETY", or "%%PART" in this makefile
# and follow the instructions.
#


# TARGETS
#
#
# %%TARGET: When adding a new target, add it to one of the variables
# in this section. Library components go in LIB_TARGETS.

LIB_TARGETS=mps.lib

# Test cases go in TEST_TARGETS.

TEST_TARGETS=\
    abqtest.exe \
    addrobj.exe \
    airtest.exe \
    amcss.exe \
    amcsshe.exe \
    amcssth.exe \
    amsss.exe \
    amssshe.exe \
    apss.exe \
    arenacv.exe \
    awlut.exe \
    awluthe.exe \
    awlutth.exe \
    btcv.exe \
    bttest.exe \
    djbench.exe \
    extcon.exe \
    finalcv.exe \
    finaltest.exe \
    fotest.exe \
    gcbench.exe \
    landtest.exe \
    locbwcss.exe \
    lockcov.exe \
    lockut.exe \
    locusss.exe \
    locv.exe \
    messtest.exe \
    mpmss.exe \
    mpsicv.exe \
    mv2test.exe \
    nailboardtest.exe \
    poolncv.exe \
    qs.exe \
    sacss.exe \
    segsmss.exe \
    sncss.exe \
    steptest.exe \
    tagtest.exe \
    teletest.exe \
    walkt0.exe \
    zcoll.exe \
    zmess.exe \
    ztfm.exe

# Stand-alone programs go in EXTRA_TARGETS if they should always be
# built, or in OPTIONAL_TARGETS if they should only be built if

EXTRA_TARGETS=mpseventcnv.exe mpseventpy.exe mpseventtxt.exe
OPTIONAL_TARGETS=mpseventsql.exe

# This target records programs that we were once able to build but
# can't at the moment:
#
# replay -- depends on the EPVM pool.

UNBUILDABLE_TARGETS=replay.exe

ALL_TARGETS=$(LIB_TARGETS) $(TEST_TARGETS) $(EXTRA_TARGETS)


# PARAMETERS
#
#
# %%PART: When adding a new part, add the sources for the new part here.

MPMCOMMON=\
    [abq] \
    [arena] \
    [arenacl] \
    [arenavm] \
    [arg] \
    [boot] \
    [bt] \
    [buffer] \
    [cbs] \
    [dbgpool] \
    [dbgpooli] \
    [event] \
    [failover] \
    [format] \
    [freelist] \
    [global] \
    [land] \
    [ld] \
    [locus] \
    [message] \
    [meter] \
    [mpm] \
    [mpsi] \
    [nailboard] \
    [policy] \
    [pool] \
    [poolabs] \
    [poolmfs] \
    [poolmrg] \
    [poolmv2] \
    [protocol] \
    [range] \
    [rangetree] \
    [ref] \
    [ring] \
    [root] \
    [sa] \
    [sac] \
    [scan] \
    [seg] \
    [shield] \
    [splay] \
    [ss] \
    [table] \
    [trace] \
    [traceanc] \
    [tract] \
    [trans] \
    [tree] \
    [version] \
    [vm] \
    [walk]
PLINTH = [mpsliban] [mpsioan]
AMC = [poolamc]
AMS = [poolams]
AWL = [poolawl]
LO = [poollo]
MVFF = [poolmvff]
POOLN = [pooln]
SNC = [poolsnc]
FMTDY = [fmtdy] [fmtno]
FMTTEST = [fmthe] [fmtdy] [fmtno] [fmtdytst]
FMTSCHEME = [fmtscheme]
TESTLIB = [testlib] [getoptl]
TESTTHR = [testthrw3]
POOLS = $(AMC) $(AMS) $(AWL) $(LO) $(MV2) $(MVFF) $(SNC)
MPM = $(MPMCOMMON) $(MPMPF) $(POOLS) $(PLINTH)


# CHECK PARAMETERS
#
#
# %%PART: When adding a new part, add checks for the parameter with the
# sources for the new part.

!IFNDEF PFM
!ERROR commpre.nmk: PFM not defined
!ENDIF
!IFNDEF MPM
!ERROR commpre.nmk: MPM not defined
!ENDIF
!IFNDEF MPMCOMMON
!ERROR commpre.nmk: MPMCOMMON not defined
!ENDIF
!IFNDEF MPMPF
!ERROR commpre.nmk: MPMPF not defined
!ENDIF
!IFNDEF PLINTH
!ERROR commpre.nmk: PLINTH not defined
!ENDIF
!IFNDEF LO
!ERROR commpre.nmk: LO not defined
!ENDIF
!IFNDEF AMC
!ERROR commpre.nmk: AMC not defined
!ENDIF
!IFNDEF AMS
!ERROR commpre.nmk: AMS not defined
!ENDIF
!IFNDEF POOLN
!ERROR commpre.nmk: POOLN not defined
!ENDIF
!IFNDEF SNC
!ERROR commpre.nmk: SNC not defined
!ENDIF
!IFNDEF FMTDY
!ERROR commpre.nmk: FMTDY not defined
!ENDIF
!IFNDEF FMTTEST
!ERROR commpre.nmk: FMTTEST not defined
!ENDIF
!IFNDEF FMTSCHEME
!ERROR commpre.nmk: FMTSCHEME not defined
!ENDIF
!IFNDEF TESTLIB
!ERROR commpre.nmk: TESTLIB not defined
!ENDIF
!IFNDEF TESTTHR
!ERROR commpre.nmk: TESTTHR not defined
!ENDIF


# DECLARATIONS


!IFDEF NOISY
ECHO = rem
!ELSE
.SILENT:
ECHO = echo
!ENDIF


# C FLAGS

CFLAGSTARGETPRE =
CFLAGSTARGETPOST =
CRTFLAGSHOT =
CRTFLAGSCOOL =
LINKFLAGSHOT =
LINKFLAGSCOOL =

CFLAGSSQLPRE = /nologo $(PFMDEFS)
CFLAGSCOMMONPRE = /nologo $(PFMDEFS) $(CFLAGSTARGETPRE)
CFLAGSSQLPOST =
CFLAGSCOMMONPOST = $(CFLAGSTARGETPOST)

# Flags for use in the variety combinations
CFLAGSHOT = /O2
# (above /O2 (maximise speed) used to be set to /Ox
# (maximise optimisations) in for tool versions before VS 9)
# We used to have /GZ here (stack probe).
# Note that GZ is specific to version 12 of the cl tool.  drj 2003-11-04
# It is ignored on earlier versions of the cl tool.
# /GZ here generates a dependency on the C library and when we are
# building a DLL, mpsdy.dll, the linker step will fail (error LNK2001:
# unresolved external symbol __chkesp).  See
# http://support.microsoft.com/kb/q191669/
CFLAGSCOOL =
CFLAGSINTERNAL = /Zi
CFLAGSEXTERNAL =

# The combinations of variety
# %%VARIETY: When adding a new variety, define a macro containing the set
# of flags for the new variety.
CFRASH = /DCONFIG_VAR_RASH $(CRTFLAGSHOT)  $(CFLAGSHOT)  $(CFLAGSEXTERNAL)
CFHOT  = /DCONFIG_VAR_HOT  $(CRTFLAGSHOT)  $(CFLAGSHOT)  $(CFLAGSINTERNAL)
CFCOOL = /DCONFIG_VAR_COOL $(CRTFLAGSCOOL) $(CFLAGSCOOL) $(CFLAGSINTERNAL)

# Microsoft documentation is not very clear on the point of using both
# optimization and debug information

# LINKER FLAGS
# %%VARIETY: When adding a new variety, define a macro containing the flags
# for the new variety
LINKER = link
LINKFLAGSCOMMON = /nologo /LARGEADDRESSAWARE
LINKFLAGSINTERNAL = /DEBUG
# ( Internal flags used to be set to /DEBUG:full )
LINKFLAGSEXTERNAL = /RELEASE

LFRASH = $(LINKFLAGSHOT)    $(LINKFLAGSEXTERNAL)
LFHOT  = $(LINKFLAGSHOT)    $(LINKFLAGSINTERNAL)
LFCOOL = $(LINKFLAGSCOOL)   $(LINKFLAGSINTERNAL)

#LFCV = /PROFILE /DEBUG:full /DEBUGTYPE:cv

# Library manager
# %%VARIETY: When adding a new variety, define a macro containing the flags
# for the new variety
LIBMAN = lib                  # can't call this LIB - it screws the environment
LIBFLAGSCOMMON =

LIBFLAGSRASH =
LIBFLAGSHOT =
LIBFLAGSCOOL =

# Browser database manager [not used at present]
#BSC = bscmake
#BSCFLAGS = /nologo /n


# == Common definitions ==
# %%PART: When adding a new part, add it here, unless it's platform-specific
# [It is not possible use a macro, like $(PFM), in a substitution,
# hence all parts end up being platform-specific.]


# C. COPYRIGHT AND LICENSE
#
# Copyright (C) 2001-2020 Ravenbrook Limited <https://www.ravenbrook.com/>.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.