aboutsummaryrefslogtreecommitdiff
path: root/config.mk
blob: a1c63794075ad7211e759869ab11a11245d2df89 (plain)
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
ARCH ?= $(shell uname -m)

include arch/$(ARCH)/config.mk

AS ?= $(CROSS_COMPILER)as
CC ?= $(CROSS_COMPILER)cc
LD ?= $(CROSS_COMPILER)ld
RM ?= rm -f
CP ?= cp -v

CFLAGS += -m32 -nostdlib -fno-builtin -fno-leading-underscore -MMD -MP -Iinclude
ASFLAGS += --32
LDFLAGS += -melf_i386

QEMU ?= qemu-system-$(ARCH)

INSTALL_DIR ?= /boot

QUIET ?= @

kernel ?= kernel.img
kernel_iso ?= kernel.iso

dirs := core arch/$(ARCH)
csources := $(foreach dir,$(dirs),$(wildcard $(dir)/*.c))
ssources := $(foreach dir,$(dirs),$(wildcard $(dir)/*.s))
objects := $(csources:.c=.o) $(ssources:.s=.o)
memmap := arch/$(ARCH)/memmap

dependencies := $(csources:.c=.d)