-
Notifications
You must be signed in to change notification settings - Fork 24
/
Makefile.rules
60 lines (44 loc) · 1.28 KB
/
Makefile.rules
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
# Compiler flags to generate dependency files.
GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d
CXXFLAGS += $(GENDEPFLAGS)
INC_PATH += $(OPENAHRS_INC) $(EIGENPATH)
CXXFLAGS += $(addprefix -I, $(INC_PATH) )
LDFLAGS += $(LIBS)
OBJS = $(SOURCES:.cpp=.o)
########################################################
############# RULES ###################################
########################################################
# Define Messages
# English
MSG_ERRORS_NONE = Errors: none
MSG_BEGIN = -------- begin --------
MSG_END = -------- end --------
MSG_SIZE_BEFORE = Size before:
MSG_SIZE_AFTER = Size after:
MSG_SYMBOL_TABLE = Creating Symbol Table:
MSG_LINKING = Linking:
MSG_COMPILING_C = Compiling C:
MSG_COMPILING_CPP = Compiling C++:
MSG_ASSEMBLING = Assembling:
MSG_CLEANING = Cleaning project:
MSG_CREATING_LIBRARY = Creating library:
all: $(TARGET) Makefile
@echo
@echo $(MSG_END)
$(TARGET): $(LIBS) $(OBJS) Makefile
@echo
@echo $(MSG_LINKING)
$(CXX) $(CXXFLAGS) $(OBJS) -o $(TARGET) $(LDFLAGS)
$(OBJS): %.o:%.cpp Makefile
@echo
@echo $(MSG_COMPILING_CPP) $<
$(CXX) $(CXXFLAGS) -c $< -o $@
clean:
@echo
@echo $(MSG_CLEANING)
rm -f $(OBJS)
rm -f $(TARGET)
rm -r -f .dep
# Include the dependency files.
-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
.PHONY: clean