@agoric/xsnap 0.14.3-u14.0 → 0.14.3-u16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/api.js +4 -2
- package/build.env +1 -1
- package/moddable/modules/data/base64/base64.js +28 -0
- package/moddable/modules/data/base64/manifest.json +11 -0
- package/moddable/modules/data/base64/modBase64.c +188 -0
- package/moddable/modules/data/binaryMessage/BinaryMessage.js +106 -0
- package/moddable/modules/data/crc/crc.c +205 -0
- package/moddable/modules/data/crc/crc.js +36 -0
- package/moddable/modules/data/crc/manifest.json +8 -0
- package/moddable/modules/data/hex/hex.js +28 -0
- package/moddable/modules/data/hex/manifest.json +11 -0
- package/moddable/modules/data/hex/modHex.c +139 -0
- package/moddable/modules/data/logical/logical.js +32 -0
- package/moddable/modules/data/logical/modLogical.c +98 -0
- package/moddable/modules/data/qrcode/manifest.json +9 -0
- package/moddable/modules/data/qrcode/qrcode.c +93 -0
- package/moddable/modules/data/qrcode/qrcode.js +23 -0
- package/moddable/modules/data/qrcode/qrcodegen.c +1025 -0
- package/moddable/modules/data/qrcode/qrcodegen.h +267 -0
- package/moddable/modules/data/text/decoder/manifest.json +8 -0
- package/moddable/modules/data/text/decoder/textdecoder.c +480 -0
- package/moddable/modules/data/text/decoder/textdecoder.js +27 -0
- package/moddable/modules/data/text/encoder/manifest.json +8 -0
- package/moddable/modules/data/text/encoder/textencoder.c +232 -0
- package/moddable/modules/data/text/encoder/textencoder.js +24 -0
- package/moddable/modules/data/tinyint/tinyint.c +150 -0
- package/moddable/modules/data/tinyint/tinyint.js +53 -0
- package/moddable/modules/data/url/manifest.json +17 -0
- package/moddable/modules/data/url/url.c +1959 -0
- package/moddable/modules/data/url/url.js +210 -0
- package/moddable/modules/data/wavreader/manifest.json +8 -0
- package/moddable/modules/data/wavreader/wavreader.js +128 -0
- package/moddable/modules/data/zlib/deflate.c +161 -0
- package/moddable/modules/data/zlib/deflate.js +63 -0
- package/moddable/modules/data/zlib/inflate.c +145 -0
- package/moddable/modules/data/zlib/inflate.js +66 -0
- package/moddable/modules/data/zlib/manifest_deflate.json +9 -0
- package/moddable/modules/data/zlib/manifest_inflate.json +9 -0
- package/moddable/modules/data/zlib/miniz.c +4924 -0
- package/moddable/xs/includes/xs.d.ts +73 -0
- package/moddable/xs/includes/xs.h +1533 -0
- package/moddable/xs/includes/xsmc.h +206 -0
- package/moddable/xs/makefiles/lin/makefile +33 -0
- package/moddable/xs/makefiles/lin/xsc.mk +118 -0
- package/moddable/xs/makefiles/lin/xsid.mk +90 -0
- package/moddable/xs/makefiles/lin/xsl.mk +168 -0
- package/moddable/xs/makefiles/lin/xst.mk +201 -0
- package/moddable/xs/makefiles/mac/makefile +33 -0
- package/moddable/xs/makefiles/mac/xsc.mk +130 -0
- package/moddable/xs/makefiles/mac/xsid.mk +102 -0
- package/moddable/xs/makefiles/mac/xsl.mk +177 -0
- package/moddable/xs/makefiles/mac/xst.mk +203 -0
- package/moddable/xs/makefiles/mac/xst_no_asan.txt +52 -0
- package/moddable/xs/makefiles/win/build.bat +26 -0
- package/moddable/xs/makefiles/win/xsc.mak +142 -0
- package/moddable/xs/makefiles/win/xsid.mak +113 -0
- package/moddable/xs/makefiles/win/xsl.mak +186 -0
- package/moddable/xs/makefiles/win/xst.mak +195 -0
- package/moddable/xs/platforms/lin_xs.h +99 -0
- package/moddable/xs/platforms/mac_xs.h +97 -0
- package/moddable/xs/platforms/wasm_xs.h +79 -0
- package/moddable/xs/platforms/win_xs.h +104 -0
- package/moddable/xs/platforms/xsHost.h +63 -0
- package/moddable/xs/platforms/xsPlatform.h +618 -0
- package/moddable/xs/sources/xsAPI.c +2555 -0
- package/moddable/xs/sources/xsAll.c +294 -0
- package/moddable/xs/sources/xsAll.h +2741 -0
- package/moddable/xs/sources/xsArguments.c +222 -0
- package/moddable/xs/sources/xsArray.c +2657 -0
- package/moddable/xs/sources/xsAtomics.c +844 -0
- package/moddable/xs/sources/xsBigInt.c +1859 -0
- package/moddable/xs/sources/xsBoolean.c +109 -0
- package/moddable/xs/sources/xsCode.c +4493 -0
- package/moddable/xs/sources/xsCommon.c +1710 -0
- package/moddable/xs/sources/xsCommon.h +1142 -0
- package/moddable/xs/sources/xsDataView.c +2890 -0
- package/moddable/xs/sources/xsDate.c +1541 -0
- package/moddable/xs/sources/xsDebug.c +2710 -0
- package/moddable/xs/sources/xsDefaults.c +134 -0
- package/moddable/xs/sources/xsError.c +353 -0
- package/moddable/xs/sources/xsFunction.c +776 -0
- package/moddable/xs/sources/xsGenerator.c +865 -0
- package/moddable/xs/sources/xsGlobal.c +839 -0
- package/moddable/xs/sources/xsJSON.c +1091 -0
- package/moddable/xs/sources/xsLexical.c +1969 -0
- package/moddable/xs/sources/xsLockdown.c +933 -0
- package/moddable/xs/sources/xsMapSet.c +1649 -0
- package/moddable/xs/sources/xsMarshall.c +1020 -0
- package/moddable/xs/sources/xsMath.c +624 -0
- package/moddable/xs/sources/xsMemory.c +1941 -0
- package/moddable/xs/sources/xsModule.c +3101 -0
- package/moddable/xs/sources/xsNumber.c +560 -0
- package/moddable/xs/sources/xsObject.c +1102 -0
- package/moddable/xs/sources/xsPlatforms.c +480 -0
- package/moddable/xs/sources/xsProfile.c +577 -0
- package/moddable/xs/sources/xsPromise.c +1199 -0
- package/moddable/xs/sources/xsProperty.c +636 -0
- package/moddable/xs/sources/xsProxy.c +1014 -0
- package/moddable/xs/sources/xsRegExp.c +1168 -0
- package/moddable/xs/sources/xsRun.c +4889 -0
- package/moddable/xs/sources/xsScope.c +1293 -0
- package/moddable/xs/sources/xsScript.c +288 -0
- package/moddable/xs/sources/xsScript.h +1186 -0
- package/moddable/xs/sources/xsSnapshot.c +2161 -0
- package/moddable/xs/sources/xsSnapshot.h +51 -0
- package/moddable/xs/sources/xsSourceMap.c +218 -0
- package/moddable/xs/sources/xsString.c +3332 -0
- package/moddable/xs/sources/xsSymbol.c +503 -0
- package/moddable/xs/sources/xsSyntaxical.c +4193 -0
- package/moddable/xs/sources/xsTree.c +1893 -0
- package/moddable/xs/sources/xsType.c +1488 -0
- package/moddable/xs/sources/xsdtoa.c +6672 -0
- package/moddable/xs/sources/xsmc.c +340 -0
- package/moddable/xs/sources/xsre.c +7578 -0
- package/package.json +37 -20
- package/scripts/get_xsnap_version.sh +14 -0
- package/scripts/test-package.sh +21 -0
- package/src/avaAssertXS.js +6 -2
- package/src/avaHandler.cjs +2 -5
- package/src/avaXS.js +7 -8
- package/src/build.js +161 -28
- package/src/replay.js +0 -3
- package/src/xsnap.js +105 -91
- package/src/xsrepl.js +2 -3
- package/xsnap-native/xsnap/makefiles/lin/makefile +10 -0
- package/xsnap-native/xsnap/makefiles/lin/xsnap-worker.mk +156 -0
- package/xsnap-native/xsnap/makefiles/lin/xsnap.mk +144 -0
- package/xsnap-native/xsnap/makefiles/mac/makefile +10 -0
- package/xsnap-native/xsnap/makefiles/mac/xsnap-worker.mk +165 -0
- package/xsnap-native/xsnap/makefiles/mac/xsnap.mk +153 -0
- package/xsnap-native/xsnap/sources/xsnap-worker.c +1008 -0
- package/xsnap-native/xsnap/sources/xsnap.c +717 -0
- package/xsnap-native/xsnap/sources/xsnap.h +142 -0
- package/xsnap-native/xsnap/sources/xsnapPlatform.c +1501 -0
- package/xsnap-native/xsnap/sources/xsnapPlatform.h +105 -0
- package/CHANGELOG.md +0 -654
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2016-2020 Moddable Tech, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is part of the Moddable SDK Runtime.
|
|
5
|
+
*
|
|
6
|
+
* The Moddable SDK Runtime is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* The Moddable SDK Runtime is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU Lesser General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
* along with the Moddable SDK Runtime. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
*
|
|
19
|
+
* This file incorporates work covered by the following copyright and
|
|
20
|
+
* permission notice:
|
|
21
|
+
*
|
|
22
|
+
* Copyright (C) 2010-2016 Marvell International Ltd.
|
|
23
|
+
* Copyright (C) 2002-2010 Kinoma, Inc.
|
|
24
|
+
*
|
|
25
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
26
|
+
* you may not use this file except in compliance with the License.
|
|
27
|
+
* You may obtain a copy of the License at
|
|
28
|
+
*
|
|
29
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
30
|
+
*
|
|
31
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
32
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
33
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
34
|
+
* See the License for the specific language governing permissions and
|
|
35
|
+
* limitations under the License.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
#ifndef __XSMC_H__
|
|
39
|
+
#define __XSMC_H__
|
|
40
|
+
|
|
41
|
+
#include "xs.h"
|
|
42
|
+
|
|
43
|
+
#ifdef __cplusplus
|
|
44
|
+
extern "C" {
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
#undef xsTypeOf
|
|
48
|
+
#define xsmcTypeOf(_SLOT) fxTypeOf(the, &_SLOT)
|
|
49
|
+
#undef xsIsCallable
|
|
50
|
+
#define xsmcIsCallable(_SLOT) fxIsCallable(the, &_SLOT)
|
|
51
|
+
|
|
52
|
+
#undef xsToBoolean
|
|
53
|
+
#undef xsToInteger
|
|
54
|
+
#undef xsToNumber
|
|
55
|
+
#undef xsToString
|
|
56
|
+
#undef xsToStringBuffer
|
|
57
|
+
#define xsmcToBoolean(_SLOT) fxToBoolean(the, &_SLOT)
|
|
58
|
+
#define xsmcToInteger(_SLOT) fxToInteger(the, &_SLOT)
|
|
59
|
+
#define xsmcToNumber(_SLOT) fxToNumber(the, &_SLOT)
|
|
60
|
+
#define xsmcToString(_SLOT) fxToString(the, &_SLOT)
|
|
61
|
+
#define xsmcToStringBuffer(_SLOT,_BUFFER,_SIZE) fxToStringBuffer(the, &_SLOT, _BUFFER ,_SIZE)
|
|
62
|
+
|
|
63
|
+
#define xsmcSetUndefined(_SLOT) fxUndefined(the, &_SLOT)
|
|
64
|
+
#define xsmcSetNull(_SLOT) fxNull(the, &_SLOT)
|
|
65
|
+
#define xsmcSetFalse(_SLOT) fxBoolean(the, &_SLOT, 0)
|
|
66
|
+
#define xsmcSetTrue(_SLOT) fxBoolean(the, &_SLOT, 1)
|
|
67
|
+
#define xsmcSetBoolean(_SLOT, _VALUE) fxBoolean(the, &_SLOT, _VALUE)
|
|
68
|
+
#define xsmcSetInteger(_SLOT, _VALUE) fxInteger(the, &_SLOT, _VALUE)
|
|
69
|
+
#define xsmcSetNumber(_SLOT, _VALUE) fxNumber(the, &_SLOT, _VALUE)
|
|
70
|
+
#define xsmcSetString(_SLOT, _VALUE) fxString(the, &_SLOT, _VALUE)
|
|
71
|
+
#define xsmcSetStringBuffer(_SLOT, _BUFFER,_SIZE) fxStringBuffer(the, &_SLOT, _BUFFER ,_SIZE)
|
|
72
|
+
|
|
73
|
+
#undef xsArrayBuffer
|
|
74
|
+
#define xsmcSetArrayBuffer(_SLOT, _BUFFER, _SIZE) fxArrayBuffer(the, &_SLOT, _BUFFER, _SIZE, -1)
|
|
75
|
+
#undef xsArrayBufferResizable
|
|
76
|
+
#define xsmcSetArrayBufferResizable(_SLOT, _BUFFER, _SIZE, _MAX_SIZE) fxArrayBuffer(the, &_SLOT, _BUFFER, _SIZE, _MAX_SIZE)
|
|
77
|
+
#undef xsGetArrayBufferData
|
|
78
|
+
#define xsmcGetArrayBufferData(_SLOT,_OFFSET,_BUFFER,_SIZE) fxGetArrayBufferData(the, &_SLOT, _OFFSET, _BUFFER, _SIZE)
|
|
79
|
+
#undef xsSetArrayBufferData
|
|
80
|
+
#define xsmcSetArrayBufferData(_SLOT,_OFFSET,_BUFFER,_SIZE) fxSetArrayBufferData(the, &_SLOT, _OFFSET, _BUFFER, _SIZE)
|
|
81
|
+
#undef xsToArrayBuffer
|
|
82
|
+
#define xsmcToArrayBuffer(_SLOT) fxToArrayBuffer(the, &_SLOT)
|
|
83
|
+
#undef xsGetArrayBufferLength
|
|
84
|
+
#undef xsmcGetArrayBufferLength
|
|
85
|
+
#define xsmcGetArrayBufferLength(_SLOT) fxGetArrayBufferLength(the, &(_SLOT))
|
|
86
|
+
#undef xsGetArrayBufferMaxLength
|
|
87
|
+
#undef xsmcGetArrayBufferMaxLength
|
|
88
|
+
#define xsmcGetArrayBufferMaxLength(_SLOT) fxGetArrayBufferMaxLength(the, &(_SLOT))
|
|
89
|
+
#undef xsSetArrayBufferLength
|
|
90
|
+
#define xsmcSetArrayBufferLength(_SLOT,_LENGTH) fxSetArrayBufferLength(the, &_SLOT, _LENGTH)
|
|
91
|
+
|
|
92
|
+
mxImport void _xsNewArray(xsMachine*, xsSlot*, xsIntegerValue);
|
|
93
|
+
#define xsmcNewArray(_LENGTH) (_xsNewArray(the, &the->scratch, _LENGTH), the->scratch)
|
|
94
|
+
#define xsmcSetNewArray(_SLOT, _LENGTH) _xsNewArray(the, &_SLOT, _LENGTH)
|
|
95
|
+
|
|
96
|
+
mxImport void _xsNewObject(xsMachine*, xsSlot*);
|
|
97
|
+
#define xsmcNewObject() (_xsNewObject(the, &the->scratch), the->scratch)
|
|
98
|
+
#define xsmcSetNewObject(_SLOT) _xsNewObject(the, &_SLOT)
|
|
99
|
+
|
|
100
|
+
mxImport void _xsNewHostInstance(xsMachine *, xsSlot *, xsSlot *);
|
|
101
|
+
#define xsmcNewHostInstance(_PROTOTYPE) (_xsNewHostInstance(the, &the->scratch, &_PROTOTYPE), the->scratch)
|
|
102
|
+
#define xsmcSetNewHostInstance(_SLOT, _PROTOTYPE) _xsNewHostInstance(the, &_SLOT, &_PROTOTYPE)
|
|
103
|
+
|
|
104
|
+
#undef xsIsInstanceOf
|
|
105
|
+
mxImport xsBooleanValue _xsIsInstanceOf(xsMachine *, xsSlot *, xsSlot *);
|
|
106
|
+
#define xsmcIsInstanceOf(_SLOT,_PROTOTYPE) _xsIsInstanceOf(the, &_SLOT, &_PROTOTYPE)
|
|
107
|
+
|
|
108
|
+
#undef xsHas
|
|
109
|
+
#undef xsHasIndex
|
|
110
|
+
#undef xsGet
|
|
111
|
+
#undef xsGetAt
|
|
112
|
+
#undef xsGetIndex
|
|
113
|
+
#undef xsSet
|
|
114
|
+
#undef xsSetAt
|
|
115
|
+
#undef xsSetIndex
|
|
116
|
+
#undef xsDefine
|
|
117
|
+
#undef xsDelete
|
|
118
|
+
#undef xsDeleteAt
|
|
119
|
+
|
|
120
|
+
mxImport xsBooleanValue _xsHas(xsMachine *, xsSlot *, xsIdentifier);
|
|
121
|
+
#define xsmcHas(_THIS, _ID) _xsHas(the, &_THIS, _ID)
|
|
122
|
+
mxImport xsBooleanValue _xsHasIndex(xsMachine *, xsSlot *, xsIndex);
|
|
123
|
+
#define xsmcHasIndex(_THIS, _INDEX) _xsHasIndex(the, &_THIS, _INDEX)
|
|
124
|
+
|
|
125
|
+
mxImport void _xsGet(xsMachine *, xsSlot *, xsSlot *, xsIdentifier);
|
|
126
|
+
#define xsmcGet(_SLOT, _THIS, _ID) _xsGet(the, &_SLOT, &_THIS, _ID)
|
|
127
|
+
mxImport void _xsGetAt(xsMachine *, xsSlot *, xsSlot *, xsSlot *);
|
|
128
|
+
#define xsmcGetAt(_SLOT, _THIS, _AT) _xsGetAt(the, &_SLOT, &_THIS, &_AT)
|
|
129
|
+
mxImport void _xsGetIndex(xsMachine *, xsSlot *, xsSlot *, xsIndex);
|
|
130
|
+
#define xsmcGetIndex(_SLOT, _THIS, _INDEX) _xsGetIndex(the, &_SLOT, &_THIS, _INDEX)
|
|
131
|
+
|
|
132
|
+
mxImport void _xsSet(xsMachine *, xsSlot *, xsIdentifier, xsSlot *);
|
|
133
|
+
#define xsmcSet(_THIS, _ID, _SLOT) _xsSet(the, &_THIS, _ID, &_SLOT)
|
|
134
|
+
mxImport void _xsSetAt(xsMachine *, xsSlot *, xsSlot *, xsSlot *);
|
|
135
|
+
#define xsmcSetAt(_THIS, _AT, _SLOT) _xsSetAt(the, &_THIS, &_AT, &_SLOT)
|
|
136
|
+
mxImport void _xsSetIndex(xsMachine *, xsSlot *, xsIndex, xsSlot *);
|
|
137
|
+
#define xsmcSetIndex(_THIS, _INDEX, _SLOT) _xsSetIndex(the, &_THIS, _INDEX, &_SLOT)
|
|
138
|
+
|
|
139
|
+
mxImport void _xsDefine(xsMachine *, xsSlot *, xsIdentifier, xsSlot *, xsAttribute);
|
|
140
|
+
#define xsmcDefine(_THIS, _ID, _SLOT, _ATTRIBUTES) _xsDefine(the, &_THIS, _ID, &_SLOT, _ATTRIBUTES)
|
|
141
|
+
|
|
142
|
+
mxImport void _xsDelete(xsMachine *, xsSlot *, xsIdentifier);
|
|
143
|
+
#define xsmcDelete(_THIS, _ID) _xsDelete(the, &_THIS, _ID)
|
|
144
|
+
mxImport void _xsDeleteAt(xsMachine *, xsSlot *, xsSlot *);
|
|
145
|
+
#define xsmcDeleteAt(_THIS, _AT) _xsDeleteAt(the, &_THIS, &_AT)
|
|
146
|
+
|
|
147
|
+
mxImport void _xsCall(xsMachine *, xsSlot *, xsSlot *, xsUnsignedValue, ...);
|
|
148
|
+
#define xsmcCall(_RES, _THIS, _ID, ...) _xsCall(the, &_RES, &_THIS, _ID, __VA_ARGS__)
|
|
149
|
+
#define xsmcCall_noResult(_THIS, _ID, ...) _xsCall(the, NULL, &_THIS, _ID, __VA_ARGS__)
|
|
150
|
+
|
|
151
|
+
mxImport void _xsNew(xsMachine *, xsSlot *, xsSlot *, xsUnsignedValue, ...);
|
|
152
|
+
#define xsmcNew(_RES, _THIS, _ID, ...) _xsNew(the, &_RES, &_THIS, _ID, __VA_ARGS__)
|
|
153
|
+
|
|
154
|
+
mxImport xsBooleanValue _xsTest(xsMachine *, xsSlot *);
|
|
155
|
+
#undef xsTest
|
|
156
|
+
#define xsmcTest(_SLOT) _xsTest(the, &_SLOT)
|
|
157
|
+
|
|
158
|
+
#undef xsGetHostBufferLength
|
|
159
|
+
#undef xsPetrifyHostBuffer
|
|
160
|
+
#undef xsSetHostBuffer
|
|
161
|
+
#define xsmcGetHostBufferLength(_SLOT) fxGetHostBufferLength(the, &_SLOT)
|
|
162
|
+
#define xsmcPetrifyHostBuffer(_SLOT) fxPetrifyHostBuffer(the, &_SLOT)
|
|
163
|
+
#define xsmcSetHostBuffer(_SLOT, _DATA, _SIZE) fxSetHostBuffer(the, &_SLOT, _DATA, _SIZE)
|
|
164
|
+
|
|
165
|
+
#undef xsGetHostData
|
|
166
|
+
#undef xsSetHostData
|
|
167
|
+
#define xsmcGetHostData(_SLOT) fxGetHostData(the, &_SLOT)
|
|
168
|
+
#define xsmcSetHostData(_SLOT, _DATA) fxSetHostData(the, &_SLOT, _DATA)
|
|
169
|
+
|
|
170
|
+
#undef xsGetHostDataValidate
|
|
171
|
+
#define xsmcGetHostDataValidate(_SLOT, validator) fxGetHostDataValidate(the, &_SLOT, validator)
|
|
172
|
+
|
|
173
|
+
#undef xsGetHostChunk
|
|
174
|
+
#undef xsSetHostChunk
|
|
175
|
+
#define xsmcGetHostChunk(_SLOT) fxGetHostChunk(the, &_SLOT)
|
|
176
|
+
#define xsmcSetHostChunk(_SLOT, _DATA, _SIZE) fxSetHostChunk(the, &_SLOT, _DATA, _SIZE)
|
|
177
|
+
|
|
178
|
+
#undef xsGetHostChunkValidate
|
|
179
|
+
#define xsmcGetHostChunkValidate(_SLOT, validator) fxGetHostChunkValidate(the, &_SLOT, validator)
|
|
180
|
+
|
|
181
|
+
// note yet... #undef xsSetHostDestructor
|
|
182
|
+
#define xsmcSetHostDestructor(_SLOT,_DESTRUCTOR) fxSetHostDestructor(the, &_SLOT, _DESTRUCTOR)
|
|
183
|
+
|
|
184
|
+
#undef xsVars
|
|
185
|
+
mxImport xsIntegerValue fxIncrementalVars(xsMachine*, xsIntegerValue);
|
|
186
|
+
#define xsmcVars(_COUNT) fxIncrementalVars(the, _COUNT)
|
|
187
|
+
|
|
188
|
+
mxImport xsIntegerValue _xsArgc(xsMachine*);
|
|
189
|
+
#define xsmcArgc _xsArgc(the)
|
|
190
|
+
|
|
191
|
+
enum {
|
|
192
|
+
xsBufferNonrelocatable,
|
|
193
|
+
xsBufferRelocatable
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
mxImport xsIntegerValue _xsmcGetBuffer(xsMachine *the, xsSlot *slot, void **data, xsUnsignedValue *count, xsBooleanValue writable);
|
|
197
|
+
#define xsmcGetBuffer(_SLOT, data, count) _xsmcGetBuffer(the, &_SLOT, data, count, 0)
|
|
198
|
+
#define xsmcGetBufferReadable(_SLOT, data, count) _xsmcGetBuffer(the, &_SLOT, data, count, 0)
|
|
199
|
+
#define xsmcGetBufferWritable(_SLOT, data, count) _xsmcGetBuffer(the, &_SLOT, data, count, 1)
|
|
200
|
+
|
|
201
|
+
#ifdef __cplusplus
|
|
202
|
+
}
|
|
203
|
+
#endif
|
|
204
|
+
|
|
205
|
+
#endif /* __XSMC_H__ */
|
|
206
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (c) 2016-2017 Moddable Tech, Inc.
|
|
3
|
+
#
|
|
4
|
+
# This file is part of the Moddable SDK Tools.
|
|
5
|
+
#
|
|
6
|
+
# The Moddable SDK Tools is free software: you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
|
8
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
# (at your option) any later version.
|
|
10
|
+
#
|
|
11
|
+
# The Moddable SDK Tools is distributed in the hope that it will be useful,
|
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
# GNU General Public License for more details.
|
|
15
|
+
#
|
|
16
|
+
# You should have received a copy of the GNU General Public License
|
|
17
|
+
# along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
#
|
|
19
|
+
.NOTPARALLEL:
|
|
20
|
+
|
|
21
|
+
XS_DIR ?= $(MODDABLE)/xs
|
|
22
|
+
export XS_DIR
|
|
23
|
+
BUILD_DIR ?= $(MODDABLE)/build
|
|
24
|
+
export BUILD_DIR
|
|
25
|
+
|
|
26
|
+
all: debug release
|
|
27
|
+
|
|
28
|
+
debug:
|
|
29
|
+
make -f xst.mk
|
|
30
|
+
|
|
31
|
+
release:
|
|
32
|
+
make GOAL=release -f xst.mk
|
|
33
|
+
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (c) 2016-2020 Moddable Tech, Inc.
|
|
3
|
+
#
|
|
4
|
+
# This file is part of the Moddable SDK Tools.
|
|
5
|
+
#
|
|
6
|
+
# The Moddable SDK Tools is free software: you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
|
8
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
# (at your option) any later version.
|
|
10
|
+
#
|
|
11
|
+
# The Moddable SDK Tools is distributed in the hope that it will be useful,
|
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
# GNU General Public License for more details.
|
|
15
|
+
#
|
|
16
|
+
# You should have received a copy of the GNU General Public License
|
|
17
|
+
# along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
#
|
|
19
|
+
# This file incorporates work covered by the following copyright and
|
|
20
|
+
# permission notice:
|
|
21
|
+
#
|
|
22
|
+
# Copyright (C) 2010-2016 Marvell International Ltd.
|
|
23
|
+
# Copyright (C) 2002-2010 Kinoma, Inc.
|
|
24
|
+
#
|
|
25
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
26
|
+
# you may not use this file except in compliance with the License.
|
|
27
|
+
# You may obtain a copy of the License at
|
|
28
|
+
#
|
|
29
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
30
|
+
#
|
|
31
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
32
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
33
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
34
|
+
# See the License for the specific language governing permissions and
|
|
35
|
+
# limitations under the License.
|
|
36
|
+
#
|
|
37
|
+
|
|
38
|
+
% : %.c
|
|
39
|
+
%.o : %.c
|
|
40
|
+
|
|
41
|
+
GOAL ?= debug
|
|
42
|
+
NAME = xsc
|
|
43
|
+
ifneq ($(VERBOSE),1)
|
|
44
|
+
MAKEFLAGS += --silent
|
|
45
|
+
endif
|
|
46
|
+
|
|
47
|
+
XS_DIR ?= $(realpath ../..)
|
|
48
|
+
BUILD_DIR ?= $(realpath ../../../build)
|
|
49
|
+
|
|
50
|
+
BIN_DIR = $(BUILD_DIR)/bin/lin/$(GOAL)
|
|
51
|
+
INC_DIR = $(XS_DIR)/includes
|
|
52
|
+
PLT_DIR = $(XS_DIR)/platforms
|
|
53
|
+
SRC_DIR = $(XS_DIR)/sources
|
|
54
|
+
TLS_DIR = $(XS_DIR)/tools
|
|
55
|
+
TMP_DIR = $(BUILD_DIR)/tmp/lin/$(GOAL)/$(NAME)
|
|
56
|
+
|
|
57
|
+
C_OPTIONS =\
|
|
58
|
+
-fno-common\
|
|
59
|
+
-I$(INC_DIR)\
|
|
60
|
+
-I$(PLT_DIR) \
|
|
61
|
+
-I$(SRC_DIR)\
|
|
62
|
+
-I$(TLS_DIR)\
|
|
63
|
+
-I$(TMP_DIR)\
|
|
64
|
+
-DmxCompile=1\
|
|
65
|
+
-DmxParse=1
|
|
66
|
+
C_OPTIONS += \
|
|
67
|
+
-Wno-misleading-indentation \
|
|
68
|
+
-Wno-implicit-fallthrough
|
|
69
|
+
ifeq ($(GOAL),debug)
|
|
70
|
+
C_OPTIONS += -DmxDebug=1 -g -O0 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter
|
|
71
|
+
else
|
|
72
|
+
C_OPTIONS += -O3
|
|
73
|
+
endif
|
|
74
|
+
|
|
75
|
+
LIBRARIES = -lm -ldl -latomic -lpthread
|
|
76
|
+
|
|
77
|
+
LINK_OPTIONS = -rdynamic
|
|
78
|
+
|
|
79
|
+
OBJECTS = \
|
|
80
|
+
$(TMP_DIR)/xsBigInt.o \
|
|
81
|
+
$(TMP_DIR)/xsCode.o \
|
|
82
|
+
$(TMP_DIR)/xsCommon.o \
|
|
83
|
+
$(TMP_DIR)/xsdtoa.o \
|
|
84
|
+
$(TMP_DIR)/xsLexical.o \
|
|
85
|
+
$(TMP_DIR)/xsre.o \
|
|
86
|
+
$(TMP_DIR)/xsScope.o \
|
|
87
|
+
$(TMP_DIR)/xsScript.o \
|
|
88
|
+
$(TMP_DIR)/xsSourceMap.o \
|
|
89
|
+
$(TMP_DIR)/xsSyntaxical.o \
|
|
90
|
+
$(TMP_DIR)/xsTree.o \
|
|
91
|
+
$(TMP_DIR)/xsc.o
|
|
92
|
+
|
|
93
|
+
VPATH += $(SRC_DIR) $(TLS_DIR)
|
|
94
|
+
|
|
95
|
+
build: $(TMP_DIR) $(BIN_DIR) $(BIN_DIR)/$(NAME)
|
|
96
|
+
|
|
97
|
+
$(TMP_DIR):
|
|
98
|
+
mkdir -p $(TMP_DIR)
|
|
99
|
+
|
|
100
|
+
$(BIN_DIR):
|
|
101
|
+
mkdir -p $(BIN_DIR)
|
|
102
|
+
|
|
103
|
+
$(BIN_DIR)/$(NAME): $(OBJECTS)
|
|
104
|
+
@echo "#" $(NAME) $(GOAL) ": cc" $(@F)
|
|
105
|
+
$(CC) $(LINK_OPTIONS) $(OBJECTS) -o $@ $(LIBRARIES)
|
|
106
|
+
|
|
107
|
+
$(OBJECTS): $(PLT_DIR)/xsPlatform.h
|
|
108
|
+
$(OBJECTS): $(SRC_DIR)/xsCommon.h
|
|
109
|
+
$(OBJECTS): $(SRC_DIR)/xsScript.h
|
|
110
|
+
$(TMP_DIR)/%.o: %.c
|
|
111
|
+
@echo "#" $(NAME) $(GOAL) ": cc" $(<F)
|
|
112
|
+
$(CC) $< $(C_OPTIONS) -c -o $@
|
|
113
|
+
|
|
114
|
+
clean:
|
|
115
|
+
rm -rf $(BUILD_DIR)/bin/lin/debug/$(NAME)
|
|
116
|
+
rm -rf $(BUILD_DIR)/bin/lin/release/$(NAME)
|
|
117
|
+
rm -rf $(BUILD_DIR)/tmp/lin/debug/$(NAME)
|
|
118
|
+
rm -rf $(BUILD_DIR)/tmp/lin/release/$(NAME)
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (c) 2016-2020 Moddable Tech, Inc.
|
|
3
|
+
#
|
|
4
|
+
# This file is part of the Moddable SDK Tools.
|
|
5
|
+
#
|
|
6
|
+
# The Moddable SDK Tools is free software: you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
|
8
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
# (at your option) any later version.
|
|
10
|
+
#
|
|
11
|
+
# The Moddable SDK Tools is distributed in the hope that it will be useful,
|
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
# GNU General Public License for more details.
|
|
15
|
+
#
|
|
16
|
+
# You should have received a copy of the GNU General Public License
|
|
17
|
+
# along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
#
|
|
19
|
+
|
|
20
|
+
% : %.c
|
|
21
|
+
%.o : %.c
|
|
22
|
+
|
|
23
|
+
GOAL ?= debug
|
|
24
|
+
NAME = xsid
|
|
25
|
+
ifneq ($(VERBOSE),1)
|
|
26
|
+
MAKEFLAGS += --silent
|
|
27
|
+
endif
|
|
28
|
+
|
|
29
|
+
XS_DIR ?= $(realpath ../..)
|
|
30
|
+
BUILD_DIR ?= $(realpath ../../../build)
|
|
31
|
+
|
|
32
|
+
BIN_DIR = $(BUILD_DIR)/bin/lin/$(GOAL)
|
|
33
|
+
INC_DIR = $(XS_DIR)/includes
|
|
34
|
+
PLT_DIR = $(XS_DIR)/platforms
|
|
35
|
+
SRC_DIR = $(XS_DIR)/sources
|
|
36
|
+
TLS_DIR = $(XS_DIR)/tools
|
|
37
|
+
TMP_DIR = $(BUILD_DIR)/tmp/lin/$(GOAL)/$(NAME)
|
|
38
|
+
|
|
39
|
+
C_OPTIONS =\
|
|
40
|
+
-fno-common\
|
|
41
|
+
-I$(INC_DIR)\
|
|
42
|
+
-I$(PLT_DIR) \
|
|
43
|
+
-I$(SRC_DIR)\
|
|
44
|
+
-I$(TLS_DIR)\
|
|
45
|
+
-I$(TMP_DIR)\
|
|
46
|
+
-DmxCompile=1
|
|
47
|
+
C_OPTIONS += \
|
|
48
|
+
-Wno-misleading-indentation \
|
|
49
|
+
-Wno-implicit-fallthrough
|
|
50
|
+
ifeq ($(GOAL),debug)
|
|
51
|
+
C_OPTIONS += -DmxDebug=1 -g -O0 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter
|
|
52
|
+
else
|
|
53
|
+
C_OPTIONS += -O3
|
|
54
|
+
endif
|
|
55
|
+
|
|
56
|
+
LIBRARIES = -lm -ldl -latomic -lpthread
|
|
57
|
+
|
|
58
|
+
LINK_OPTIONS = -rdynamic
|
|
59
|
+
|
|
60
|
+
OBJECTS = \
|
|
61
|
+
$(TMP_DIR)/xsdtoa.o \
|
|
62
|
+
$(TMP_DIR)/xsre.o \
|
|
63
|
+
$(TMP_DIR)/xsCommon.o \
|
|
64
|
+
$(TMP_DIR)/xsid.o
|
|
65
|
+
|
|
66
|
+
VPATH += $(SRC_DIR) $(TLS_DIR)
|
|
67
|
+
|
|
68
|
+
build: $(TMP_DIR) $(BIN_DIR) $(BIN_DIR)/$(NAME)
|
|
69
|
+
|
|
70
|
+
$(TMP_DIR):
|
|
71
|
+
mkdir -p $(TMP_DIR)
|
|
72
|
+
|
|
73
|
+
$(BIN_DIR):
|
|
74
|
+
mkdir -p $(BIN_DIR)
|
|
75
|
+
|
|
76
|
+
$(BIN_DIR)/$(NAME): $(OBJECTS)
|
|
77
|
+
@echo "#" $(NAME) $(GOAL) ": cc" $(@F)
|
|
78
|
+
$(CC) $(LINK_OPTIONS) $(OBJECTS) -o $@ $(LIBRARIES)
|
|
79
|
+
|
|
80
|
+
$(OBJECTS): $(PLT_DIR)/xsPlatform.h
|
|
81
|
+
$(OBJECTS): $(SRC_DIR)/xsCommon.h
|
|
82
|
+
$(TMP_DIR)/%.o: %.c
|
|
83
|
+
@echo "#" $(NAME) $(GOAL) ": cc" $(<F)
|
|
84
|
+
$(CC) $< $(C_OPTIONS) -c -o $@
|
|
85
|
+
|
|
86
|
+
clean:
|
|
87
|
+
rm -rf $(BUILD_DIR)/bin/lin/debug/$(NAME)
|
|
88
|
+
rm -rf $(BUILD_DIR)/bin/lin/release/$(NAME)
|
|
89
|
+
rm -rf $(BUILD_DIR)/tmp/lin/debug/$(NAME)
|
|
90
|
+
rm -rf $(BUILD_DIR)/tmp/lin/release/$(NAME)
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (c) 2016-2020 Moddable Tech, Inc.
|
|
3
|
+
#
|
|
4
|
+
# This file is part of the Moddable SDK Tools.
|
|
5
|
+
#
|
|
6
|
+
# The Moddable SDK Tools is free software: you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the GNU General Public License as published by
|
|
8
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
# (at your option) any later version.
|
|
10
|
+
#
|
|
11
|
+
# The Moddable SDK Tools is distributed in the hope that it will be useful,
|
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
# GNU General Public License for more details.
|
|
15
|
+
#
|
|
16
|
+
# You should have received a copy of the GNU General Public License
|
|
17
|
+
# along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
#
|
|
19
|
+
# This file incorporates work covered by the following copyright and
|
|
20
|
+
# permission notice:
|
|
21
|
+
#
|
|
22
|
+
# Copyright (C) 2010-2016 Marvell International Ltd.
|
|
23
|
+
# Copyright (C) 2002-2010 Kinoma, Inc.
|
|
24
|
+
#
|
|
25
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
26
|
+
# you may not use this file except in compliance with the License.
|
|
27
|
+
# You may obtain a copy of the License at
|
|
28
|
+
#
|
|
29
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
30
|
+
#
|
|
31
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
32
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
33
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
34
|
+
# See the License for the specific language governing permissions and
|
|
35
|
+
# limitations under the License.
|
|
36
|
+
#
|
|
37
|
+
|
|
38
|
+
% : %.c
|
|
39
|
+
%.o : %.c
|
|
40
|
+
|
|
41
|
+
GOAL ?= debug
|
|
42
|
+
NAME = xsl
|
|
43
|
+
ifneq ($(VERBOSE),1)
|
|
44
|
+
MAKEFLAGS += --silent
|
|
45
|
+
endif
|
|
46
|
+
|
|
47
|
+
XS_DIR ?= $(realpath ../..)
|
|
48
|
+
BUILD_DIR ?= $(realpath ../../../build)
|
|
49
|
+
|
|
50
|
+
XSC = $(BUILD_DIR)/bin/lin/$(GOAL)/xsc
|
|
51
|
+
|
|
52
|
+
BIN_DIR = $(BUILD_DIR)/bin/lin/$(GOAL)
|
|
53
|
+
INC_DIR = $(XS_DIR)/includes
|
|
54
|
+
PLT_DIR = $(XS_DIR)/platforms
|
|
55
|
+
SRC_DIR = $(XS_DIR)/sources
|
|
56
|
+
TLS_DIR = $(XS_DIR)/tools
|
|
57
|
+
TMP_DIR = $(BUILD_DIR)/tmp/lin/$(GOAL)/$(NAME)
|
|
58
|
+
|
|
59
|
+
C_OPTIONS =\
|
|
60
|
+
-DINCLUDE_XSPLATFORM \
|
|
61
|
+
-DXSPLATFORM=\"xslOpt.h\" \
|
|
62
|
+
-fno-common\
|
|
63
|
+
-I$(INC_DIR)\
|
|
64
|
+
-I$(PLT_DIR) \
|
|
65
|
+
-I$(SRC_DIR)\
|
|
66
|
+
-I$(TLS_DIR)\
|
|
67
|
+
-I$(TMP_DIR)\
|
|
68
|
+
-DmxLink=1\
|
|
69
|
+
-DmxRun=1
|
|
70
|
+
C_OPTIONS +=\
|
|
71
|
+
-DmxNoFunctionLength=1\
|
|
72
|
+
-DmxNoFunctionName=1\
|
|
73
|
+
-DmxHostFunctionPrimitive=1\
|
|
74
|
+
-DmxFewGlobalsTable=1
|
|
75
|
+
C_OPTIONS += \
|
|
76
|
+
-Wno-misleading-indentation \
|
|
77
|
+
-Wno-implicit-fallthrough
|
|
78
|
+
ifeq ($(GOAL),debug)
|
|
79
|
+
C_OPTIONS += -DmxDebug=1 -g -O0 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter
|
|
80
|
+
else
|
|
81
|
+
C_OPTIONS += -O3
|
|
82
|
+
endif
|
|
83
|
+
|
|
84
|
+
LIBRARIES = -ldl -lm -latomic -lpthread
|
|
85
|
+
|
|
86
|
+
LINK_OPTIONS = -rdynamic
|
|
87
|
+
|
|
88
|
+
OBJECTS = \
|
|
89
|
+
$(TMP_DIR)/xsAll.o \
|
|
90
|
+
$(TMP_DIR)/xsAPI.o \
|
|
91
|
+
$(TMP_DIR)/xsArguments.o \
|
|
92
|
+
$(TMP_DIR)/xsArray.o \
|
|
93
|
+
$(TMP_DIR)/xsAtomics.o \
|
|
94
|
+
$(TMP_DIR)/xsBigInt.o \
|
|
95
|
+
$(TMP_DIR)/xsBoolean.o \
|
|
96
|
+
$(TMP_DIR)/xsCode.o \
|
|
97
|
+
$(TMP_DIR)/xsCommon.o \
|
|
98
|
+
$(TMP_DIR)/xsDataView.o \
|
|
99
|
+
$(TMP_DIR)/xsDate.o \
|
|
100
|
+
$(TMP_DIR)/xsDebug.o \
|
|
101
|
+
$(TMP_DIR)/xsDefaults.o \
|
|
102
|
+
$(TMP_DIR)/xsError.o \
|
|
103
|
+
$(TMP_DIR)/xsFunction.o \
|
|
104
|
+
$(TMP_DIR)/xsGenerator.o \
|
|
105
|
+
$(TMP_DIR)/xsGlobal.o \
|
|
106
|
+
$(TMP_DIR)/xsJSON.o \
|
|
107
|
+
$(TMP_DIR)/xsLexical.o \
|
|
108
|
+
$(TMP_DIR)/xsMapSet.o \
|
|
109
|
+
$(TMP_DIR)/xsMarshall.o \
|
|
110
|
+
$(TMP_DIR)/xsMath.o \
|
|
111
|
+
$(TMP_DIR)/xsMemory.o \
|
|
112
|
+
$(TMP_DIR)/xsModule.o \
|
|
113
|
+
$(TMP_DIR)/xsNumber.o \
|
|
114
|
+
$(TMP_DIR)/xsObject.o \
|
|
115
|
+
$(TMP_DIR)/xsPlatforms.o \
|
|
116
|
+
$(TMP_DIR)/xsPromise.o \
|
|
117
|
+
$(TMP_DIR)/xsProperty.o \
|
|
118
|
+
$(TMP_DIR)/xsProxy.o \
|
|
119
|
+
$(TMP_DIR)/xsRegExp.o \
|
|
120
|
+
$(TMP_DIR)/xsRun.o \
|
|
121
|
+
$(TMP_DIR)/xsScope.o \
|
|
122
|
+
$(TMP_DIR)/xsScript.o \
|
|
123
|
+
$(TMP_DIR)/xsSourceMap.o \
|
|
124
|
+
$(TMP_DIR)/xsString.o \
|
|
125
|
+
$(TMP_DIR)/xsSymbol.o \
|
|
126
|
+
$(TMP_DIR)/xsSyntaxical.o \
|
|
127
|
+
$(TMP_DIR)/xsTree.o \
|
|
128
|
+
$(TMP_DIR)/xsType.o \
|
|
129
|
+
$(TMP_DIR)/xsdtoa.o \
|
|
130
|
+
$(TMP_DIR)/xsre.o \
|
|
131
|
+
$(TMP_DIR)/xslBase.o \
|
|
132
|
+
$(TMP_DIR)/xslOpt.o \
|
|
133
|
+
$(TMP_DIR)/xslSlot.o \
|
|
134
|
+
$(TMP_DIR)/xslStrip.o \
|
|
135
|
+
$(TMP_DIR)/xsl.o
|
|
136
|
+
|
|
137
|
+
VPATH += $(SRC_DIR) $(TLS_DIR)
|
|
138
|
+
|
|
139
|
+
build: $(TMP_DIR) $(BIN_DIR) $(BIN_DIR)/$(NAME)
|
|
140
|
+
|
|
141
|
+
$(TMP_DIR):
|
|
142
|
+
mkdir -p $(TMP_DIR)
|
|
143
|
+
|
|
144
|
+
$(BIN_DIR):
|
|
145
|
+
mkdir -p $(BIN_DIR)
|
|
146
|
+
|
|
147
|
+
$(BIN_DIR)/$(NAME): $(OBJECTS)
|
|
148
|
+
@echo "#" $(NAME) $(GOAL) ": cc" $(@F)
|
|
149
|
+
$(CC) $(LINK_OPTIONS) $(OBJECTS) $(LIBRARIES) -o $@
|
|
150
|
+
|
|
151
|
+
$(OBJECTS): $(PLT_DIR)/xsPlatform.h
|
|
152
|
+
$(OBJECTS): $(SRC_DIR)/xsCommon.h
|
|
153
|
+
$(OBJECTS): $(SRC_DIR)/xsAll.h
|
|
154
|
+
$(OBJECTS): $(TLS_DIR)/xsl.h
|
|
155
|
+
$(OBJECTS): $(TLS_DIR)/xslOpt.h
|
|
156
|
+
|
|
157
|
+
$(TMP_DIR)/%.o: %.c
|
|
158
|
+
@echo "#" $(NAME) $(GOAL) ": cc" $(<F)
|
|
159
|
+
$(CC) $< $(C_OPTIONS) -c -o $@
|
|
160
|
+
|
|
161
|
+
clean:
|
|
162
|
+
rm -rf $(BUILD_DIR)/bin/lin/debug/$(NAME)
|
|
163
|
+
rm -rf $(BUILD_DIR)/bin/lin/release/$(NAME)
|
|
164
|
+
rm -rf $(BUILD_DIR)/tmp/lin/debug/$(NAME)
|
|
165
|
+
rm -rf $(BUILD_DIR)/tmp/lin/release/$(NAME)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|