-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (38 loc) · 995 Bytes
/
Makefile
File metadata and controls
54 lines (38 loc) · 995 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
CPLUSPLUS?=g++
CPPFLAGS=-std=c++11 -Wall -W
ifeq ($(NDEBUG),1)
CPPFLAGS+= -O3
else
#CPPFLAGS+=
endif
LDFLAGS=-pthread
PWD=$(shell pwd)
SRC=$(wildcard *.cc)
BIN=$(SRC:%.cc=.noshit/%)
OS=$(shell uname)
ifeq ($(OS),Darwin)
CPPFLAGS+= -stdlib=libc++ -x objective-c++ -fobjc-arc
LDFLAGS+= -framework Foundation
endif
.PHONY: all clean update indent serve s browse b
LOGS_FILENAME="/var/log/current.jsonlines"
all: build build/browser build/gen_insights build/v2 build/gen_cube
serve: build build/v2
[ -f ${LOGS_FILENAME} ] && tail -n +1 -f ${LOGS_FILENAME} | ./build/v2 --output_uri_prefix=http://localhost:3000 || echo "Build successful."
s: serve
browse: build build/browser
./build/browser
b: browse
build/v2: build v2.cc
build:
mkdir -p build
clean:
rm -rf build
build/%: %.cc *.h
${CPLUSPLUS} ${CPPFLAGS} -o $@ $< ${LDFLAGS}
update:
(cd .. ; git submodule update --init --recursive)
indent:
../Current/scripts/indent.sh
check:
../Current/scripts/check-all-headers.sh