Add features to Makefile

make release - compiles with clang, uses more aggressive compilation
flags for errors/warnings.
CC=tcc/gcc/clang make - lets you select your wanted compiler.
This commit is contained in:
2026-06-28 18:03:05 -04:00
parent e8199f6d33
commit 1024a222be
17 changed files with 5126 additions and 9 deletions
+14 -7
View File
@@ -5,15 +5,17 @@ VERSION = `git describe --tags --dirty 2>/dev/null || echo 0.2`
PREFIX = /usr/local
PKG_CONFIG = pkg-config
# Auto-detect compiler: TCC > Clang > GCC
ifeq ($(shell which tcc 2>/dev/null),)
ifeq ($(shell which clang 2>/dev/null),)
CC = gcc
# Auto-detect compiler: TCC > Clang > GCC (only if CC not set)
ifeq ($(origin CC),default)
ifeq ($(shell which tcc 2>/dev/null),)
ifeq ($(shell which clang 2>/dev/null),)
CC = gcc
else
CC = clang
endif
else
CC = clang
CC = tcc
endif
else
CC = tcc
endif
# Uncomment to build without XWayland support
@@ -47,6 +49,11 @@ all: peachwm smsg/smsg
package:
$(MAKE) MARCH=
release: CC = clang
release: CFLAGS += -Werror -Wpedantic -Wmissing-prototypes -Wstrict-prototypes \
-Wold-style-definition -Wmissing-declarations -Wimplicit-fallthrough
release: peachwm smsg/smsg
# Compositor
peachwm: src/peachwm.o src/util.o parser/parser.o \