From 7b42232ad10bdb5585a5df9222dd9c15a1a63f80 Mon Sep 17 00:00:00 2001 From: KawaiiAmber Date: Wed, 25 May 2022 16:04:19 -0600 Subject: convert makefile to be more portable --- config.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'config.mk') diff --git a/config.mk b/config.mk index 37b4114..3a5e37f 100644 --- a/config.mk +++ b/config.mk @@ -1,12 +1,13 @@ _VERSION = 0.3.1 -VERSION = $(shell ./generate-version.sh $(_VERSION)) +VERSION = `./generate-version.sh $(_VERSION)` # paths PREFIX = /usr/local MANDIR = $(PREFIX)/share/man -# Default compile flags (overridable by environment) -CFLAGS ?= -g -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function -Wno-unused-variable -Wno-unused-result -Wdeclaration-after-statement +# Compile flags that can be used +#CFLAGS = -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function -Wno-unused-variable -Wno-unused-result -Wdeclaration-after-statement +XWAYLAND = # Uncomment to build XWayland support -#CFLAGS += -DXWAYLAND +#XWAYLAND = -DXWAYLAND -- cgit v1.2.3 From 14641560b0035402e699b0df0bea75f183ceb057 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Mon, 30 May 2022 16:18:31 -0500 Subject: include xcb only when building with xwayland support --- Makefile | 2 +- config.mk | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'config.mk') diff --git a/Makefile b/Makefile index cab513c..3371144 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ WAYLAND_PROTOCOLS = `pkg-config --variable=pkgdatadir wayland-protocols` WAYLAND_SCANNER = `pkg-config --variable=wayland_scanner wayland-scanner` # CFLAGS / LDFLAGS -PKGS = wlroots wayland-server xcb xkbcommon libinput +PKGS = wlroots wayland-server xkbcommon libinput $(XLIBS) DWLCFLAGS = `pkg-config --cflags $(PKGS)` $(DWLCPPFLAGS) $(CFLAGS) $(XWAYLAND) LDLIBS = `pkg-config --libs $(PKGS)` diff --git a/config.mk b/config.mk index 3a5e37f..ba24bb8 100644 --- a/config.mk +++ b/config.mk @@ -9,5 +9,7 @@ MANDIR = $(PREFIX)/share/man #CFLAGS = -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -Wno-sign-compare -Wno-unused-function -Wno-unused-variable -Wno-unused-result -Wdeclaration-after-statement XWAYLAND = +XLIBS = # Uncomment to build XWayland support #XWAYLAND = -DXWAYLAND +#XLIBS = xcb -- cgit v1.2.3 From 620fd9dc5666f11b322a7088a220f408636a77e3 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Mon, 8 Aug 2022 21:19:16 -0500 Subject: use `git describe` to generate version --- config.mk | 2 +- generate-version.sh | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100755 generate-version.sh (limited to 'config.mk') diff --git a/config.mk b/config.mk index ba24bb8..4638d5f 100644 --- a/config.mk +++ b/config.mk @@ -1,5 +1,5 @@ _VERSION = 0.3.1 -VERSION = `./generate-version.sh $(_VERSION)` +VERSION = `git describe --long --tags --dirty 2>/dev/null || echo $(_VERSION)` # paths PREFIX = /usr/local diff --git a/generate-version.sh b/generate-version.sh deleted file mode 100755 index cf408e1..0000000 --- a/generate-version.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -if git tag --contains HEAD | grep -q $1; then - echo $1 -else - branch="$(git rev-parse --abbrev-ref HEAD)" - commit="$(git rev-parse --short HEAD)" - if [ "${branch}" != "main" ]; then - echo $1-$branch-$commit - else - echo $1-$commit - fi -fi -- cgit v1.2.3