2019-04-21 04:06:31 +02:00
|
|
|
ARCH_FLAGS =
|
2019-05-16 13:40:43 +02:00
|
|
|
STANDARD_FLAGS = -std=c++17 -Wno-sized-deallocation -fno-sized-deallocation
|
2019-12-17 21:42:42 +00:00
|
|
|
WARNING_FLAGS = -Werror -Wextra -Wall -Wno-nonnull-compare -Wno-deprecated-copy -Wno-address-of-packed-member -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -Wno-expansion-to-defined
|
2019-04-21 04:06:31 +02: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 10:15:00 +02:00
|
|
|
INCLUDE_FLAGS = \
|
|
|
|
-I. \
|
|
|
|
-I$(SERENITY_BASE_DIR) \
|
|
|
|
-I$(SERENITY_BASE_DIR)/Libraries \
|
|
|
|
-I$(SERENITY_BASE_DIR)/Libraries/LibC \
|
|
|
|
-I$(SERENITY_BASE_DIR)/Servers \
|
2019-11-13 21:49:24 +01:00
|
|
|
-I$(SERENITY_BASE_DIR)/Libraries/LibM \
|
|
|
|
-I$(SERENITY_BASE_DIR)/Libraries/LibPthread
|
2019-07-18 10:15:00 +02:00
|
|
|
|
|
|
|
LDFLAGS = \
|
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibC \
|
2019-11-16 12:22:02 +01:00
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibPthread \
|
2019-07-18 10:15:00 +02:00
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibCore \
|
2019-08-03 17:25:54 +02:00
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibIPC \
|
2019-07-18 10:15:00 +02:00
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibM \
|
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibDraw \
|
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibGUI \
|
2019-09-29 16:20:54 +02:00
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibHTML \
|
2019-10-02 22:33:24 +03:00
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibMarkdown \
|
2019-08-25 18:55:56 +03:00
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibThread \
|
2019-08-12 17:32:16 +02:00
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibVT \
|
2019-11-23 21:45:33 +01:00
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibProtocol \
|
2019-07-18 10:15:00 +02:00
|
|
|
-L$(SERENITY_BASE_DIR)/Libraries/LibAudio
|
|
|
|
|
2019-04-21 04:06:31 +02: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 19:24:05 +02:00
|
|
|
CXX = $(PRE_CXX) i686-pc-serenity-g++
|
2019-04-21 04:06:31 +02:00
|
|
|
LD = i686-pc-serenity-g++
|
|
|
|
AS = i686-pc-serenity-as
|
2019-09-16 00:33:04 +10:00
|
|
|
LINK = i686-pc-serenity-ld
|
2019-04-21 04:06:31 +02:00
|
|
|
|
2019-12-01 18:08:40 -06:00
|
|
|
DEFINES = -DSANITIZE_PTRS -DDEBUG -DGIT_COMMIT=\"`git rev-parse --short HEAD`\" -DGIT_BRANCH=\"`git rev-parse --abbrev-ref HEAD`\" -DGIT_CHANGES=\"`git diff-index --quiet HEAD -- && echo "tracked"|| echo "untracked"`\"
|
2019-08-03 19:41:02 +02:00
|
|
|
|
|
|
|
IPCCOMPILER = $(SERENITY_BASE_DIR)/DevTools/IPCCompiler/IPCCompiler
|