Corey Tabaka | 8469724 | 2009-03-26 02:32:01 -0400 | [diff] [blame^] | 1 | LOCAL_DIR := $(GET_LOCAL_DIR) |
| 2 | |
| 3 | INCLUDES += \ |
| 4 | -I$(LOCAL_DIR)/include |
| 5 | |
| 6 | BOOTOBJS += \ |
| 7 | $(LOCAL_DIR)/crt0.o |
| 8 | |
| 9 | OBJS += \ |
| 10 | $(LOCAL_DIR)/arch.o \ |
| 11 | $(LOCAL_DIR)/asm.o \ |
| 12 | $(LOCAL_DIR)/cache.o \ |
| 13 | $(LOCAL_DIR)/cache-ops.o \ |
| 14 | $(LOCAL_DIR)/ops.o \ |
| 15 | $(LOCAL_DIR)/thread.o \ |
| 16 | $(LOCAL_DIR)/mmu.o \ |
| 17 | $(LOCAL_DIR)/faults.o \ |
| 18 | $(LOCAL_DIR)/descriptor.o |
| 19 | |
| 20 | # set the default toolchain to x86 elf and set a #define |
| 21 | TOOLCHAIN_PREFIX ?= #x86-elf- |
| 22 | |
| 23 | LIBGCC := $(shell $(TOOLCHAIN_PREFIX)gcc $(CFLAGS) -print-libgcc-file-name) |
| 24 | #$(info LIBGCC = $(LIBGCC)) |
| 25 | |
| 26 | # potentially generated files that should be cleaned out with clean make rule |
| 27 | GENERATED += \ |
| 28 | $(BUILDDIR)/kernel.ld |
| 29 | |
| 30 | # rules for generating the linker scripts |
| 31 | |
| 32 | $(BUILDDIR)/kernel.ld: $(LOCAL_DIR)/kernel.ld |
| 33 | @echo generating $@ |
| 34 | @$(MKDIR) |
| 35 | $(NOECHO)cp $< $@ |