blob: 943ccd88097b9b464101e350b72ad1d55404ac9a [file] [log] [blame]
Corey Tabaka84697242009-03-26 02:32:01 -04001LOCAL_DIR := $(GET_LOCAL_DIR)
2
3INCLUDES += \
4 -I$(LOCAL_DIR)/include
5
6BOOTOBJS += \
7 $(LOCAL_DIR)/crt0.o
8
9OBJS += \
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
21TOOLCHAIN_PREFIX ?= #x86-elf-
22
23LIBGCC := $(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
27GENERATED += \
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 $< $@