-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
69 lines (43 loc) · 1.27 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
63
64
65
66
67
68
# Fill in the path to your Repl folder root
# default is the current directory; if you are in the repl folder, then no changes
# are needed for this path
REPL_PATH=./
# put in the source and executable file names
# multiple source files are separated by spaces
# Modify it to reflect your application's source files
SRCS = CxxTest.cpp
#
# executable name -- modify to your executable name
#
EXE = CxxTest
#
# Everything below that should not have to change ever.
#
export CURLHOME=${REPL_PATH}/dependencies/curl
export BRIDGES_CXX_INSTALL=${REPL_PATH}/dependencies/bridges-cxx-install/
export BRIDGES_CXXFLAGS=-I${BRIDGES_CXX_INSTALL}/include -I${CURLHOME}/include/
export BRIDGES_LDFLAGS=-L${BRIDGES_CXX_INSTALL}/lib -L${CURLHOME}/lib/
export BRIDGES_CXX=clang++
export BRIDGES_CC=clang++
export BRIDGES_LD=clang++
export LD_LIBRARY_PATH:=${CURLHOME}/lib:${LD_LIBRARY_PATH}
CXX=$(BRIDGES_CXX)
LD=$(BRIDGES_LD)
CC=$(BRIDGES_CC)
TARGET = all
OBJS = $(SRCS:.cpp=.o)
CXXFLAGS = -g -std=c++14 $(BRIDGES_CXXFLAGS)
LDFLAGS = -g $(BRIDGES_LDFLAGS) -pthread
LIBS = -lcurl -lbridges
$(EXE): $(OBJS)
$(CXX) -o $(EXE) $(OBJS) $(LDFLAGS) $(LIBS)
.SUFFIXES: .cpp
.cpp.o:
$(CXX) $(CXXFLAGS) -c $< -o $@
all : $(EXE)
./$(EXE)
run: $(EXE)
./$(EXE)
clean:
-rm $(OBJS)
-rm $(EXE)