2019-04-21 02:06:31 +00:00
|
|
|
ARCH_FLAGS =
|
2019-05-16 11:40:43 +00:00
|
|
|
STANDARD_FLAGS = -std=c++17 -Wno-sized-deallocation -fno-sized-deallocation
|
2019-07-09 13:46:22 +00:00
|
|
|
WARNING_FLAGS = -Werror -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -Wno-expansion-to-defined
|
2019-04-21 02:06:31 +00:00
|
|
|
FLAVOR_FLAGS = -fno-exceptions -fno-rtti
|
|
|
|
OPTIMIZATION_FLAGS = -Os
|
|
|
|
|
|
|
|
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
|
|
|
|
SERENITY_BASE_DIR := $(patsubst %/,%,$(dir $(MAKEFILE_PATH)))
|
|
|
|
|
2019-07-18 08:15:00 +00:00
|
|
|
INCLUDE_FLAGS = \
|
|
|
|
-I. \
|
|
|
|
-I$(SERENITY_BASE_DIR) \
|
|
|
|
-I$(SERENITY_BASE_DIR)/Libraries \
|
|
|
|
-I$(SERENITY_BASE_DIR)/Libraries/LibC \
|
|
|
|
-I$(SERENITY_BASE_DIR)/Servers \
|
|
|
|
-I$(SERENITY_BASE_DIR)/Libraries/LibM
|
|
|
|
|
|
|
|
LDFLAGS = \
|
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibC \
|
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibCore \
|
2019-08-03 15:25:54 +00:00
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibIPC \
|
2019-07-18 08:15:00 +00:00
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibM \
|
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibDraw \
|
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibGUI \
|
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibAudio
|
|
|
|
|
2019-04-21 02:06:31 +00:00
|
|
|
CLANG_FLAGS = -Wconsumed -m32 -ffreestanding -march=i686
|
|
|
|
#SUGGEST_FLAGS = -Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override #-Wsuggest-attribute=noreturn
|
|
|
|
CXXFLAGS = -MMD -MP $(WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(FLAVOR_FLAGS) $(ARCH_FLAGS) $(STANDARD_FLAGS) $(SUGGEST_FLAGS) $(INCLUDE_FLAGS) $(DEFINES)
|
|
|
|
#CXX = clang $(CLANG_FLAGS)
|
2019-07-09 17:24:05 +00:00
|
|
|
CXX = $(PRE_CXX) i686-pc-serenity-g++
|
2019-04-21 02:06:31 +00:00
|
|
|
LD = i686-pc-serenity-g++
|
|
|
|
AS = i686-pc-serenity-as
|
|
|
|
|
2019-04-23 19:52:02 +00:00
|
|
|
DEFINES = -DSANITIZE_PTRS -DDEBUG
|
2019-08-03 17:41:02 +00:00
|
|
|
|
|
|
|
IPCCOMPILER = $(SERENITY_BASE_DIR)/DevTools/IPCCompiler/IPCCompiler
|