aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-05-20 17:44:44 +0100
committerMark Haines <mjark@negativecurvature.net>2016-05-20 17:44:44 +0100
commit63265f10def0737d6e7bf8966b1a5a294f740fbc (patch)
tree7e0ed14a599447dbffe4ae08a0d01039551ef101 /Makefile
parentff4d210d0563d3f201bd2f64a7666059de2f4be6 (diff)
Fix the Makefile so that it works with a clean git checkout
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index aa63c79..4f5adf2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
#!/usr/bin/make -f
-BUILD_DIR := build
+# Make sure that the build directory exists.
+# We can't check the build directory into git because it is empty.
+BUILD_DIR := $(shell mkdir -p build; echo build)
OPTIMIZE_FLAGS ?= -g -O3
TEST_OPTIMIZE_FLAGS ?= -g -O0
JS_OPTIMIZE_FLAGS ?= -O3
@@ -22,8 +24,8 @@ JS_PRE := $(wildcard javascript/*pre.js)
JS_POST := $(wildcard javascript/*post.js)
CPPFLAGS += -Iinclude -Ilib
-CFLAGS += -Wall --std=c89 -fPIC
-CXXFLAGS += -Wall --std=c++11 -fPIC
+CFLAGS += -Wall -std=c89 -fPIC
+CXXFLAGS += -Wall -std=c++11 -fPIC
LDFLAGS += -Wall
EMCCFLAGS = --closure 1 --memory-init-file 0 -s NO_FILESYSTEM=1 -s INVOKE_RUN=0