forked from mcdee/blockparser
-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
59 lines (46 loc) · 1.31 KB
/
Makefile
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
SHELL := /bin/sh
MAKEFLAGS := -j8
PYTHONPATH := ../python-bitcoinlib
CPLUS := g++
INC += -I. -DNDEBUG
COPT += -pg -g0 -O6 -m64 -Wall -msse3 -Wextra -Wformat -pedantic -std=c++0x
COPT += -ffast-math -fno-check-new -funroll-loops -Wno-deprecated
COPT += -fstrict-aliasing -Wformat-security -Wstrict-aliasing=2
COPT += -Wno-variadic-macros -Wno-unused-variable -Wno-unused-parameter
LIBS := -lcrypto -ldl
SOURCES := $(wildcard *.cpp cb/*.cpp)
OBJS := $(addprefix .objs/, $(notdir $(SOURCES:.cpp=.o)))
export
all: parser
env:
$@
.objs/%.o: %.cpp
@mkdir -p .deps
@mkdir -p .objs
$(CPLUS) -MD $(CXXFLAGS) $(INC) $(COPT) -c $< -o $@
mv -f $(@:.o=.d) .deps
.objs/%.o: cb/%.cpp
@mkdir -p .deps
@mkdir -p .objs
$(CPLUS) -MD $(CXXFLAGS) $(INC) $(COPT) -c $< -o $@
mv -f $(@:.o=.d) .deps
parser: $(OBJS)
$(CPLUS) $(LOPT) $(COPT) -o parser $(OBJS) $(LIBS)
clean:
-rm -r -f *.o *.i .objs .deps *.d parser
%.test: %.py
python3 ./$<
%.run: %.py
./$<
%.doctest: %.py
python3 -m doctest $<
python -m doctest $<
doctests: script.doctest blockparse.doctest
%.parse: # parse a compiled script
python3 script.py parse $* '' True
-include .deps/*
%.ini: %.ini.template
envsubst < $< > $@
serve: blockexplorer.ini
uwsgi --ini $< || echo If it failed due to a missing file, you may \
need to: sudo apt-get install uwsgi-plugin-python3