Don't use custom ldscripts in uspace. (#38)
[helenos.git] / uspace / lib / c / Makefile
blob03fdef0a344e10bff6fbf9abcab78cdfea7d8cf8
2 # Copyright (c) 2005 Martin Decky
3 # Copyright (c) 2007 Jakub Jermar
4 # All rights reserved.
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
8 # are met:
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.
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.
30 USPACE_PREFIX = ../..
31 ROOT_PATH = $(USPACE_PREFIX)/..
33 CONFIG_MAKEFILE = $(ROOT_PATH)/Makefile.config
35 LIBRARY = libc
36 SOVERSION = 0.0
38 -include $(CONFIG_MAKEFILE)
39 -include arch/$(UARCH)/Makefile.inc
41 GENERIC_SOURCES = \
42 generic/libc.c \
43 generic/ddi.c \
44 generic/as.c \
45 generic/bd.c \
46 generic/bd_srv.c \
47 generic/perm.c \
48 generic/cap.c \
49 generic/clipboard.c \
50 generic/config.c \
51 generic/context.c \
52 generic/corecfg.c \
53 generic/devman.c \
54 generic/device/hw_res.c \
55 generic/device/hw_res_parsed.c \
56 generic/device/pio_window.c \
57 generic/device/clock_dev.c \
58 generic/device/led_dev.c \
59 generic/dirent.c \
60 generic/dhcp.c \
61 generic/dnsr.c \
62 generic/dlfcn.c \
63 generic/elf/elf.c \
64 generic/elf/elf_load.c \
65 generic/elf/elf_mod.c \
66 generic/event.c \
67 generic/errno.c \
68 generic/gsort.c \
69 generic/loc.c \
70 generic/mem.c \
71 generic/str.c \
72 generic/str_error.c \
73 generic/strtol.c \
74 generic/l18n/langs.c \
75 generic/fibril.c \
76 generic/fibril_synch.c \
77 generic/pcb.c \
78 generic/smc.c \
79 generic/smp_memory_barrier.c \
80 generic/thread.c \
81 generic/tls.c \
82 generic/task.c \
83 generic/futex.c \
84 generic/imath.c \
85 generic/inet/addr.c \
86 generic/inet/endpoint.c \
87 generic/inet/host.c \
88 generic/inet/hostname.c \
89 generic/inet/hostport.c \
90 generic/inet/tcp.c \
91 generic/inet/udp.c \
92 generic/inet.c \
93 generic/inetcfg.c \
94 generic/inetping.c \
95 generic/io/asprintf.c \
96 generic/io/input.c \
97 generic/io/io.c \
98 generic/io/chardev.c \
99 generic/io/chardev_srv.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/serial.c \
108 generic/io/snprintf.c \
109 generic/io/vprintf.c \
110 generic/io/vsnprintf.c \
111 generic/io/printf_core.c \
112 generic/io/con_srv.c \
113 generic/io/console.c \
114 generic/io/table.c \
115 generic/io/visualizer.c \
116 generic/io/window.c \
117 generic/iplink.c \
118 generic/iplink_srv.c \
119 generic/irc.c \
120 generic/irq.c \
121 generic/ieee_double.c \
122 generic/power_of_ten.c \
123 generic/double_to_str.c \
124 generic/malloc.c \
125 generic/sysinfo.c \
126 generic/ipc.c \
127 generic/ns.c \
128 generic/async.c \
129 generic/loader.c \
130 generic/getopt.c \
131 generic/adt/checksum.c \
132 generic/adt/circ_buf.c \
133 generic/adt/list.c \
134 generic/adt/hash_table.c \
135 generic/adt/odict.c \
136 generic/adt/prodcons.c \
137 generic/time.c \
138 generic/stdio.c \
139 generic/stdlib.c \
140 generic/udebug.c \
141 generic/vfs/canonify.c \
142 generic/vfs/inbox.c \
143 generic/vfs/mtab.c \
144 generic/vfs/vfs.c \
145 generic/rcu.c \
146 generic/setjmp.c \
147 generic/stack.c \
148 generic/stacktrace.c \
149 generic/arg_parse.c \
150 generic/stats.c \
151 generic/assert.c \
152 generic/pio_trace.c \
153 generic/qsort.c \
154 generic/uuid.c \
155 generic/vbd.c \
156 generic/vol.c
158 ifeq ($(CONFIG_RTLD),y)
159 GENERIC_SOURCES += \
160 generic/rtld/rtld.c \
161 generic/rtld/dynamic.c \
162 generic/rtld/module.c \
163 generic/rtld/symbol.c
164 endif
166 ARCH_SOURCES += $(ARCH_AUTOCHECK_HEADERS:%.h=%.check.c)
168 SOURCES = \
169 $(GENERIC_SOURCES) \
170 $(ARCH_SOURCES)
172 TEST_SOURCES = \
173 test/adt/circ_buf.c \
174 test/fibril/timer.c \
175 test/main.c \
176 test/io/table.c \
177 test/odict.c \
178 test/qsort.c \
179 test/sprintf.c \
180 test/str.c
182 include $(USPACE_PREFIX)/Makefile.common
184 AUTOCHECK = $(realpath $(ROOT_PATH)/tools/autocheck.awk)
186 %.check.c: %.h $(AUTOCHECK)
187 cd $(<D) && $(AUTOCHECK) $(<F) > $(@F)