config.mk (1714B)
1 PROJECT = kranewm 2 BAR = kranebar 3 CLIENT = kranec 4 5 DEPENDENCIES = x11 xinerama xres libprocps spdlog 6 7 OBJDIR = obj 8 SRCDIR = src 9 10 BINDIR = bin 11 INSTALLDIR = /usr/local/bin 12 13 BAR_SRC_FILES := $(wildcard src/bar/*.cc) 14 BAR_OBJ_FILES := $(patsubst src/bar/%.cc,obj/bar/%.o,${BAR_SRC_FILES}) 15 16 CLIENT_SRC_FILES := $(wildcard src/client/*.cc) 17 CLIENT_OBJ_FILES := $(patsubst src/client/%.cc,obj/client/%.o,${CLIENT_SRC_FILES}) 18 19 CORE_SRC_FILES := $(wildcard src/core/*.cc) 20 CORE_OBJ_FILES := $(patsubst src/core/%.cc,obj/core/%.o,${CORE_SRC_FILES}) 21 22 WINSYS_SRC_FILES := $(wildcard src/winsys/*.cc) 23 WINSYS_OBJ_FILES := $(patsubst src/winsys/%.cc,obj/winsys/%.o,${WINSYS_SRC_FILES}) 24 25 X_DATA_SRC_FILES := $(wildcard src/winsys/xdata/*.cc) 26 X_DATA_OBJ_FILES := $(patsubst src/winsys/xdata/%.cc,obj/winsys/xdata/%.o,${X_DATA_SRC_FILES}) 27 28 WINSYS_LINK_FILES := ${WINSYS_OBJ_FILES} ${X_DATA_OBJ_FILES} 29 BAR_LINK_FILES := ${WINSYS_OBJ_FILES} ${X_DATA_OBJ_FILES} ${BAR_OBJ_FILES} 30 CLIENT_LINK_FILES := ${WINSYS_OBJ_FILES} ${X_DATA_OBJ_FILES} ${CLIENT_OBJ_FILES} 31 CORE_LINK_FILES := ${WINSYS_OBJ_FILES} ${X_DATA_OBJ_FILES} ${CORE_OBJ_FILES} 32 33 H_FILES := $(shell find $(SRCDIR) -name '*.hh') 34 SRC_FILES := $(shell find $(SRCDIR) -name '*.cc') 35 OBJ_FILES := ${WINSYS_OBJ_FILES} ${X_DATA_OBJ_FILES} ${CORE_OBJ_FILES} 36 DEPS = $(OBJ_FILES:%.o=%.d) 37 38 SANFLAGS = -fsanitize=undefined -fsanitize=address -fsanitize-address-use-after-scope 39 CXXFLAGS = -std=c++20 `pkg-config --cflags ${DEPENDENCIES}` 40 LDFLAGS = `pkg-config --libs ${DEPENDENCIES}` -pthread 41 42 DEBUG_CXXFLAGS = -Wall -Wpedantic -Wextra -Wold-style-cast -g -DDEBUG ${SANFLAGS} 43 DEBUG_LDFLAGS = ${SANFLAGS} 44 RELEASE_CXXFLAGS = -march=native -mtune=native -O3 -flto 45 RELEASE_LDFLAGS = -flto 46 47 CC = g++