blob: 9401e00592bec5b890d5f617d3cd2aef22e8b2f6 (
plain)
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
|
cmake_minimum_required(VERSION 2.8.12.2)
project(CoreClrPal)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Include directories
include_directories(include)
# Compile options
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
add_definitions(-D_TARGET_MAC64)
set(PLATFORM_SOURCES
arch/i386/context.clang.s
arch/i386/dispatchexceptionwrapper.S
exception/machexception.cpp
exception/machmessage.cpp
locale/locale.cpp
)
endif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
add_definitions(-D__LINUX__=1)
endif(CMAKE_SYSTEM_NAME STREQUAL Linux)
add_definitions(-DPLATFORM_UNIX=1)
add_definitions(-DLP64COMPATIBLE=1)
add_definitions(-DFEATURE_PAL=1)
add_definitions(-DCORECLR=1)
add_definitions(-DPIC=1)
add_definitions(-DBIT64=1)
add_definitions(-D_WIN64=1)
add_compile_options(-fno-builtin)
add_compile_options(-fPIC)
set(SOURCES
arch/i386/context.cpp
arch/i386/processor.cpp
cruntime/file.cpp
cruntime/filecrt.cpp
cruntime/finite.cpp
cruntime/lstr.cpp
cruntime/malloc.cpp
cruntime/mbstring.cpp
cruntime/misc.cpp
cruntime/misctls.cpp
cruntime/path.cpp
cruntime/printf.cpp
cruntime/printfcpp.cpp
cruntime/silent_printf.cpp
cruntime/string.cpp
cruntime/stringtls.cpp
cruntime/thread.cpp
cruntime/wchar.cpp
cruntime/wchartls.cpp
debug/debug.cpp
exception/console.cpp
exception/seh.cpp
exception/signal.cpp
file/directory.cpp
file/disk.cpp
file/file.cpp
file/filetime.cpp
file/find.cpp
file/path.cpp
file/shmfilelockmgr.cpp
handlemgr/handleapi.cpp
handlemgr/handlemgr.cpp
init/pal.cpp
init/sxs.cpp
loader/module.cpp
loader/modulename.cpp
locale/unicode.cpp
locale/unicode_data.cpp
locale/utf8.cpp
map/common.cpp
map/map.cpp
map/virtual.cpp
memory/heap.cpp
memory/local.cpp
misc/dbgmsg.cpp
misc/environ.cpp
misc/error.cpp
misc/fmtmessage.cpp
misc/interlock.cpp
misc/miscpalapi.cpp
misc/strutil.cpp
misc/sysinfo.cpp
misc/time.cpp
misc/utils.cpp
misc/version.cpp
objmgr/palobjbase.cpp
objmgr/shmobject.cpp
objmgr/shmobjectmanager.cpp
safecrt/makepath_s.c
safecrt/memcpy_s.c
safecrt/memmove_s.c
safecrt/mbusafecrt.c
safecrt/safecrt_input_s.c
safecrt/safecrt_output_l.c
safecrt/safecrt_output_s.c
safecrt/safecrt_winput_s.c
safecrt/safecrt_woutput_s.c
safecrt/splitpath_s.c
safecrt/sprintf.c
safecrt/sscanf.c
safecrt/strcat_s.c
safecrt/strcpy_s.c
safecrt/strlen_s.c
safecrt/strncat_s.c
safecrt/strncpy_s.c
safecrt/strtok_s.c
safecrt/swprintf.c
safecrt/vsprintf.c
safecrt/vswprint.c
safecrt/wcscat_s.c
safecrt/wcscpy_s.c
safecrt/wcslen_s.c
safecrt/wcsncat_s.c
safecrt/wcsncpy_s.c
safecrt/wcstok_s.c
safecrt/wmakepath_s.c
safecrt/wsplitpath_s.c
safecrt/xtoa_s.c
safecrt/xtow_s.c
shmemory/shmemory.cpp
sync/cs.cpp
synchobj/event.cpp
synchobj/semaphore.cpp
synchobj/mutex.cpp
synchmgr/synchcontrollers.cpp
synchmgr/synchmanager.cpp
synchmgr/wait.cpp
thread/process.cpp
thread/thread.cpp
thread/threadsusp.cpp
thread/tls.cpp
)
add_library(CoreClrPal
STATIC
${SOURCES}
${PLATFORM_SOURCES}
)
target_link_libraries(CoreClrPal
dl
m
)
if(CMAKE_SYSTEM_NAME STREQUAL Linux)
target_link_libraries(CoreClrPal
pthread
rt
)
endif(CMAKE_SYSTEM_NAME STREQUAL Linux)
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
find_library(COREFOUNDATION CoreFoundation)
find_library(CORESERVICES CoreServices)
find_library(SECURITY Security)
target_link_libraries(CoreClrPal
${COREFOUNDATION}
${CORESERVICES}
${SECURITY}
)
endif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
add_subdirectory(examples)
|