Skip to content

Instantly share code, notes, and snippets.

@porty
Last active August 29, 2015 14:07
Show Gist options
  • Save porty/a2efe7588f311bd63ec5 to your computer and use it in GitHub Desktop.
Save porty/a2efe7588f311bd63ec5 to your computer and use it in GitHub Desktop.
Doom Legacy on Mac

Extract source tarball, run make:

$ make
make: sdl-config: Command not found
g++ -std=c++11 -Wall -MP -MMD -g -O0 -mwindows -D__WIN32__ -DSDL -DNO_MIXER  -Iinclude -c src/engine/g_game.cpp -o build/engine/g_game.o
clang: error: unknown argument: '-mwindows'
make: *** [build/engine/g_game.o] Error 1

Alter Makefile to only define LINUX (even though we're on Mac/Darwin)

diff --git a/Makefile b/Makefile
index 218b823..ce3b8c3 100644
--- a/Makefile
+++ b/Makefile
@@ -31,12 +31,12 @@ PARSER_OBJS := $(BUILDDIR)/ntexture.parser.o \


 # Platform autodetect
-UNAME = $(shell uname)
-ifeq ($(UNAME),Linux)
+#UNAME = $(shell uname)
+#ifeq ($(UNAME),Linux)
   export LINUX=1
-else
-  export WIN=1
-endif
+#else
+#  export WIN=1
+#endif


 ###  C flags
$ make
make: sdl-config: Command not found
g++ -std=c++11 -Wall -MP -MMD -g -O0 -DLINUX -DSDL  -Iinclude -c src/engine/g_game.cpp -o build/engine/g_game.o
In file included from src/engine/g_game.cpp:25:
In file included from include/command.h:29:
include/doomtype.h:61:11: fatal error: 'SDL_types.h' file not found
# include "SDL_types.h"
          ^
1 error generated.
make: *** [build/engine/g_game.o] Error 1

Install SDL2 libraries:

$ brew install sdl2

Replace all mention of sdl-config with sdl2-config:

# Example command, I didn't actually run this, I cheated and used a text editor
$ sed -i -e /sdl-config/sdl2-config/g Makefile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment