-
Notifications
You must be signed in to change notification settings - Fork 34
/
magpie.gyp
120 lines (119 loc) · 3.37 KB
/
magpie.gyp
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
# This is used by GYP to generate platform-specific project files for building
# Magpie. (I.e. on a Mac it will create an XCode project, on Linux a makefile.)
# See README for more.
{
'target_defaults': {
'dependencies': [
'dep/libuv/uv.gyp:libuv'
],
'defines': [
'PLATFORM="<(OS)"',
],
'include_dirs': [
'dep/libuv/include',
'src',
],
'sources': [
'src/magpie.1',
'src/Common.h',
'src/Data/Array.h',
'src/Data/FixedQueue.h',
'src/Data/String.cpp',
'src/Data/String.h',
'src/Data/Queue.h',
'src/Data/Stack.h',
'src/Compiler/Bytecode.h',
'src/Compiler/Compiler.cpp',
'src/Compiler/Compiler.h',
'src/Compiler/ExprCompiler.cpp',
'src/Compiler/ExprCompiler.h',
'src/Compiler/Resolver.cpp',
'src/Compiler/Resolver.h',
'src/Memory/ForwardingAddress.h',
'src/Memory/Managed.cpp',
'src/Memory/Managed.h',
'src/Memory/Memory.cpp',
'src/Memory/Memory.h',
'src/Memory/RootSource.h',
'src/Memory/Semispace.cpp',
'src/Memory/Semispace.h',
'src/Native/Core.h',
'src/Native/Core.cpp',
'src/Native/IO.h',
'src/Native/IO.cpp',
'src/Native/Net.h',
'src/Native/Net.cpp',
'src/Platform/Environment.h',
'src/Platform/Environment.cpp',
'src/Platform/Environment_linux.cpp',
'src/Platform/Environment_mac.cpp',
'src/Platform/Environment_win.cpp',
'src/Platform/Path.h',
'src/Platform/Path.cpp',
'src/Platform/Path_posix.cpp',
'src/Platform/Path_win.cpp',
'src/Syntax/Ast.cpp',
'src/Syntax/Ast.generated.h',
'src/Syntax/Ast.h',
'src/Syntax/ErrorReporter.cpp',
'src/Syntax/ErrorReporter.h',
'src/Syntax/Lexer.cpp',
'src/Syntax/Lexer.h',
'src/Syntax/Parser.cpp',
'src/Syntax/Parser.h',
'src/Syntax/Token.cpp',
'src/Syntax/Token.h',
'src/VM/Fiber.cpp',
'src/VM/Fiber.h',
'src/VM/Method.cpp',
'src/VM/Method.h',
'src/VM/Module.cpp',
'src/VM/Module.h',
'src/VM/Object.cpp',
'src/VM/Object.h',
'src/VM/Scheduler.cpp',
'src/VM/Scheduler.h',
'src/VM/VM.cpp',
'src/VM/VM.h',
],
'conditions': [
['OS!="linux"', {'sources/': [['exclude', '_linux\\.(cpp|h)$']]}],
['OS!="mac"', {'sources/': [['exclude', '_mac\\.(cpp|h)$']]}],
['OS!="win"', {'sources/': [['exclude', '_win\\.(cpp|h)$']]}],
['OS=="win"', {'sources/': [['exclude', '_posix\\.(cpp|h)$']]}],
],
},
'targets': [
{
'target_name': 'magpie',
'type': 'executable',
'sources': [
'src/main.cpp',
],
},
{
'target_name': 'unit_tests',
'type': 'executable',
'defines': [ 'UNIT_TEST' ],
'sources': [
'src/Test/ArrayTests.cpp',
'src/Test/ArrayTests.h',
'src/Test/FixedQueueTests.cpp',
'src/Test/FixedQueueTests.h',
'src/Test/LexerTests.cpp',
'src/Test/LexerTests.h',
'src/Test/MemoryTests.cpp',
'src/Test/MemoryTests.h',
'src/Test/ParserTests.cpp',
'src/Test/ParserTests.h',
'src/Test/StringTests.cpp',
'src/Test/StringTests.h',
'src/Test/Test.cpp',
'src/Test/Test.h',
'src/Test/TestMain.cpp',
'src/Test/TokenTests.cpp',
'src/Test/TokenTests.h',
],
},
],
}