forked from id-Software/DOOM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake
More file actions
executable file
·39 lines (37 loc) · 1010 Bytes
/
Copy pathmake
File metadata and controls
executable file
·39 lines (37 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env bash
OS_NAME=`uname -s | tr A-Z a-z`
if [ "$OS_NAME" = "linux" ]; then
SDL_I=`sdl2-config --cflags`
SDL_L=`sdl2-config --libs`
if [ "$SDL_I" = "" ]; then
echo "'sdl2-config --cflags' didn't return anything - is SDL2 installed?)"
exit 1
fi
SDL_L="$SDL_L/SDL2"
elif [ "$OS_NAME" = "darwin" ]; then
BREW=`brew --prefix`
if [ "$BREW" = "" ]; then
echo "'brew --prefix' didn't return a path - is Homebrew installed?)"
exit 1
fi
SDL=`brew --prefix sdl2`
if [ "$SDL" = "" ]; then
echo "'brew --prefix sdl2' didn't return a path - is SDL2 installed?)"
exit 1
fi
SDL_I="-I$SDL/include/SDL2"
SDL_L="-L$SDL/lib"
fi
clang -g -Wall -DNORMALUNIX \
-Ithirdparty/platform \
-Ithirdparty/LittleMUS \
-Ithirdparty/Nuked-OPL3 \
-Ilinuxdoom-1.10 \
"$SDL_I" \
"$SDL_L" \
-lSDL2 \
linuxdoom-1.10/*.c \
thirdparty/platform/*.c \
thirdparty/LittleMUS/*.c \
thirdparty/Nuked-OPL3/*.c \
-o doom