Uh oh!
There was an error while loading. Please reload this page.
forked from alexrenz/AdaPM
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
Latest commit
78 lines (55 loc) · 1.38 KB
/
Copy pathMakefile
File metadata and controls
78 lines (55 loc) · 1.38 KB
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
ifdefconfig
include$(config)
endif
include make/ps.mk
ifndefCXX
CXX = g++
endif
ifndefDEPS_PATH
DEPS_PATH = $(shell pwd)/deps
endif
ifndefBUILD_PATH
BUILD_PATH = build
endif
ifndefPROTOC
PROTOC = ${DEPS_PATH}/bin/protoc
endif
ifndefPROTOC
PROTOC = ${DEPS_PATH}/bin/protoc
endif
ifdefCXX11_ABI
ABI := -D_GLIBCXX_USE_CXX11_ABI=$(CXX11_ABI)
endif
ifdefKEY_TYPE
ADD_CFLAGS += -DKEY_TYPE=$(KEY_TYPE)
endif
INCPATH = -I./src -I./include -I$(DEPS_PATH)/include
CFLAGS = -std=c++14 -msse2 -fPIC -O3 -ggdb -march=native -Wall -finline-functions $(ABI)$(INCPATH)$(ADD_CFLAGS)
all: ps tests apps
include make/deps.mk
clean:
rm -rf $(BUILD_PATH)
clean-all: clean
find src -name "*.pb.[ch]*" -delete
rm -rf $(DEPS_PATH)
rm -rf deps/
rm -rf deps_bindings/
rm -rf protobuf-*
lint:
python tests/lint.py ps all include/ps src
ps: $(BUILD_PATH)/libps.a
OBJS = $(addprefix$(BUILD_PATH)/, customer.o postoffice.o van.o meta.pb.o)
$(BUILD_PATH)/libps.a: $(OBJS)
ar crv $@$(filter%.o, $?)
$(BUILD_PATH)/%.o: src/%.cc ${ZMQ} src/meta.pb.h
@mkdir -p $(@D)
$(CXX)$(INCPATH) -std=c++14 -MM -MT $(BUILD_PATH)/$*.o $<>$(BUILD_PATH)/$*.d
$(CXX)$(CFLAGS) -c $< -o $@
src/%.pb.ccsrc/%.pb.h : src/%.proto ${PROTOBUF}
$(PROTOC) --cpp_out=./src --proto_path=./src $<
-include$(BUILD_PATH)/*.d
-include$(BUILD_PATH)/*/*.d
include tests/test.mk
tests: $(TESTS)
include apps/apps.mk
apps: $(APPS)