forked from brutal-org/brutal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
81 lines (66 loc) · 1.64 KB
/
makefile
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
.SUFFIXES:
.DELETE_ON_ERROR:
.DEFAULT_GOAL:=all
SHELL:=/bin/bash
MKCWD=mkdir -p $(@D)
ARCH?=x86_64
HOST_ARCH?=$(shell uname -m)
BOARD?=pc
BOOTLOADER?=loader
CONFIG?=devel
TOOLCHAIN?=llvm
include sources/build/configs/$(CONFIG).mk
include sources/build/boards/$(ARCH)-$(BOARD)/build.mk
export LC_ALL=C
BASE_CFLAGS += \
-MD \
-std=gnu2x \
-Wall \
-Wextra \
-Werror \
-Wshadow \
-Wvla \
-Isources/libs/ \
-Isources/libs/hw \
-Isources/apps \
-Isources/srvs \
-Isources/utils \
-Isources/ \
-Ibin/generated \
-Ibin/generated/headers
USER_CFLAGS_INC := \
-Isources/libs/stdc-ansi \
-Isources/libs/stdc-math \
-Isources/libs/stdc-ext \
-Isources/libs/stdc-posix
CACHEDIR=.cache/
GENDIR=bin/generated
BINDIR_LOADER=bin/$(CONFIG)/$(ARCH)-loader-$(TOOLCHAIN)
BINDIR_USER=bin/$(CONFIG)/$(ARCH)-brutal-$(TOOLCHAIN)
BINDIR_KERNEL=bin/$(CONFIG)/$(ARCH)-kernel-$(TOOLCHAIN)
BINDIR_HOST=bin/$(CONFIG)/$(HOST_ARCH)-host-$(TOOLCHAIN)
include $(wildcard sources/apps/*/build.mk)
include $(wildcard sources/srvs/*/build.mk)
include $(wildcard sources/utils/*/build.mk)
include build/toolchain/archs/$(ARCH)/arch.mk
-include build/toolchain/archs/$(HOST_ARCH)/host.mk
include build/toolchain/$(TOOLCHAIN)/build.mk
include sources/libs/.build.mk
include sources/build/kernel/build.mk
include sources/build/host/build.mk
include sources/protos/.build.mk
include sources/build/loader/$(BOOTLOADER).mk
include sources/build/target/build.mk
include build/run/$(BOOTLOADER).mk
.PHONY: all
all: $(ALL)
.PHONY: clean
clean:
rm -rf $(BINDIR_LOADER)
rm -rf $(BINDIR_USER)
rm -rf $(BINDIR_KERNEL)
rm -rf $(BINDIR_HOST)
.PHONY: nuke
nuke:
rm -rf bin/
-include $(DEPENDENCIES)