-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
62 lines (45 loc) · 2.07 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
60
61
62
PLATFORM := $(shell uname)
ifeq ($(PLATFORM),Linux)
# set for docker image
CC =/opt/x-toolchain/bin/x86_64-nptl-linux-gnu-gcc
CXX=/opt/x-toolchain/bin/x86_64-nptl-linux-gnu-g++
MONO=/usr/bin/mono
BOOSTDIR=/opt/boost_1_67_0
FDB=/opt/foundation/foundationdb
ACTORCOMPILER=$(FDB)/bin/actorcompiler.exe
CFLAGS +=
CXXFLAGS += -std=c++14 -g -Wno-deprecated -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -DUSE_UCONTEXT -DNO_INTELLISENSE
INCLUDE = -I$(BOOSTDIR) -I$(FDB)
LFLAGS = $(FDB)/lib/libflow.a -Bstatic -ldl -lpthread -lrt -lfdb_c -Bdynamic /opt/x-toolchain/x86_64-nptl-linux-gnu/lib64/libstdc++.a -lm
#LFLAGS = $(FDB)/lib/libflow.a $(FDB)/lib/libfdb_flow.a -Bstatic -ldl -lpthread -lrt -lfdb_c -Bdynamic /opt/x-toolchain/x86_64-nptl-linux-gnu/lib64/libstdc++.a -lm
LDFLAGS = -L/usr/local/lib -L$(FDB)/lib -L/opt/x-toolchain/x86_64-nptl-linux-gnu/lib64/
else ifeq ($(PLATFORM),Darwin)
CC = /usr/bin/clang
CXX = /usr/bin/clang++
CFLAGS += -mmacosx-version-min=10.7 -stdlib=libc++
LDFLAGS := -lflow -framework IOKit -framework CoreFoundation
LFLAGS += -Lflow -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/IOKit.framework/
INCLUDE = -I. -Iboost_1_67_0
CXXFLAGS += -g -std=c++11 -msse4.2 -Wno-undefined-var-template -Wno-unknown-warning-option
endif
TARGETS = hello calc void loop
.cpp.o:
$(CXX) $(CXXFLAGS) $(INCLUDE) -c $< -o $@
%.actor.g.cpp: %.actor.cpp $(ACTORCOMPILER)
@echo "Actorcompiling $<"
@$(MONO) $(ACTORCOMPILER) $< $@
.PRECIOUS: %.actor.g.cpp
all: $(TARGETS)
hello: hello.o
$(CXX) $(CXXFLAGS) $(INCLUDE) $< $(LFLAGS) -o $@ $(LDFLAGS)
calc: calc.o calc.actor.g.o
$(CXX) $(CXXFLAGS) $^ -o $@ $(LFLAGS) $(LDFLAGS)
void: void.o void.actor.g.o
$(CXX) $(CXXFLAGS) $(INCLUDE) $^ $(LFLAGS) -o $@ $(LDFLAGS)
loop: loop.o loop.actor.g.o delay.actor.g.o broken.actor.g.o except.actor.g.o
$(CXX) $(CXXFLAGS) $(INCLUDE) $^ $(LFLAGS) -o $@ $(LDFLAGS)
dsltest: dsltest.o dsltest.actor.g.o
$(CXX) $(CXXFLAGS) $(INCLUDE) $^ $(LFLAGS) -o $@ $(LDFLAGS)
clean:
@rm *.o $(TARGETS)
.PHONY: all clean