X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=Makefile;h=50d829efd50bd2dd0e0a78c4936fc197771c5b8f;hp=c1d7a6dd2e389348f9d498e192438bb3cebb823c;hb=refs%2Fheads%2FDefaultUser%2Frelease_note_generator;hpb=0f0844c144c5f51e2a6301e776fbcd167667dd0e diff --git a/Makefile b/Makefile index c1d7a6dd..50d829ef 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ SERVER = xonotic-local-dedicated # use CFLAGS to set default optimisations and support user override CFLAGS ?= -pipe -march=native -mtune=native -flto=auto # user can override this with make -j -MAKEFLAGS = -j$(shell nproc) +MAKEFLAGS := -j$(shell nproc) # DP makefile overrides CFLAGS (exporting CFLAGS does work for d0_blind_id but so does this) export CC += $(CFLAGS) @@ -28,38 +28,38 @@ export DP_LINK_CRYPTO_RIJNDAEL=shared .PHONY: help help: @echo - @echo " ===== Xonotic Makefile for stable and beta releases =====" + @printf " \e[1;33m===== Xonotic Makefile for stable and beta releases =====\e[m\n" @echo - @echo "The DarkPlaces engine builds will be named $(CLIENT) and $(SERVER) and" - @echo "will be preferred by the xonotic-linux-sdl.sh and xonotic-linux-dedicated.sh scripts." + @printf "The DarkPlaces Engine builds will be named \e[1m$(CLIENT) \e[mand \e[1m$(SERVER)\e[m\n" + @printf "and will be preferred by \e[1mxonotic-linux-sdl.sh \e[mand \e[1mxonotic-linux-dedicated.sh \e[mscripts.\n" @echo - @echo "For more info, see https://gitlab.com/xonotic/xonotic/-/wikis/Compiling" + @printf "More info is available at \e[1;36mhttps://gitlab.com/xonotic/xonotic/-/wikis/Compiling\e[m\n" @echo - @echo "-O3 is already enabled for DarkPlaces. Do not add any math flags!" + @echo "-O3 is already enabled for DarkPlaces Engine. Do not add any math flags!" @echo - @echo "MAKEFLAGS=$(MAKEFLAGS)" - @echo "CFLAGS= $(CFLAGS)" + @echo "MAKEFLAGS=$(MAKEFLAGS)" + @echo "CFLAGS= $(CFLAGS)" @echo - @echo " make clean-sources Delete build objects" - @echo " make clean Delete engine builds and build objects" + @echo " make clean-sources Delete build objects" + @echo " make clean Delete engine builds and build objects" @echo - @echo " make update-stable Update to the latest stable release via rsync" - @echo " make update-beta Update to the latest daily autobuild via rsync" + @echo " make update-stable Update to the latest stable release via rsync" + @echo " make update-beta Update to the latest daily autobuild via rsync" @echo - @echo " make server Compile $(SERVER)" - @echo " make client Compile $(CLIENT)" - @echo " make both" + @printf " make server Compile \e[1m$(SERVER)\e[m\n" + @printf " make client Compile \e[1m$(CLIENT)\e[m\n" + @echo " make both" @echo -.PHONY: nogit -nogit: - @if [ -d .git ]; then \ - echo "To compile from git sources, please use ./all instead!"; \ - exit 1; \ - fi +GIT := $(shell [ -d .git ] && printf "\e[1;31mTo compile from git, please read https://gitlab.com/xonotic/xonotic/-/wikis/Repository_Access\e[m") +ifdef GIT + $(error $(GIT)) +endif + +.EXTRA_PREREQS := $(findstring update-stable,$(MAKECMDGOALS)) $(findstring update-beta,$(MAKECMDGOALS)) .PHONY: clean-sources -clean-sources: nogit +clean-sources: $(MAKE) -C $(DPSRC) clean $(MAKE) -C $(D0SRC) clean @@ -68,18 +68,18 @@ clean: clean-sources $(RM) $(CLIENT) $(SERVER) .PHONY: update-stable -update-stable: nogit +update-stable: misc/tools/rsync-updater/update-to-release.sh .PHONY: update-beta -update-beta: nogit +update-beta: misc/tools/rsync-updater/update-to-autobuild.sh $(D0SRC)/Makefile: ( cd $(D0SRC) && ./autogen.sh && ./configure --enable-static --disable-shared ) .PHONY: d0_blind_id -d0_blind_id: nogit $(D0SRC)/Makefile +d0_blind_id: $(D0SRC)/Makefile $(MAKE) -C $(D0SRC) .PHONY: server