From b6bc440f5a4b0bd0da2e06f46984a21eeceb118c Mon Sep 17 00:00:00 2001 From: fedir Date: Sun, 17 Nov 2024 20:21:56 +0100 Subject: [PATCH] Basic Makefile --- Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8f47659 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ + +CC := gcc +CXX := g++ + +O_LDFLAGS := +O_CFLAGS := -O3 + +O_LDFLAGS_DEBUG := +O_CFLAGS_DEBUG := -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused -Weffc++ + +I_LDFLAGS := -lfuse3 -pthread +I_CFLAGS := -I/usr/include/fuse -D_FILE_OFFSET_BITS=64 + +SOURCES_DIR := ./sources +BUILD_DIR := ./build + +build: $(SOURCES_DIR)/main.cpp + $(CXX) $(O_CFLAGS) $(I_CFLAGS) $(SOURCES_DIR)/main.cpp $(O_LDFLAGS) $(I_LDFLAGS) -o $(BUILD_DIR)/icfs + +dev-build: $(SOURCES_DIR)/main.cpp + $(CXX) $(O_CFLAGS_DEBUG) $(I_CFLAGS) $(SOURCES_DIR)/main.cpp $(O_LDFLAGS_DEBUG) $(I_LDFLAGS) -o $(BUILD_DIR)/icfs