2022-08-18 22:58:41 +02:00
|
|
|
MAKEFLAGS="-j $(grep -c ^processor /proc/cpuinfo)"
|
|
|
|
|
2023-01-15 02:28:39 +01:00
|
|
|
MAJOR := 4
|
|
|
|
MINOR := 0
|
|
|
|
PATCH := 0
|
2023-01-14 22:48:15 +01:00
|
|
|
COMMIT := gc$(shell git rev-parse --short HEAD 2>/dev/null)
|
|
|
|
|
|
|
|
ifeq ($(COMMIT),gc)
|
2023-01-15 00:37:11 +01:00
|
|
|
COMMIT = gcunknown
|
2023-01-14 22:48:15 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
VERSION := $(MAJOR).$(MINOR).$(PATCH)-dev+$(COMMIT)
|
|
|
|
|
2022-10-14 14:40:01 +02:00
|
|
|
CXXFLAGS:=$(CXXFLAGS) -std=c++20 -Wall -Wextra -Werror=switch -Werror=return-type -Werror=unused-result
|
2023-01-06 16:53:58 +01:00
|
|
|
CPPFLAGS:=$(CPPFLAGS) -DMusique_Version='"$(VERSION)"' \
|
2023-02-20 18:16:20 +01:00
|
|
|
-Ilib/expected/ -I. -Ilib/bestline/ -Ilib/rtmidi/ -Ilib/link/include -Ilib/asio/include/ -Ilib/edit_distance.cc/
|
2022-10-08 20:32:41 +02:00
|
|
|
LDFLAGS=-flto
|
2022-10-14 14:40:01 +02:00
|
|
|
LDLIBS= -lpthread
|
2022-08-18 22:58:41 +02:00
|
|
|
|
2022-09-25 12:01:19 +02:00
|
|
|
RELEASE_FLAGS=-O2
|
2022-08-18 22:58:41 +02:00
|
|
|
DEBUG_FLAGS=-O0 -ggdb -fsanitize=undefined -DDebug
|
|
|
|
|
2022-10-14 15:56:36 +02:00
|
|
|
ifeq ($(shell uname),Darwin)
|
|
|
|
os=macos
|
2022-10-08 20:32:41 +02:00
|
|
|
else
|
2022-10-14 15:56:36 +02:00
|
|
|
os=linux
|
2022-10-08 20:32:41 +02:00
|
|
|
endif
|
2022-08-18 22:58:41 +02:00
|
|
|
|