Rev 4347 | Rev 4373 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4347 | Rev 4354 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | ## Common compiler flags |
30 | ## Common compiler flags |
31 | # |
31 | # |
32 | 32 | ||
33 | LIBC_PREFIX = $(shell pwd) |
33 | LIBC_PREFIX = $(shell pwd) |
34 | SOFTINT_PREFIX = ../softint |
34 | SOFTINT_PREFIX = ../softint |
35 | RTLD_PREFIX = ../../lib/rtld |
- | |
36 | 35 | ||
37 | ## Setup toolchain |
36 | ## Setup toolchain |
38 | # |
37 | # |
39 | 38 | ||
40 | include $(LIBC_PREFIX)/Makefile.toolchain |
39 | include $(LIBC_PREFIX)/Makefile.toolchain |
- | 40 | -include rtld/arch/$(UARCH)/Makefile.inc |
|
41 | 41 | ||
42 | CFLAGS += -I$(RTLD_PREFIX)/include -I../../srv/loader/include -D__32_BITS__ |
42 | CFLAGS += -Irtld/include -I../../srv/loader/include -D__32_BITS__ |
43 | PIC_CFLAGS := $(CFLAGS) -fPIC -D__IN_SHARED_LIBC__ |
43 | PIC_CFLAGS := $(CFLAGS) -fPIC -D__IN_SHARED_LIBC__ |
44 | 44 | ||
45 | ## Sources |
45 | ## Sources |
46 | # |
46 | # |
47 | 47 | ||
Line 87... | Line 87... | ||
87 | generic/stdlib.c \ |
87 | generic/stdlib.c \ |
88 | generic/kbd.c \ |
88 | generic/kbd.c \ |
89 | generic/mman.c \ |
89 | generic/mman.c \ |
90 | generic/udebug.c \ |
90 | generic/udebug.c \ |
91 | generic/vfs/vfs.c \ |
91 | generic/vfs/vfs.c \ |
92 | generic/vfs/canonify.c |
92 | generic/vfs/canonify.c \ |
- | 93 | rtld/rtld.c \ |
|
- | 94 | rtld/elf_load.c \ |
|
- | 95 | rtld/dynamic.c \ |
|
- | 96 | rtld/module.c \ |
|
- | 97 | rtld/symbol.c |
|
- | 98 | ||
93 | 99 | ||
94 | ARCH_SOURCES += \ |
100 | ARCH_SOURCES += \ |
95 | arch/$(UARCH)/src/entry.s \ |
101 | arch/$(UARCH)/src/entry.s \ |
96 | arch/$(UARCH)/src/thread_entry.s |
102 | arch/$(UARCH)/src/thread_entry.s |
97 | 103 | ||
Line 106... | Line 112... | ||
106 | 112 | ||
107 | kerninc: |
113 | kerninc: |
108 | ln -sfn ../../../../kernel/generic/include include/kernel |
114 | ln -sfn ../../../../kernel/generic/include include/kernel |
109 | ln -sfn kernel/arch include/arch |
115 | ln -sfn kernel/arch include/arch |
110 | ln -sfn ../arch/$(UARCH)/include include/libarch |
116 | ln -sfn ../arch/$(UARCH)/include include/libarch |
- | 117 | ln -sfn ../arch/$(UARCH)/include rtld/include/arch |
|
111 | 118 | ||
112 | -include Makefile.depend |
119 | -include Makefile.depend |
113 | 120 | ||
114 | clean: |
121 | clean: |
115 | -rm -f include/kernel include/arch include/libarch libc.a libc.pic.a arch/$(UARCH)/_link.ld Makefile.depend |
122 | -rm -f include/kernel include/arch include/libarch rtld/include/arch libc.a libc.pic.a arch/$(UARCH)/_link.ld Makefile.depend |
116 | find . \( -name '*.o' -o -name '*.pio' \) -follow -exec rm \{\} \; |
123 | find . \( -name '*.o' -o -name '*.pio' \) -follow -exec rm \{\} \; |
117 | 124 | ||
118 | depend: kerninc |
125 | depend: kerninc |
119 | -makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
126 | -makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
120 | -makedepend $(DEFS) $(PIC_CFLAGS) -o.pio -f - $(ARCH_SOURCES) $(GENERIC_SOURCES) >> Makefile.depend 2> /dev/null |
127 | -makedepend $(DEFS) $(PIC_CFLAGS) -o.pio -f - $(ARCH_SOURCES) $(GENERIC_SOURCES) >> Makefile.depend 2> /dev/null |