mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-26 23:36:32 +00:00
Compare commits
2 commits
fdb4b0313b
...
bc16968387
Author | SHA1 | Date | |
---|---|---|---|
|
bc16968387 | ||
|
aae8a3c2e0 |
1 changed files with 9 additions and 21 deletions
|
@ -1,43 +1,31 @@
|
||||||
# Nuke built-in rules and variables.
|
# Nuke built-in rules and variables.
|
||||||
override MAKEFLAGS += -rR
|
MAKEFLAGS += -rR
|
||||||
|
.SUFFIXES:
|
||||||
|
|
||||||
# This is the name that our final executable will have.
|
# This is the name that our final executable will have.
|
||||||
# Change as needed.
|
# Change as needed.
|
||||||
override OUTPUT := kernel
|
override OUTPUT := kernel
|
||||||
|
|
||||||
# Convenience macro to reliably declare user overridable variables.
|
# Convenience macro to reliably declare user overridable variables.
|
||||||
define DEFAULT_VAR =
|
override USER_VARIABLE = $(if $(filter $(origin $(1)),default undefined),$(eval override $(1) := $(2)))
|
||||||
ifeq ($(origin $1),default)
|
|
||||||
override $(1) := $(2)
|
|
||||||
endif
|
|
||||||
ifeq ($(origin $1),undefined)
|
|
||||||
override $(1) := $(2)
|
|
||||||
endif
|
|
||||||
endef
|
|
||||||
|
|
||||||
# User controllable C compiler command.
|
# User controllable C compiler command.
|
||||||
override DEFAULT_KCC := cc
|
$(call USER_VARIABLE,KCC,cc)
|
||||||
$(eval $(call DEFAULT_VAR,KCC,$(DEFAULT_KCC)))
|
|
||||||
|
|
||||||
# User controllable linker command.
|
# User controllable linker command.
|
||||||
override DEFAULT_KLD := ld
|
$(call USER_VARIABLE,KLD,ld)
|
||||||
$(eval $(call DEFAULT_VAR,KLD,$(DEFAULT_KLD)))
|
|
||||||
|
|
||||||
# User controllable C flags.
|
# User controllable C flags.
|
||||||
override DEFAULT_KCFLAGS := -g -O2 -pipe
|
$(call USER_VARIABLE,KCFLAGS,-g -O2 -pipe)
|
||||||
$(eval $(call DEFAULT_VAR,KCFLAGS,$(DEFAULT_KCFLAGS)))
|
|
||||||
|
|
||||||
# User controllable C preprocessor flags. We set none by default.
|
# User controllable C preprocessor flags. We set none by default.
|
||||||
override DEFAULT_KCPPFLAGS :=
|
$(call USER_VARIABLE,KCPPFLAGS,)
|
||||||
$(eval $(call DEFAULT_VAR,KCPPFLAGS,$(DEFAULT_KCPPFLAGS)))
|
|
||||||
|
|
||||||
# User controllable nasm flags.
|
# User controllable nasm flags.
|
||||||
override DEFAULT_KNASMFLAGS := -F dwarf -g
|
$(call USER_VARIABLE,KNASMFLAGS,-F dwarf -g)
|
||||||
$(eval $(call DEFAULT_VAR,KNASMFLAGS,$(DEFAULT_KNASMFLAGS)))
|
|
||||||
|
|
||||||
# User controllable linker flags. We set none by default.
|
# User controllable linker flags. We set none by default.
|
||||||
override DEFAULT_KLDFLAGS :=
|
$(call USER_VARIABLE,KLDFLAGS,)
|
||||||
$(eval $(call DEFAULT_VAR,KLDFLAGS,$(DEFAULT_KLDFLAGS)))
|
|
||||||
|
|
||||||
# Internal C flags that should not be changed by the user.
|
# Internal C flags that should not be changed by the user.
|
||||||
override KCFLAGS += \
|
override KCFLAGS += \
|
||||||
|
|
Loading…
Reference in a new issue