-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rybfile
90 lines (74 loc) · 3.45 KB
/
Rybfile
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
project :sqlite3, pretty: 'SQLite3' do |proj|
# Supress all of Visual Studio's bullshit.
# TODO(mtwilliams): Refactor into Ryb.
proj.define '_HAS_EXCEPTIONS' => false,
'_SCL_SECURE_NO_WARNINGS' => true,
'_CRT_SECURE_NO_WARNINGS' => true,
'_CRT_SECURE_NO_DEPRECATE' => true,
'_SECURE_SCL_THROWS' => false,
'_SILENCE_DEPRECATION_OF_SECURE_SCL_THROWS' => true,
# See http://stackoverflow.com/questions/14363929
'_USING_V110_SDK71_' => true
# Suffix builds in the form: _{configuration}_{platform}_{32,64}.
# e.g. libsqlite3_debug_macosx_64 or sqlite3_windows_32.lib
proj.architecture :x86 do |arch| arch.suffix = '_32'; end
proj.architecture :x86_64 do |arch| arch.suffix = '_64'; end
proj.platform :windows do |platform| platform.suffix = '_windows'; end
proj.platform :macosx do |platform| platform.suffix = '_macosx'; end
proj.platform :linux do |platform| platform.suffix = '_linux'; end
proj.configuration :debug do |config| config.suffix = '_debug'; end
proj.configuration :development do |config| config.suffix = '_development'; end
proj.configuration :release do |config| config.suffix = '_release'; end
# # We target Windows 7 and later.
# proj.platform :windows do |platform| platform.sdk = '7.1'; end
# # We target Lion and later.
# proj.platform :macosx do |platform| platform.version = '10.7'; end
# # TODO(mtwilliams): Determine the minimum kernel we'll support.
# proj.platform :linux do |platform| end
proj.configuration :debug, pretty: 'Debug' do |config|
config.define '_DEBUG' => true,
'_HAS_ITERATOR_DEBUGGING' => true,
'_SECURE_SCL' => true
config.generate_debug_symbols = true
config.link_time_code_generation = false
config.optimize = :nothing
end
proj.configuration :development, pretty: 'Development' do |config|
config.define 'NDEBUG' => true,
'_HAS_ITERATOR_DEBUGGING' => false,
'_SECURE_SCL' => false
config.generate_debug_symbols = true
config.link_time_code_generation = false
config.optimize = :speed
end
proj.configuration :release, pretty: 'Release' do |config|
config.define 'NDEBUG' => true,
'_HAS_ITERATOR_DEBUGGING' => false,
'_SECURE_SCL' => false
config.generate_debug_symbols = true
config.link_time_code_generation = true
config.optimize = :speed
end
proj.library :sqlite3, pretty: 'SQLite3' do |lib|
# TODO(mtwilliams): Build SQLite3 as a shared library.
lib.linkage = :static
lib.author = 'D. Richard Hipp'
lib.description = 'SQLite is an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.'
lib.license = 'Public domain.'
lib.add_include_paths 'include/'
lib.add_library_paths '$build/lib/', '$build/bin/'
lib.add_binary_paths '$build/bin/'
lib.add_source_files 'include/sqlite3.h', 'include/sqlite3ext.h'
lib.add_source_files 'src/sqlite3.c'
end
proj.application :shell, pretty: 'Shell' do |app|
app.author = 'D. Richard Hipp'
app.description = 'Command line utility for accessing SQLite3 databases.'
app.license = 'Public domain.'
app.add_include_paths 'include/'
app.add_library_paths '$build/lib/', '$build/bin/'
app.add_binary_paths '$build/bin/'
app.add_source_files 'src/shell.c'
app.add_dependency :sqlite3
end
end