Justfile & makefile changes

This commit is contained in:
Imbus 2024-12-14 14:16:38 +01:00
parent 1655cd83f5
commit 5712d3f51d
2 changed files with 31 additions and 2 deletions

19
Justfile Normal file
View file

@ -0,0 +1,19 @@
# List available actions
help:
@just -l
# Do a debug build
debug:
make -j$(nproc)
# Do a release build
release:
make -j$(nproc) RELEASE=1
# Watch and recompile on changes
watch:
watchexec -e c,cc,cpp,h,hpp -- make -j$(nproc)
# Clean up
clean:
make clean

View file

@ -1,6 +1,16 @@
CXX = g++
CXXFLAGS = -Wall -Wextra -Wpedantic -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -std=c++17
#CXXFLAGS += -Werror
CXXFLAGS = -Wall -Wextra -Wpedantic -Wshadow -Wnon-virtual-dtor \
-Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wconversion \
-Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -std=c++17
ifeq ($(RELEASE),)
CFLAGS += -g -O0
BUILD_TYPE = Debug
else
CXXFLAGS += -O3
CXXFLAGS += -Werror
BUILD_TYPE = Release
endif
SRC = $(wildcard *.cc)
HDR = $(wildcard *.h)