blob: 8244c49358e7c86c10d666deff916a0cd4ea91b7 (
plain) (
blame)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
#!/bin/sh
ThisDir="$(dirname "$(readlink -f "$0")")"
cd "$ThisDir"
mkdir ../build > /dev/null 2>&1
# Supported: clang
Compiler="clang"
CompilerFlags="
-O0
-ggdb
-g3
-DHANDMADE_INTERNAL
-DHANDMADE_SLOW
-DOS_LINUX
-DHANDMADE_SMALL_RESOLUTION
-nostdinc++
"
WarningFlags="-Wall
-Wextra
-Wno-sign-compare
-Wno-unused-but-set-variable
-Wno-unused-variable
-Wno-write-strings
-Wno-pointer-arith
-Wno-unused-parameter
-Wno-unused-function
-Wno-int-to-pointer-cast
-Wno-missing-field-initializers
"
ClangCompilerFlags="
-fdiagnostics-absolute-paths
-ftime-trace
"
ClangWarningFlags="
-Wno-null-dereference
-Wno-missing-braces
-Wno-vla-extension
-Wno-writable-strings
-Wno-address-of-temporary
-Wno-reorder-init-list
"
# Platform specific linker flags
LinuxLinkerFlags="
-lpthread
-lasound
-lcurl
-lm
-lX11
-lXfixes"
if [ "$Compiler" = "clang" ]
then
CompilerFlags="$CompilerFlags $ClangCompilerFlags"
WarningFlags="$WarningFlags $ClangWarningFlags"
fi
printf 'linux_handmade.cpp\n'
$Compiler \
$CompilerFlags \
$WarningFlags \
-o ../build/linux_handmade \
$LinuxLinkerFlags \
libs/linuxhmh/linux_handmade.cpp
printf 'handmade.cpp\n'
$Compiler \
$CompilerFlags \
$WarningFlags \
-fPIC \
-shared \
-o ../build/handmade.so \
handmade.cpp
|