-
Notifications
You must be signed in to change notification settings - Fork 6
/
Toolchain.mk
72 lines (56 loc) · 1.88 KB
/
Toolchain.mk
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
CROSSCOMPILER_DIRECTORY := /usr/local/gcc-x86_64-beelzebub/bin
# Default
MAKE_FLAGS := -j
ifdef CROSSCOMPILERS_DIR
CROSSCOMPILER_DIRECTORY := $(CROSSCOMPILERS_DIR)/gcc-x86_64-beelzebub/bin
#MAKE_FLAGS :=
# The environment variables will fail to propagate...
endif
#############
# Toolchain #
CC := $(CROSSCOMPILER_DIRECTORY)/x86_64-beelzebub-gcc
CXX := $(CROSSCOMPILER_DIRECTORY)/x86_64-beelzebub-gcc
GAS := $(CROSSCOMPILER_DIRECTORY)/x86_64-beelzebub-gcc
DC := $(CROSSCOMPILER_DIRECTORY)/x86_64-beelzebub-gdc
AS := nasm
LO := $(CROSSCOMPILER_DIRECTORY)/x86_64-beelzebub-gcc
LD := $(CROSSCOMPILER_DIRECTORY)/x86_64-beelzebub-ld
AR := $(CROSSCOMPILER_DIRECTORY)/x86_64-beelzebub-gcc-ar
STRIP := $(CROSSCOMPILER_DIRECTORY)/x86_64-beelzebub-strip
MKISO := mkisofs
PRE_COMPILATION :=
POST_COMPILATION :=
ifneq ($(shell $(MKISO) --version 2> /dev/null; echo $$?),0)
# So, mkisofs may not be absent.
# Maybe it comes from an external source?
ifdef MISC_TOOLS_DIR
MKISO := $(MISC_TOOLS_DIR)/genisoimage
endif
endif
#################
# Target Tuning #
MTUNE := corei7-avx
# This is only used when targetting x86.
#####################
# Testing w/ VMWare #
ifndef VMX_PATH
VMX_PATH := "H:\Virtual Machines\Beelzebub\Beelzebub.vmx"
endif
#######################
# Testing for Sublime #
ifdef IN_SUBLIME
PRE_COMPILATION := $(PREFIX2)/run-compiler-add-dir.sh $(PROJ_SUBDIR)
#POST_COMPILATION := 2>&1 | sed -r 's,( *)(.+:[0-9]+:[0-9]+:),\1$(PROJ_SUBDIR)/\2,'
endif
# You should modify this file according to your needs and add it to your
# .gitignore.
# Some X-plainations:
# CXX = C++ Compiler (not sure if this is standard or not, lel)
# DC = D Compiler
# LO = Linker-optimizer
# Should be 'nuff.
#ifeq ($(shell clang --version; echo $$?),0)
# CC := clang -target x86_64-elf
# CXX := clang -target x86_64-elf
# LO := clang -target x86_64-elf -v
#endif