From d9282b7f8695b5e68855d73927e1586e5feb1747 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Sat, 1 May 2021 12:04:52 +0200 Subject: [PATCH] Add EXTRA_CFLAGS with -Werror for CI --- .github/workflows/main.yml | 1 + README.md | 1 + config.mk | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3cb7e61..ee82ba5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,6 +25,7 @@ jobs: env: CC: ${{ matrix.CC }} + EXTRA_CFLAGS: "-Werror" steps: - uses: actions/checkout@v2 with: diff --git a/README.md b/README.md index 323a54f..83cb309 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,7 @@ sudo make install - `WAYLAND=(0|1)`: Disable/Enable wayland support. (Default: 1 (enabled)) - `SERVICEDIR_SYSTEMD=`: The path to put the systemd user service file. Unused, if `SYSTEMD=0`. (Default: detected via `pkg-config`) - `SERVICEDIR_DBUS=`: The path to put the dbus service file. (Default: detected via `pkg-config`) +- `EXTRA_CFLAGS=`: Additional flags for the compiler. **Make sure to run all make calls with the same parameter set. So when building with `make PREFIX=/usr`, you have to install it with `make PREFIX=/usr install`, too.** diff --git a/config.mk b/config.mk index 54426a7..fa664bc 100644 --- a/config.mk +++ b/config.mk @@ -6,6 +6,7 @@ DATADIR ?= ${PREFIX}/share # around for backwards compatibility MANPREFIX ?= ${DATADIR}/man MANDIR ?= ${MANPREFIX} +EXTRA_CFLAGS ?= DOXYGEN ?= doxygen FIND ?= find @@ -36,7 +37,7 @@ endif # flags DEFAULT_CPPFLAGS = -D_DEFAULT_SOURCE -DVERSION=\"${VERSION}\" -DEFAULT_CFLAGS = -g --std=gnu99 -pedantic -Wall -Wno-overlength-strings -Os ${STATIC} ${ENABLE_WAYLAND} +DEFAULT_CFLAGS = -g --std=gnu99 -pedantic -Wall -Wno-overlength-strings -Os ${STATIC} ${ENABLE_WAYLAND} ${EXTRA_CFLAGS} DEFAULT_LDFLAGS = -lm -lrt CPPFLAGS_DEBUG := -DDEBUG_BUILD