source: mainline/uspace/lib/c/Makefile@ a4e78743

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since a4e78743 was a4e78743, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 6 years ago

Move string-to-int conversion tests to a separate file, and add a few

Some of the newly added tests detect bugs in current implementation.
Fixes and more tests are WIP.

  • Property mode set to 100644
File size: 5.6 KB
RevLine 
[0e4ab80]1#
[df4ed85]2# Copyright (c) 2005 Martin Decky
[079f440]3# Copyright (c) 2007 Jakub Jermar
[0e4ab80]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#
[3eddaff]29
[1b1164e8]30USPACE_PREFIX = ../..
31ROOT_PATH = $(USPACE_PREFIX)/..
[079f440]32
[1b1164e8]33CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
34
[82d9087]35EXTRA_OUTPUT = $(START_FILES)
[ea4910b]36EXTRA_CFLAGS += -fno-builtin -D_LIBC_SOURCE
[4196304]37LIBRARY = libc
[c631734]38SOVERSION = 0.0
[ec3e2ed]39
[1b1164e8]40-include $(CONFIG_MAKEFILE)
41-include arch/$(UARCH)/Makefile.inc
[079f440]42
43GENERIC_SOURCES = \
44 generic/libc.c \
45 generic/ddi.c \
46 generic/as.c \
[4802dd7]47 generic/bd.c \
48 generic/bd_srv.c \
[719a208]49 generic/perm.c \
[6c4eedf]50 generic/cap.c \
[079f440]51 generic/clipboard.c \
[1a2befb]52 generic/config.c \
[e0a4686]53 generic/context.c \
[92c1680]54 generic/corecfg.c \
[67ca359]55 generic/ctype.c \
[729fa2d6]56 generic/devman.c \
[5cd136ab]57 generic/device/hw_res.c \
[00d7e1b]58 generic/device/hw_res_parsed.c \
[48bd6f4]59 generic/device/pio_window.c \
[02b38730]60 generic/device/clock_dev.c \
[1e94e09]61 generic/device/led_dev.c \
[d4067a7]62 generic/dirent.c \
[bd88bee]63 generic/dhcp.c \
[31e9fe0]64 generic/dnsr.c \
[c6f1eb05]65 generic/dlfcn.c \
[2c4e1cc]66 generic/elf/elf.c \
[bfdb5af1]67 generic/elf/elf_load.c \
[17341d4]68 generic/elf/elf_mod.c \
[079f440]69 generic/event.c \
70 generic/errno.c \
[f2460a50]71 generic/gsort.c \
[9912f49]72 generic/inttypes.c \
[1edd6d0]73 generic/ipc_test.c \
[15f3c3f]74 generic/loc.c \
[079f440]75 generic/mem.c \
[19f857a]76 generic/str.c \
[99d3123]77 generic/string.c \
[2721a75]78 generic/str_error.c \
[d39c46e0]79 generic/strtol.c \
[749f18c5]80 generic/l18n/langs.c \
[079f440]81 generic/pcb.c \
82 generic/smc.c \
83 generic/task.c \
[9854a8f]84 generic/imath.c \
[3495654]85 generic/inet/addr.c \
[fab2746]86 generic/inet/endpoint.c \
[a62ceaf]87 generic/inet/host.c \
88 generic/inet/hostname.c \
89 generic/inet/hostport.c \
[fab2746]90 generic/inet/tcp.c \
91 generic/inet/udp.c \
[c76e926]92 generic/inet.c \
[0e25780]93 generic/inetcfg.c \
[6428115]94 generic/inetping.c \
[079f440]95 generic/io/asprintf.c \
[111d2d6]96 generic/io/input.c \
[079f440]97 generic/io/io.c \
[75751db6]98 generic/io/chardev.c \
99 generic/io/chardev_srv.c \
[6d5e378]100 generic/io/chargrid.c \
101 generic/io/output.c \
[079f440]102 generic/io/printf.c \
[9b415c9]103 generic/io/log.c \
[669f5cae]104 generic/io/logctl.c \
[db9c889]105 generic/io/label.c \
[6fa9a99d]106 generic/io/kio.c \
[079f440]107 generic/io/klog.c \
[c4c6025]108 generic/io/serial.c \
[079f440]109 generic/io/snprintf.c \
110 generic/io/vprintf.c \
111 generic/io/vsnprintf.c \
112 generic/io/printf_core.c \
[5d94b16c]113 generic/io/con_srv.c \
[079f440]114 generic/io/console.c \
[5e962ad]115 generic/io/table.c \
[6d5e378]116 generic/io/visualizer.c \
117 generic/io/window.c \
[f834f90d]118 generic/iplink.c \
119 generic/iplink_srv.c \
[869d936]120 generic/irc.c \
[8820544]121 generic/irq.c \
[34b9299]122 generic/ieee_double.c \
123 generic/power_of_ten.c \
124 generic/double_to_str.c \
[079f440]125 generic/malloc.c \
[87337dc5]126 generic/rndgen.c \
[ed18e14]127 generic/stdio/scanf.c \
[a8b0c5d]128 generic/stdio/sprintf.c \
[f47a905]129 generic/stdio/sscanf.c \
[01cc7b45]130 generic/stdio/sstream.c \
[a8b0c5d]131 generic/stdio/vsprintf.c \
[6340b4d2]132 generic/thread/fibril.c \
133 generic/thread/fibril_synch.c \
134 generic/thread/thread.c \
135 generic/thread/tls.c \
136 generic/thread/futex.c \
[1de92fb0]137 generic/thread/mpsc.c \
[079f440]138 generic/sysinfo.c \
139 generic/ipc.c \
[79ae36dd]140 generic/ns.c \
[49a796f1]141 generic/async/client.c \
142 generic/async/server.c \
143 generic/async/ports.c \
[079f440]144 generic/loader.c \
145 generic/getopt.c \
[d51beba3]146 generic/adt/checksum.c \
[7a6065c]147 generic/adt/circ_buf.c \
[a99330e]148 generic/adt/list.c \
149 generic/adt/hash_table.c \
[838ea8aa]150 generic/adt/odict.c \
[4e1a2f5]151 generic/adt/prodcons.c \
[079f440]152 generic/time.c \
[4e6a610]153 generic/tmpfile.c \
[b942a66]154 generic/stdio.c \
[079f440]155 generic/stdlib.c \
156 generic/udebug.c \
157 generic/vfs/canonify.c \
[438f355]158 generic/vfs/inbox.c \
159 generic/vfs/mtab.c \
[d4067a7]160 generic/vfs/vfs.c \
[a070eff]161 generic/setjmp.c \
[0aae87a6]162 generic/stack.c \
[0a72efc]163 generic/stacktrace.c \
[88dea9d]164 generic/arg_parse.c \
[04803bf]165 generic/stats.c \
[acc0efb]166 generic/assert.c \
[75c430e3]167 generic/bsearch.c \
[7acd787]168 generic/pci.c \
[22fb7ab]169 generic/pio_trace.c \
[f2460a50]170 generic/qsort.c \
[2f7d77c6]171 generic/ubsan.c \
[70815a24]172 generic/uuid.c \
[22fb7ab]173 generic/vbd.c \
174 generic/vol.c
[7fb3f1c]175
[79ae36dd]176ifeq ($(CONFIG_RTLD),y)
[7fb3f1c]177 GENERIC_SOURCES += \
[8a1fb09]178 generic/rtld/rtld.c \
179 generic/rtld/dynamic.c \
180 generic/rtld/module.c \
181 generic/rtld/symbol.c
[7fb3f1c]182endif
[079f440]183
[d2f75eb]184ARCH_SOURCES += $(ARCH_AUTOCHECK_HEADERS:%.h=%.check.c)
185
[079f440]186SOURCES = \
187 $(GENERIC_SOURCES) \
188 $(ARCH_SOURCES)
189
[2bff9860]190TEST_SOURCES = \
[7a6065c]191 test/adt/circ_buf.c \
[fc9167f]192 test/adt/odict.c \
[88e7dc5]193 test/cap.c \
[32236e5]194 test/casting.c \
[88e7dc5]195 test/double_to_str.c \
[12dcd5f]196 test/fibril/timer.c \
[88e7dc5]197 test/getopt.c \
198 test/gsort.c \
199 test/ieee_double.c \
200 test/imath.c \
[9912f49]201 test/inttypes.c \
[5e962ad]202 test/io/table.c \
[88e7dc5]203 test/main.c \
204 test/mem.c \
[8ee106b]205 test/perf.c \
[9c75a99d]206 test/perm.c \
[f2460a50]207 test/qsort.c \
[a18a8b9]208 test/sprintf.c \
[88e7dc5]209 test/stdio/scanf.c \
[777832e]210 test/stdio.c \
[8338a81]211 test/stdlib.c \
[99d3123]212 test/str.c \
[88e7dc5]213 test/string.c \
[a4e78743]214 test/strtol.c \
[88e7dc5]215 test/uuid.c
[2bff9860]216
[1b1164e8]217include $(USPACE_PREFIX)/Makefile.common
[079f440]218
[2eadda9]219$(LIBC_PREFIX)/crt0.o: $(LIBC_PREFIX)/arch/$(UARCH)/src/entry.o
220 cp $< $@
221
222$(LIBC_PREFIX)/crt1.o: $(LIBC_PREFIX)/generic/crt/entry.o
223 cp $< $@
224
[d2f75eb]225AUTOCHECK = $(realpath $(ROOT_PATH)/tools/autocheck.awk)
226
227%.check.c: %.h $(AUTOCHECK)
228 cd $(<D) && $(AUTOCHECK) $(<F) > $(@F)
Note: See TracBrowser for help on using the repository browser.