2 # Copyright (c) 2005 Martin Decky
3 # Copyright (c) 2007 Jakub Jermar
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
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.
31 ROOT_PATH
= $(USPACE_PREFIX
)/..
33 INCLUDE_ABI
= include/abi
34 INCLUDE_LIBARCH
= include/libarch
36 COMMON_MAKEFILE
= $(ROOT_PATH
)/Makefile.common
37 COMMON_HEADER
= $(ROOT_PATH
)/common.h
38 COMMON_HEADER_ARCH
= arch
/$(UARCH
)/include/common.h
40 CONFIG_MAKEFILE
= $(ROOT_PATH
)/Makefile.config
43 $(LIBC_PREFIX
)/arch
/$(UARCH
)/_link.
ld \
44 $(LIBC_PREFIX
)/arch
/$(UARCH
)/_link-loader.
ld \
45 $(LIBC_PREFIX
)/arch
/$(UARCH
)/_link-shlib.
ld \
46 $(LIBC_PREFIX
)/arch
/$(UARCH
)/_link-dlexe.
ld
48 PRE_DEPEND
= $(INCLUDE_ABI
) $(INCLUDE_LIBARCH
) $(COMMON_HEADER_ARCH
)
49 EXTRA_OUTPUT
= $(LINKER_SCRIPTS
)
50 EXTRA_CLEAN
= $(INCLUDE_ABI
) $(INCLUDE_LIBARCH
) $(COMMON_HEADER_ARCH
) $(LINKER_SCRIPTS
)
52 SLIBRARY
= libc.so
.0.0
56 -include $(COMMON_MAKEFILE
)
57 -include $(CONFIG_MAKEFILE
)
58 -include arch
/$(UARCH
)/Makefile.inc
70 generic
/device
/hw_res.c \
71 generic
/device
/hw_res_parsed.c \
72 generic
/device
/char_dev.c \
73 generic
/device
/clock_dev.c \
74 generic
/device
/battery_dev.c \
75 generic
/device
/graph_dev.c \
76 generic
/device
/nic.c \
77 generic
/device
/pci.c \
78 generic
/device
/ahci.c \
79 generic
/elf
/elf_load.c \
86 generic
/l18n
/langs.c \
88 generic
/fibril_synch.c \
98 generic
/io
/asprintf.c \
101 generic
/io
/chargrid.c \
102 generic
/io
/output.c \
103 generic
/io
/printf.c \
105 generic
/io
/logctl.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
/visualizer.c \
114 generic
/io
/window.c \
116 generic
/iplink_srv.c \
125 generic
/adt
/hash_table.c \
126 generic
/adt
/hash_set.c \
127 generic
/adt
/dynamic_fifo.c \
128 generic
/adt
/char_map.c \
129 generic
/adt
/prodcons.c \
135 generic
/vfs
/canonify.c \
137 generic
/net
/socket_client.c \
138 generic
/net
/socket_parse.c \
139 generic
/stacktrace.c \
140 generic
/arg_parse.c \
145 ifeq ($(CONFIG_RTLD
),y
)
148 generic
/rtld
/rtld.c \
149 generic
/rtld
/dynamic.c \
150 generic
/rtld
/module.c \
151 generic
/rtld
/symbol.c
158 include $(USPACE_PREFIX
)/Makefile.common
160 $(INCLUDE_LIBARCH
): arch
/$(UARCH
)/include
163 $(INCLUDE_ABI
): ..
/..
/..
/abi
/include/
166 $(LIBC_PREFIX
)/arch
/$(UARCH
)/_link.
ld: $(LIBC_PREFIX
)/arch
/$(UARCH
)/_link.
ld.in
167 $(GCC
) $(DEFS
) $(CFLAGS
) -DLIBC_PATH
=$(CURDIR
) -E
-x c
$< | grep
-v
"^\#" > $@
169 $(LIBC_PREFIX
)/arch
/$(UARCH
)/_link-loader.
ld: $(LIBC_PREFIX
)/arch
/$(UARCH
)/_link.
ld.in
170 $(GCC
) $(DEFS
) $(CFLAGS
) -DLIBC_PATH
=$(CURDIR
) -DLOADER
-E
-x c
$< | grep
-v
"^\#" > $@
172 $(LIBC_PREFIX
)/arch
/$(UARCH
)/_link-shlib.
ld: $(LIBC_PREFIX
)/arch
/$(UARCH
)/_link.
ld.in
173 $(GCC
) $(DEFS
) $(CFLAGS
) -DLIBC_PATH
=$(CURDIR
) -DSHLIB
-E
-x c
$< | grep
-v
"^\#" > $@
175 $(LIBC_PREFIX
)/arch
/$(UARCH
)/_link-dlexe.
ld: $(LIBC_PREFIX
)/arch
/$(UARCH
)/_link.
ld.in
176 $(GCC
) $(DEFS
) $(CFLAGS
) -DLIBC_PATH
=$(CURDIR
) -DDLEXE
-E
-x c
$< | grep
-v
"^\#" > $@
178 $(COMMON_HEADER_ARCH
): $(COMMON_HEADER
)
179 ln
-sfn ..
/..
/..
/$< $@