]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
Makefile: change default binary names to match .desktop and downstreams
authorbones_was_here <bones_was_here@xonotic.au>
Mon, 14 Apr 2025 18:18:33 +0000 (04:18 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Mon, 14 Apr 2025 18:33:03 +0000 (04:33 +1000)
Also makes them customisable without editing.

Makefile
xonotic-linux-sdl.sh

index a4cc899e4d07927cd609319964dbfd70285a8e57..d03994343929fde89b1d27e064d3995f69ce80bf 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 DPSRC = source/darkplaces
 D0SRC = source/d0_blind_id
-CLIENT = xonotic-local-sdl
-SERVER = xonotic-local-dedicated
+CLIENTBIN ?= xonotic-sdl
+SERVERBIN ?= xonotic-dedicated
 
 # CC and MAKEFLAGS are always set so ?= has no effect, therefore
 # we use CFLAGS to set default optimisations which users may override
@@ -26,7 +26,7 @@ help:
        @echo
        @printf "     \e[1;33m===== Xonotic Makefile for stable and beta releases =====\e[m\n"
        @echo
-       @printf "The new executables will be named \e[1;32m$(CLIENT) \e[mand \e[1;32m$(SERVER)\e[m\n"
+       @printf "The new executables will be named \e[1;32m$(CLIENTBIN) \e[mand \e[1;32m$(SERVERBIN)\e[m\n"
        @printf "and will be preferred by the \e[1;32mxonotic-linux-sdl.sh \e[mand \e[1;32mxonotic-linux-dedicated.sh \e[mscripts\n"
        @echo   "which are used to play with the SDL client or host a dedicated server (respectively)."
        @echo
@@ -47,8 +47,8 @@ help:
        @echo   "  make update-stable         Update to the latest stable release via rsync"
        @echo   "  make update-beta           Update to the latest beta autobuild via rsync"
        @echo
-       @printf "  make server                Compile \e[1;32m$(SERVER)\e[m\n"
-       @printf "  make client                Compile \e[1;32m$(CLIENT)\e[m\n"
+       @printf "  make server                Compile \e[1;32m$(SERVERBIN)\e[m\n"
+       @printf "  make client                Compile \e[1;32m$(CLIENTBIN)\e[m\n"
        @echo   "  make both"
        @echo
 
@@ -70,7 +70,7 @@ clean-sources: .EXTRA_PREREQS =  # prevents circular dependency
 
 .PHONY: clean
 clean: clean-sources
-       $(RM) $(CLIENT) $(SERVER)
+       $(RM) $(CLIENTBIN) $(SERVERBIN)
 
 .PHONY: update-stable
 update-stable:
@@ -88,20 +88,20 @@ $(D0SRC)/.libs/libd0_blind_id.a $(D0SRC)/.libs/libd0_rijndael.a:
 
 $(DPSRC)/darkplaces-dedicated: $(D0SRC)/.libs/libd0_blind_id.a
        $(MAKE) -C $(DPSRC) sv-release
-$(SERVER): $(DPSRC)/darkplaces-dedicated
-       cp $(DPSRC)/darkplaces-dedicated $(SERVER)
+$(SERVERBIN): $(DPSRC)/darkplaces-dedicated
+       cp $(DPSRC)/darkplaces-dedicated $(SERVERBIN)
 
 $(DPSRC)/darkplaces-sdl: $(D0SRC)/.libs/libd0_blind_id.a
        $(MAKE) -C $(DPSRC) sdl-release
-$(CLIENT): $(DPSRC)/darkplaces-sdl
-       cp $(DPSRC)/darkplaces-sdl $(CLIENT)
+$(CLIENTBIN): $(DPSRC)/darkplaces-sdl
+       cp $(DPSRC)/darkplaces-sdl $(CLIENTBIN)
 
 
 .PHONY: server
-server: $(SERVER)
+server: $(SERVERBIN)
 
 .PHONY: client
-client: $(CLIENT)
+client: $(CLIENTBIN)
 
 .PHONY: both
 both: client server
index be8feddf5fd666a502a77840ca8e98c683bd3804..027b1ee62b2e80769a8141aca4920ffd796860c6 100755 (executable)
@@ -17,7 +17,7 @@ case $(uname):$(uname -m) in
 esac
 
 # prefer locally built binary if available (see: Makefile)
-xonotic="xonotic-local-${mode}"
+xonotic="xonotic-${mode}"
 [ -x "$xonotic" ] || xonotic="xonotic-${arch}-${mode}"
 echo "Executing: $xonotic ${*}"