Skip to content

Commit

Permalink
update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
aquaherd committed Mar 2, 2024
1 parent 63e81fa commit e1adaff
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@
CMAKE_BUILD_TYPE ?= RelWithDebInfo # sane, strip later on
CMAKE_INSTALL_PREFIX ?= /usr # panel plugins only work here
CMAKE_GENERATOR ?= $(shell (command -v ninja > /dev/null 2>&1 && echo "Ninja") || echo "Unix Makefiles")
CMAKE_MAKEFILE = $(shell test "$(CMAKE_GENERATOR)" = "Ninja" && echo "Makefile" || echo "build.ninja" )

.PHONY: default info cmake install deb rpm

default: cmake

info:
@echo '*** you can override these ***'
@echo "CMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE)"
@echo "CMAKE_INSTALL_PREFIX=$(CMAKE_INSTALL_PREFIX)"
@echo "CMAKE_GENERATOR=$(CMAKE_GENERATOR)"
@echo '*** this one depends on CMAKE_GENERATOR ***'

./build:
cmake -B build -G $(CMAKE_GENERATOR) -DCMAKE_BUILD_TYPE=$(CMAKE_BUILD_TYPE) -DCMAKE_INSTALL_PREFIX=$(CMAKE_INSTALL_PREFIX)

Expand Down

0 comments on commit e1adaff

Please sign in to comment.