-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (31 loc) · 837 Bytes
/
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
#######################################################################
#######################################################################
include ./makefile.rules
SRCS := timer.cpp \
taskScheduler.cpp
OBJS := $(patsubst %.cpp, objs/%.o, $(SRCS))
EXE := $(BIN_DIR)/taskScheduler
CFLAGS += $(C++11)
VPATH := $(OBJ_DIR) \
$(BIN_DIR) \
src
DEPS := $(OBJS:.o=.d)
.PHONY: all
all : $(EXE)
$(EXE) : $(OBJS)
@echo "--------- Creating $(notdir $@) ---------"
mkdir -p ${@D}
$(CC) $(OFLAG) $@ $^ $(LIBFLAGS)
@echo "============== DONE ====================="
@echo ''
$(OBJ_DIR)/%.o : %.cpp
$(cpp_compile_rule_body)
.PHONY: clean
clean:
@echo "--------- Cleaning $(EXE) ---------"
rm -rf $(OBJ_DIR)
rm -rf $(BIN_DIR)
rm -rf $(EXE)
@echo "============== DONE ====================="
@echo ''
-include $(DEPS)