mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix kernel Makefile cleaning root directory files if CPU is unset.
This commit is contained in:
parent
60f85af7c4
commit
825029a24a
1 changed files with 14 additions and 8 deletions
|
@ -30,26 +30,32 @@ BOOTOBJS:=
|
|||
|
||||
ifeq ($(CPU),x86)
|
||||
X86FAMILY:=1
|
||||
CPUOBJS:=$(CPU)/boot.o $(CPU)/base.o
|
||||
CPUDIR:=$(CPU)
|
||||
CPUOBJS:=$(CPUDIR)/boot.o $(CPUDIR)/base.o
|
||||
endif
|
||||
|
||||
ifeq ($(CPU),x64)
|
||||
X86FAMILY:=1
|
||||
CPUDIR:=$(CPU)
|
||||
CXXFLAGS:=$(CXXFLAGS) -mno-red-zone -mno-mmx -mno-sse -mno-sse2
|
||||
CPUOBJS:=$(CPU)/boot.o $(CPU)/base.o
|
||||
CPUOBJS:=$(CPUDIR)/boot.o $(CPUDIR)/base.o
|
||||
endif
|
||||
|
||||
ifndef CPUDIR
|
||||
CPUDIR=.
|
||||
endif
|
||||
|
||||
ifdef X86FAMILY
|
||||
CPUOBJS:=$(CPUOBJS) \
|
||||
$(CPU)/memorymanagement.o \
|
||||
$(CPUDIR)/memorymanagement.o \
|
||||
x86-family/memorymanagement.o \
|
||||
$(CPU)/interrupt.o \
|
||||
$(CPUDIR)/interrupt.o \
|
||||
x86-family/interrupt.o \
|
||||
x86-family/ioport.o \
|
||||
x86-family/pic.o \
|
||||
x86-family/gdt.o \
|
||||
x86-family/idt.o \
|
||||
$(CPU)/syscall.o \
|
||||
$(CPUDIR)/syscall.o \
|
||||
x86-family/cmos.o \
|
||||
x86-family/time.o \
|
||||
x86-family/mtrr.o \
|
||||
|
@ -60,10 +66,10 @@ endif
|
|||
|
||||
# Object files that constitute the kernel.
|
||||
|
||||
CRTI_OBJ:=$(CPU)/crti.o
|
||||
CRTI_OBJ:=$(CPUDIR)/crti.o
|
||||
CRTBEGIN_OBJ:=$(shell $(HOSTCXX) $(CXXFLAGS) -print-file-name=crtbegin.o)
|
||||
CRTEND_OBJ:=$(shell $(HOSTCXX) $(CXXFLAGS) -print-file-name=crtend.o)
|
||||
CRTN_OBJ:=$(CPU)/crtn.o
|
||||
CRTN_OBJ:=$(CPUDIR)/crtn.o
|
||||
|
||||
LIBS=\
|
||||
-nostdlib \
|
||||
|
@ -78,7 +84,7 @@ ata.o \
|
|||
clock.o \
|
||||
com.o \
|
||||
copy.o \
|
||||
$(CPU)/kthread.o \
|
||||
$(CPUDIR)/kthread.o \
|
||||
crc32.o \
|
||||
debugger.o \
|
||||
descriptor.o \
|
||||
|
|
Loading…
Reference in a new issue