forked from jameswalmsley/bitthunder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcpp-objects.mk
65 lines (54 loc) · 1.79 KB
/
cpp-objects.mk
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
#
# Here we define the RBUILD default implicit CPP object build rule.
#
# This overrides Make's default implicit rule for CPP objects.
#
-include $(OBJECTS:.o=.d) # Include all dependency information for all objects. (Prefixing - means if they exist).
NEW_OBJECTS = $(addprefix $(BUILD_DIR)/,$(OBJECTS))
ifeq ($(V), 3)
qd=
else
qd=@
endif
$(BUILD_DIR)/%.o: $(BUILD_BASE)%.cpp
ifeq ($(DBUILD_VERBOSE_CMD), 0)
$(Q)$(PRETTY) --dbuild "CPP" $(MODULE_NAME) $(subst $(BUILD_DIR)/,"",$@)
endif
@mkdir -p $(dir $@)
$(Q)$(CXX) -c -MD -MP $(CXXFLAGS) $< -o $@
$(POST_CC)
$(BUILD_DIR)/%.o: $(BASE)/%.cpp
ifeq ($(DBUILD_VERBOSE_CMD), 0) # Pretty print on successful compile, but still display errors when they occur.
$(Q)$(PRETTY) --dbuild "CPP" $(MODULE_NAME) $(subst $(BUILD_DIR)/,"",$@)
endif
@mkdir -p $(dir $@)
$(Q)$(CXX) -c -MD -MP $(CXXFLAGS) $< -o $@
$(POST_CC)
%.o : %.cpp
ifeq ($(DBUILD_VERBOSE_CMD), 0)
$(Q)$(PRETTY) --dbuild "CPP" $(MODULE_NAME) $(subst $(BUILD_DIR)/,"",$@)
endif
@mkdir -p $(dir $@)
$(Q)$(CXX) -c -MD -MP $(CXXFLAGS) $< -o $@
$(POST_CC)
$(BUILD_DIR)/%.o: $(BUILD_BASE)%.cc
ifeq ($(DBUILD_VERBOSE_CMD), 0)
$(Q)$(PRETTY) --dbuild "CPP" $(MODULE_NAME) $(subst $(BUILD_DIR)/,"",$@)
endif
@mkdir -p $(dir $@)
$(Q)$(CXX) -c -MD -MP $(CXXFLAGS) $< -o $@
$(POST_CC)
$(BUILD_DIR)/%.o: $(BASE)/%.cc
ifeq ($(DBUILD_VERBOSE_CMD), 0) # Pretty print on successful compile, but still display errors when they occur.
$(Q)$(PRETTY) --dbuild "CPP" $(MODULE_NAME) $(subst $(BUILD_DIR)/,"",$@)
endif
@mkdir -p $(dir $@)
$(Q)$(CXX) -c -MD -MP $(CXXFLAGS) $< -o $@
$(POST_CC)
%.o : %.cc
ifeq ($(DBUILD_VERBOSE_CMD), 0)
$(Q)$(PRETTY) --dbuild "CPP" $(MODULE_NAME) $(subst $(BUILD_DIR)/,"",$@)
endif
@mkdir -p $(dir $@)
$(Q)$(CXX) -c -MD -MP $(CXXFLAGS) $< -o $@
$(POST_CC)