-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (36 loc) · 1010 Bytes
/
Makefile
File metadata and controls
51 lines (36 loc) · 1010 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
#
# concurrency_profiler makefile
#
SRC = src
BIN = bin
INC = inc
EXE = profiler
DEXE = d_profiler
CXX = g++
CXXFLAGS = -std=c++11 -O2 -Wall
INCLUDEFLAGS = -I$(INC)
EXTRAFLAGS = -ltbb -L$(TBB_PATH)
SOURCES = $(wildcard $(SRC)/*.cpp)
OBJS = $(SOURCES:src/%.cpp=bin/%.o)
DOBJS = $(OBJS:bin/%.o=bin/d_%.o)
all: $(EXE)
@echo ========== finished building ==========
@echo
debug: $(DEXE)
$(EXE): $(OBJS)
@echo building executable "$@"
@$(CXX) $(CXXFLAGS) $(EXTRAFLAGS) $(INCLUDEFLAGS) $(OBJS) -o profiler
$(DEXE): $(DOBJS)
@$(CXX) $(CXXFLAGS) $(EXTRAFLAGS) $(INCLUDEFLAGS) $(DOBJS) -g -o d_profiler
$(BIN)/%.o: $(SRC)/%.cpp $(INC)/%.h begin
@echo building dependency "$@"
@$(CXX) $(CXXFLAGS) $(INCLUDEFLAGS) -o $@ -c $<
$(BIN)/d_%.o: $(SRC)/%.cpp $(INC)/%.h
@$(CXX) $(CXXFLAGS) $(INCLUDEFLAGS) -g -o $@ -c $<
run: all
@source setup && ./$(EXE)
clean:
@echo ========== cleaning up ===========
@rm -f *~ $(BIN)/*.o profiler d_profiler
begin:
@echo ========== started building ===========