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
|
# prefix
include $(PRO_DIR)/prefix.mak
# module name
NAMES = xmake
# module type
xmake_TYPE = LIB
# config
xmake_CONFIG = y
# core files
xmake_C_FILES += \
xmake \
engine \
os/argv \
os/args \
os/find \
os/link \
os/isdir \
os/rmdir \
os/mkdir \
os/cpdir \
os/chdir \
os/mtime \
os/sleep \
os/mclock \
os/curdir \
os/tmpdir \
os/isfile \
os/islink \
os/rmfile \
os/cpfile \
os/rename \
os/exists \
os/setenv \
os/getenv \
os/getenvs \
os/cpuinfo \
os/readlink \
os/emptydir \
os/syserror \
os/strerror \
os/filesize \
os/getwinsize \
os/uid \
os/gid \
os/getown \
io/stdfile \
io/file_size \
io/file_close \
io/file_flush \
io/file_isatty \
io/file_open \
io/file_read \
io/file_seek \
io/file_write \
io/file_rawfd \
io/filelock_open \
io/filelock_lock \
io/filelock_unlock \
io/filelock_trylock \
io/filelock_close \
io/poller \
io/poller_wait \
io/poller_insert \
io/poller_remove \
io/poller_modify \
io/poller_spank \
io/poller_support \
io/socket_open \
io/socket_rawfd \
io/socket_wait \
io/socket_bind \
io/socket_listen \
io/socket_accept \
io/socket_connect \
io/socket_send \
io/socket_sendto \
io/socket_sendfile \
io/socket_recv \
io/socket_recvfrom \
io/socket_close \
io/pipe_open \
io/pipe_openpair \
io/pipe_close \
io/pipe_read \
io/pipe_write \
io/pipe_wait \
io/pipe_connect \
path/relative \
path/absolute \
path/translate \
path/is_absolute \
hash/uuid4 \
hash/sha256 \
string/trim \
string/split \
string/lastof \
string/convert \
string/endswith \
string/startswith \
process/open \
process/openv \
process/wait \
process/kill \
process/close \
sandbox/interactive \
semver/parse \
semver/compare \
semver/satisfies \
semver/select \
semver/semver \
readline/readline \
readline/history_list \
readline/add_history \
readline/clear_history \
libc/malloc \
libc/free \
libc/memset \
libc/memcpy \
libc/dataptr \
libc/byteof \
libc/setbyte \
libc/strndup
iswin =
ifeq ($(PLAT),windows)
iswin = yes
endif
ifeq ($(PLAT),msys)
iswin = yes
endif
ifeq ($(PLAT),mingw)
iswin = yes
endif
ifeq ($(PLAT),cygwin)
iswin = yes
endif
ifdef iswin
xmake_C_FILES += \
winos/ansi \
winos/logical_drives \
winos/registry_keys \
winos/registry_values \
winos/registry_query \
winos/short_path
endif
# flags
xmake_CXFLAGS += -D__tb_prefix__=\"xmake\"
xmake_CXFLAGS += $(if $(findstring readline,$(base_LIBNAMES)),-DXM_CONFIG_API_HAVE_READLINE,)
xmake_CXFLAGS += $(if $(findstring curses,$(base_LIBNAMES)),-DXM_CONFIG_API_HAVE_CURSES,)
# includes
xmake_INC_DIRS += \
../tbox/tbox/src \
../tbox/inc/$(PLAT) \
../sv/sv/include
ifeq ($(RUNTIME),luajit)
xmake_INC_DIRS += ../luajit/luajit/src
xmake_CXFLAGS += -DUSE_LUAJIT
endif
ifeq ($(RUNTIME),lua)
xmake_INC_DIRS += ../lua/lua
xmake_CXFLAGS += -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_3
endif
xmake_CXFLAGS += -DXM_CONFIG_VERSION_BRANCH="\"$(BRANCH)\""
xmake_CXFLAGS += -DXM_CONFIG_VERSION_COMMIT="\"$(COMMIT)\""
# suffix
include $(PRO_DIR)/suffix.mak
|