source: mainline/uspace/lib/c/meson.build@ b83c5e4

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

Move device-related stuff out of libc to libdevice

Unfortunately, we need to keep clock_dev, which pulls in hw_res
and pio_window. clock_dev is used by time.c

  • Property mode set to 100644
File size: 5.8 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/as.c',
63 'generic/ddi.c',
64 'generic/perm.c',
65 'generic/capa.c',
66 'generic/clipboard.c',
67 'generic/config.c',
68 'generic/context.c',
69 'generic/corecfg.c',
70 'generic/ctype.c',
71 'generic/device/clock_dev.c',
72 'generic/device/hw_res.c',
73 'generic/device/hw_res_parsed.c',
74 'generic/device/pio_window.c',
75 'generic/dirent.c',
76 'generic/dlfcn.c',
77 'generic/elf/elf.c',
78 'generic/elf/elf_load.c',
79 'generic/elf/elf_mod.c',
80 'generic/event.c',
81 'generic/errno.c',
82 'generic/gsort.c',
83 'generic/inttypes.c',
84 'generic/ipc_test.c',
85 'generic/loc.c',
86 'generic/mem.c',
87 'generic/str.c',
88 'generic/string.c',
89 'generic/str_error.c',
90 'generic/strtol.c',
91 'generic/l18n/langs.c',
92 'generic/pcb.c',
93 'generic/pio_trace.c',
94 'generic/smc.c',
95 'generic/task.c',
96 'generic/imath.c',
97 'generic/io/asprintf.c',
98 'generic/io/input.c',
99 'generic/io/io.c',
100 'generic/io/chargrid.c',
101 'generic/io/output.c',
102 'generic/io/printf.c',
103 'generic/io/log.c',
104 'generic/io/logctl.c',
105 'generic/io/kio.c',
106 'generic/io/klog.c',
107 'generic/io/snprintf.c',
108 'generic/io/vprintf.c',
109 'generic/io/vsnprintf.c',
110 'generic/io/printf_core.c',
111 'generic/io/con_srv.c',
112 'generic/io/console.c',
113 'generic/io/table.c',
114 'generic/irq.c',
115 'generic/ieee_double.c',
116 'generic/power_of_ten.c',
117 'generic/double_to_str.c',
118 'generic/malloc.c',
119 'generic/rndgen.c',
120 'generic/stdio/scanf.c',
121 'generic/stdio/sprintf.c',
122 'generic/stdio/sscanf.c',
123 'generic/stdio/sstream.c',
124 'generic/stdio/vsprintf.c',
125 'generic/thread/fibril.c',
126 'generic/thread/fibril_synch.c',
127 'generic/thread/thread.c',
128 'generic/thread/tls.c',
129 'generic/thread/futex.c',
130 'generic/thread/mpsc.c',
131 'generic/sysinfo.c',
132 'generic/ipc.c',
133 'generic/ns.c',
134 'generic/async/client.c',
135 'generic/async/server.c',
136 'generic/async/ports.c',
137 'generic/loader.c',
138 'generic/getopt.c',
139 'generic/adt/checksum.c',
140 'generic/adt/circ_buf.c',
141 'generic/adt/list.c',
142 'generic/adt/hash_table.c',
143 'generic/adt/odict.c',
144 'generic/adt/prodcons.c',
145 'generic/time.c',
146 'generic/tmpfile.c',
147 'generic/stdio.c',
148 'generic/stdlib.c',
149 'generic/udebug.c',
150 'generic/vfs/canonify.c',
151 'generic/vfs/inbox.c',
152 'generic/vfs/mtab.c',
153 'generic/vfs/vfs.c',
154 'generic/setjmp.c',
155 'generic/stack.c',
156 'generic/stacktrace.c',
157 'generic/arg_parse.c',
158 'generic/stats.c',
159 'generic/assert.c',
160 'generic/bsearch.c',
161 'generic/qsort.c',
162 'generic/ubsan.c',
163 'generic/uuid.c',
164)
165
166if CONFIG_RTLD
167 src += files(
168 'generic/rtld/rtld.c',
169 'generic/rtld/dynamic.c',
170 'generic/rtld/module.c',
171 'generic/rtld/symbol.c',
172 )
173endif
174
175test_src = files(
176 'test/adt/circ_buf.c',
177 'test/adt/odict.c',
178 'test/capa.c',
179 'test/casting.c',
180 'test/double_to_str.c',
181 'test/fibril/timer.c',
182 'test/getopt.c',
183 'test/gsort.c',
184 'test/ieee_double.c',
185 'test/imath.c',
186 'test/inttypes.c',
187 'test/io/table.c',
188 'test/main.c',
189 'test/mem.c',
190 'test/perf.c',
191 'test/perm.c',
192 'test/qsort.c',
193 'test/sprintf.c',
194 'test/stdio/scanf.c',
195 'test/stdio.c',
196 'test/stdlib.c',
197 'test/str.c',
198 'test/string.c',
199 'test/strtol.c',
200 'test/uuid.c',
201)
202
203# Startfiles.
204# This is what other systems know as crt*.o files, i.e. a set of object files
205# that are automatically built into every program binary (but not libraries).
206# We haven't yet installed the object files where the compiler can find them,
207# so we have to add them manually.
208#
209
210start_src = [ arch_start_src, files('generic/crt/crt1.c') ]
211
212libstartfiles = static_library('startfiles', start_src,
213 include_directories: includes,
214 c_args: arch_uspace_c_args + c_args,
215 pic: false,
216)
217
218if CONFIG_DEVEL_FILES
219 install_files += [[ 'lib', libstartfiles.full_path(), 'libstartfiles.a' ]]
220 install_deps += [ libstartfiles ]
221endif
Note: See TracBrowser for help on using the repository browser.