source: mainline/uspace/lib/c/meson.build@ 7727cfd

serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 7727cfd was de19d4a, checked in by Jiri Svoboda <jiri@…>, 5 years ago

Clean up vestiges of visualizer interface

  • Property mode set to 100644
File size: 6.4 KB
Line 
1#
2# Copyright (c) 2005 Martin Decky
3# Copyright (c) 2007 Jakub Jermar
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions
8# are met:
9#
10# - Redistributions of source code must retain the above copyright
11# notice, this list of conditions and the following disclaimer.
12# - Redistributions in binary form must reproduce the above copyright
13# notice, this list of conditions and the following disclaimer in the
14# documentation and/or other materials provided with the distribution.
15# - The name of the author may not be used to endorse or promote products
16# derived from this software without specific prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28#
29
30# libarch
31arch_src = []
32subdir('arch' / UARCH)
33
34c_args = [ '-fno-builtin', '-D_LIBC_SOURCE' ]
35
36root_path = '..' / '..' / '..'
37
38incdirs = [
39 'include',
40 'arch' / UARCH / 'include',
41 root_path / 'abi' / 'arch' / UARCH / 'include',
42 root_path / 'abi' / 'include',
43]
44
45includes += include_directories(incdirs, is_system: true)
46
47allow_shared = true
48
49# FIXME: symlinks from uspace to kernel will break in future Meson version
50# we should instead move the duplicated library parts into a shared location.
51
52uspace_lib_devel_install_script_text += 'mkdir -p "${DESTDIR}include/libc"'
53foreach idir : incdirs
54 _sdir = meson.current_source_dir() / idir
55 uspace_lib_devel_install_script_text += 'cp -R -L -T "@0@" "${DESTDIR}include/libc"'.format(_sdir)
56endforeach
57
58src = [ arch_src ]
59
60src += files(
61 'generic/libc.c',
62 'generic/ddi.c',
63 'generic/as.c',
64 'generic/bd.c',
65 'generic/bd_srv.c',
66 'generic/perm.c',
67 'generic/capa.c',
68 'generic/clipboard.c',
69 'generic/config.c',
70 'generic/context.c',
71 'generic/corecfg.c',
72 'generic/ctype.c',
73 'generic/devman.c',
74 'generic/device/hw_res.c',
75 'generic/device/hw_res_parsed.c',
76 'generic/device/pio_window.c',
77 'generic/device/clock_dev.c',
78 'generic/device/led_dev.c',
79 'generic/dirent.c',
80 'generic/dhcp.c',
81 'generic/dnsr.c',
82 'generic/dlfcn.c',
83 'generic/elf/elf.c',
84 'generic/elf/elf_load.c',
85 'generic/elf/elf_mod.c',
86 'generic/event.c',
87 'generic/errno.c',
88 'generic/gsort.c',
89 'generic/inttypes.c',
90 'generic/ipc_test.c',
91 'generic/loc.c',
92 'generic/mem.c',
93 'generic/str.c',
94 'generic/string.c',
95 'generic/str_error.c',
96 'generic/strtol.c',
97 'generic/l18n/langs.c',
98 'generic/pcb.c',
99 'generic/smc.c',
100 'generic/task.c',
101 'generic/imath.c',
102 'generic/inet/addr.c',
103 'generic/inet/endpoint.c',
104 'generic/inet/host.c',
105 'generic/inet/hostname.c',
106 'generic/inet/hostport.c',
107 'generic/inet/tcp.c',
108 'generic/inet/udp.c',
109 'generic/inet.c',
110 'generic/inetcfg.c',
111 'generic/inetping.c',
112 'generic/io/asprintf.c',
113 'generic/io/input.c',
114 'generic/io/io.c',
115 'generic/io/chardev.c',
116 'generic/io/chardev_srv.c',
117 'generic/io/chargrid.c',
118 'generic/io/output.c',
119 'generic/io/printf.c',
120 'generic/io/log.c',
121 'generic/io/logctl.c',
122 'generic/io/label.c',
123 'generic/io/kio.c',
124 'generic/io/klog.c',
125 'generic/io/serial.c',
126 'generic/io/snprintf.c',
127 'generic/io/vprintf.c',
128 'generic/io/vsnprintf.c',
129 'generic/io/printf_core.c',
130 'generic/io/con_srv.c',
131 'generic/io/console.c',
132 'generic/io/table.c',
133 'generic/iplink.c',
134 'generic/iplink_srv.c',
135 'generic/irc.c',
136 'generic/irq.c',
137 'generic/ieee_double.c',
138 'generic/power_of_ten.c',
139 'generic/double_to_str.c',
140 'generic/malloc.c',
141 'generic/rndgen.c',
142 'generic/stdio/scanf.c',
143 'generic/stdio/sprintf.c',
144 'generic/stdio/sscanf.c',
145 'generic/stdio/sstream.c',
146 'generic/stdio/vsprintf.c',
147 'generic/thread/fibril.c',
148 'generic/thread/fibril_synch.c',
149 'generic/thread/thread.c',
150 'generic/thread/tls.c',
151 'generic/thread/futex.c',
152 'generic/thread/mpsc.c',
153 'generic/sysinfo.c',
154 'generic/ipc.c',
155 'generic/ns.c',
156 'generic/async/client.c',
157 'generic/async/server.c',
158 'generic/async/ports.c',
159 'generic/loader.c',
160 'generic/getopt.c',
161 'generic/adt/checksum.c',
162 'generic/adt/circ_buf.c',
163 'generic/adt/list.c',
164 'generic/adt/hash_table.c',
165 'generic/adt/odict.c',
166 'generic/adt/prodcons.c',
167 'generic/time.c',
168 'generic/tmpfile.c',
169 'generic/stdio.c',
170 'generic/stdlib.c',
171 'generic/udebug.c',
172 'generic/vfs/canonify.c',
173 'generic/vfs/inbox.c',
174 'generic/vfs/mtab.c',
175 'generic/vfs/vfs.c',
176 'generic/setjmp.c',
177 'generic/stack.c',
178 'generic/stacktrace.c',
179 'generic/arg_parse.c',
180 'generic/stats.c',
181 'generic/assert.c',
182 'generic/bsearch.c',
183 'generic/pci.c',
184 'generic/pio_trace.c',
185 'generic/qsort.c',
186 'generic/ubsan.c',
187 'generic/uuid.c',
188 'generic/vbd.c',
189 'generic/vol.c',
190)
191
192if CONFIG_RTLD
193 src += files(
194 'generic/rtld/rtld.c',
195 'generic/rtld/dynamic.c',
196 'generic/rtld/module.c',
197 'generic/rtld/symbol.c',
198 )
199endif
200
201test_src = files(
202 'test/adt/circ_buf.c',
203 'test/adt/odict.c',
204 'test/capa.c',
205 'test/casting.c',
206 'test/double_to_str.c',
207 'test/fibril/timer.c',
208 'test/getopt.c',
209 'test/gsort.c',
210 'test/ieee_double.c',
211 'test/imath.c',
212 'test/inttypes.c',
213 'test/io/table.c',
214 'test/main.c',
215 'test/mem.c',
216 'test/perf.c',
217 'test/perm.c',
218 'test/qsort.c',
219 'test/sprintf.c',
220 'test/stdio/scanf.c',
221 'test/stdio.c',
222 'test/stdlib.c',
223 'test/str.c',
224 'test/string.c',
225 'test/strtol.c',
226 'test/uuid.c',
227)
228
229# Startfiles.
230# This is what other systems know as crt*.o files, i.e. a set of object files
231# that are automatically built into every program binary (but not libraries).
232# We haven't yet installed the object files where the compiler can find them,
233# so we have to add them manually.
234#
235
236start_src = [ arch_start_src, files('generic/crt/crt1.c') ]
237
238libstartfiles = static_library('startfiles', start_src,
239 include_directories: includes,
240 c_args: arch_uspace_c_args + c_args,
241 pic: false,
242)
243
244if CONFIG_DEVEL_FILES
245 install_files += [[ 'lib', libstartfiles.full_path(), 'libstartfiles.a' ]]
246 install_deps += [ libstartfiles ]
247endif
Note: See TracBrowser for help on using the repository browser.