-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.config
92 lines (73 loc) · 2.54 KB
/
Makefile.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Do not modify this file! Add a Makefile.local (or export envvars) instead.
ROOTPATH ?= $(shell readlink -f .)
-include $(ROOTPATH)/Makefile.local
# Toolchain options
TOOLCHAINDIR ?= dist
TARGET ?= i586-kos
BINUTILS_VER ?= 2.30
GMP_VER ?= 6.1.2
MPFR_VER ?= 4.0.1
MPC_VER ?= 1.1.0
GCC_VER ?= 8.1.0
# These versions CANNOT be higher: automake requires perl version <= 5.22,
# and binutils/gcc/newlib needs these versions of automake and autoconf.
PERL_VER ?= 5.22.2
AUTOCONF_VER ?= 2.64
AUTOMAKE_VER ?= 1.11.6
# libc options
NEWLIB_VER ?= 3.0.0
# Names
UTILBINDIR ?= bin
MKROOTRAMFS ?= mkrootramfs
SHAREDINCDIR ?= inc
SHAREDSRCDIR ?= src
SHAREDBUILDDIR ?= build
LIBCDIR ?= dist
LIBKDIR ?= dist
KSYSROOTDIR ?= sysroot
KSYSLIBDIR ?= lib
KSYSHEADERDIR ?= include
DISTIMAGEDIR ?= image
DISTPKGDIR ?= package
DISTTESTDIR ?= test
# Main binary output file names
LIBKAR ?= libk.a
KBINARY ?= kernel.elf
ROOTRAMFS ?= rootramfs
IMAGE ?= cdrom.iso
TESTHDD ?= hdd.img
# Emulation options
QEMU ?= qemu-system-i386
CORES ?= 8
########### ABSOLUTELY DO NOT MODIFY BELOW YOU RISK DATA CORRUPTION! ###########
########### (If you run 'make clean', for example.) ###########
# Calculated constants
TOOLCHAINPATH ?= $(ROOTPATH)/toolchain
UTILPATH ?= $(ROOTPATH)/util
SHAREDPATH ?= $(ROOTPATH)/shared
KERNELPATH ?= $(ROOTPATH)/kernel
LIBKPATH ?= $(ROOTPATH)/libk
LIBCPATH ?= $(ROOTPATH)/libc
APPSPATH ?= $(ROOTPATH)/apps
DISTPATH ?= $(ROOTPATH)/dist
TOOLCHAINBINPATH := $(TOOLCHAINPATH)/$(TOOLCHAINDIR)
UTILBINPATH := $(UTILPATH)/$(UTILBINDIR)
SHAREDINCPATH := $(SHAREDPATH)/$(SHAREDBUILDDIR)/$(SHAREDINCDIR)
SHAREDSRCPATH := $(SHAREDPATH)/$(SHAREDBUILDDIR)/$(SHAREDSRCDIR)
LIBKBINPATH := $(LIBKPATH)/$(LIBKDIR)
LIBCBINPATH := $(LIBCPATH)/$(LIBCDIR)
LIBCSYSPATH := $(LIBCBINPATH)/$(TARGET)
LIBCHEADERPATH := $(LIBCSYSPATH)/include
KSYSROOT := $(DISTPATH)/$(KSYSROOTDIR)
KSYSSTARTPATH := $(KSYSROOT)/$(KSYSLIBDIR)
KSYSLIBPATH := $(KSYSROOT)/$(KSYSLIBDIR)
KSYSHEADERPATH := $(KSYSROOT)/$(KSYSHEADERDIR)
QEMUARGS ?= -smp cores=$(CORES) -boot d -cdrom $(DISTPATH)/$(DISTIMAGEDIR)/$(DISTPKGDIR)/$(IMAGE) -drive id=disk,format=raw,file=$(DISTPATH)/$(DISTTESTDIR)/$(TESTHDD),if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -netdev user,id=network0 -device e1000,netdev=network0
# Required tools
WGET ?= wget
TAR ?= tar
KAR := $(TOOLCHAINBINPATH)/bin/$(TARGET)-ar
KAS := $(TOOLCHAINBINPATH)/bin/$(TARGET)-as
KLD := $(TOOLCHAINBINPATH)/bin/$(TARGET)-ld
KCPP := $(TOOLCHAINBINPATH)/bin/$(TARGET)-cpp
KCC := $(TOOLCHAINBINPATH)/bin/$(TARGET)-gcc