30,8 → 30,6 |
## Common compiler flags |
# |
|
-include ../../../Makefile.config |
|
LIBC_PREFIX = $(shell pwd) |
SOFTINT_PREFIX = ../softint |
RTLD_PREFIX = ../../lib/rtld |
47,7 → 45,6 |
## Sources |
# |
|
|
GENERIC_SOURCES = \ |
generic/libc.c \ |
generic/ddi.c \ |
93,8 → 90,8 |
generic/vfs/canonify.c |
|
ARCH_SOURCES += \ |
arch/$(ARCH)/src/entry.s \ |
arch/$(ARCH)/src/thread_entry.s |
arch/$(UARCH)/src/entry.s \ |
arch/$(UARCH)/src/thread_entry.s |
|
GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) |
ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) |
103,21 → 100,21 |
|
.PHONY: all clean depend kerninc |
|
all: kerninc libc.a libc.pic.a arch/$(ARCH)/_link.ld |
all: kerninc libc.a libc.pic.a arch/$(UARCH)/_link.ld |
|
kerninc: |
ln -sfn ../../../../kernel/generic/include include/kernel |
ln -sfn kernel/arch include/arch |
ln -sfn ../arch/$(ARCH)/include include/libarch |
ln -sfn ../arch/$(UARCH)/include include/libarch |
|
-include Makefile.depend |
|
clean: |
-rm -f include/kernel include/arch include/libarch libc.a libc.pic.a arch/$(ARCH)/_link.ld Makefile.depend |
-rm -f include/kernel include/arch include/libarch libc.a libc.pic.a arch/$(UARCH)/_link.ld Makefile.depend |
find . \( -name '*.o' -o -name '*.pio' \) -follow -exec rm \{\} \; |
|
depend: kerninc |
-makedepend -f - -- $(DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
-makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
-makedepend $(DEFS) $(PIC_CFLAGS) -o.pio -f - $(ARCH_SOURCES) $(GENERIC_SOURCES) >> Makefile.depend 2> /dev/null |
|
libc.a: depend $(OBJECTS) |
126,7 → 123,7 |
libc.pic.a: depend $(PIC_OBJECTS) |
$(AR) rc $@ $(LIBS) $(PIC_OBJECTS) |
|
arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in |
arch/$(UARCH)/_link.ld: arch/$(UARCH)/_link.ld.in |
$(CC) $(DEFS) $(CFLAGS) -DLIBC_PREFIX=$(LIBC_PREFIX) -E -x c $< | grep -v "^\#" > $@ |
|
%.o: %.S |