mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:07:45 +00:00
Add a Makefile.common with stuff shared by all Makefiles.
Compiler names, CXXFLAGS, and such. I should have done this ages ago.
This commit is contained in:
parent
5451178c63
commit
74b94da6fa
1 changed files with 20 additions and 0 deletions
20
Makefile.common
Normal file
20
Makefile.common
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
ARCH_FLAGS =
|
||||||
|
STANDARD_FLAGS = -std=c++17 -nostdinc++ -nostdlib -nostdinc -Wno-sized-deallocation -fno-sized-deallocation
|
||||||
|
WARNING_FLAGS = -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough
|
||||||
|
FLAVOR_FLAGS = -fno-exceptions -fno-rtti
|
||||||
|
OPTIMIZATION_FLAGS = -Os
|
||||||
|
|
||||||
|
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
|
||||||
|
SERENITY_BASE_DIR := $(patsubst %/,%,$(dir $(MAKEFILE_PATH)))
|
||||||
|
|
||||||
|
INCLUDE_FLAGS = -I$(SERENITY_BASE_DIR) -I. -I$(SERENITY_BASE_DIR)/LibC -I$(SERENITY_BASE_DIR)/Servers
|
||||||
|
LDFLAGS = -L$(SERENITY_BASE_DIR)/LibC -L$(SERENITY_BASE_DIR)/LibCore -L$(SERENITY_BASE_DIR)/LibM -L$(SERENITY_BASE_DIR)/LibGUI
|
||||||
|
CLANG_FLAGS = -Wconsumed -m32 -ffreestanding -march=i686
|
||||||
|
#SUGGEST_FLAGS = -Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override #-Wsuggest-attribute=noreturn
|
||||||
|
DEFINES = -DSANITIZE_PTRS
|
||||||
|
CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(SUGGEST_FLAGS) $(INCLUDE_FLAGS) $(DEFINES)
|
||||||
|
#CXX = clang $(CLANG_FLAGS)
|
||||||
|
CXX = i686-pc-serenity-g++
|
||||||
|
LD = i686-pc-serenity-g++
|
||||||
|
AS = i686-pc-serenity-as
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue