diff --git a/src/Makefile.d/nix.mk b/src/Makefile.d/nix.mk
index c4fa3640f8e4cfaecfa339c5356d1a0f4ee6fb46..d06544667118ad8cde12d7f41f286e8c9a561a1b 100644
--- a/src/Makefile.d/nix.mk
+++ b/src/Makefile.d/nix.mk
@@ -2,8 +2,6 @@
 # Makefile options for unices (linux, bsd...)
 #
 
-EXENAME?=lsdl2srb2
-
 opts+=-DUNIXCOMMON -DLUA_USE_POSIX
 # Use -rdynamic so a backtrace log shows function names
 # instead of addresses
@@ -17,9 +15,18 @@ endif
 ifndef DEDICATED
 ifndef DUMMY
 SDL?=1
+DEDICATED?=0
 endif
 endif
 
+ifeq (${SDL},1)
+EXENAME?=lsdl2srb2
+endif
+
+ifeq (${DEDICATED},1)
+EXENAME?=lsrb2d
+endif
+
 # In common usage.
 ifdef LINUX
 libs+=-lrt