-
Notifications
You must be signed in to change notification settings - Fork 6
/
Files.mk
107 lines (89 loc) · 3.86 KB
/
Files.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
####################################### DEPENDENCIES ##########
#################################
# Obtain depdendency file names #
DEPENDENCIES = $(OBJECTS:%.o=%.d)
####################################### NORMAL FILES ##########
#####################
# Build a NASM file #
$(BUILD_DIR)/%.asm.o: $(SRC_DIR)/%.asm $(MAKEFILE_LIST)
# @ echo "/STD/Asm:" $< ">" $@
@ mkdir -p $(@D)
@+ $(PRE_COMPILATION) $(AS) $(ASFLAGS) $< -o $@ $(POST_COMPILATION)
####################
# Build a GAS file #
$(BUILD_DIR)/%.s.o: $(SRC_DIR)/%.s $(MAKEFILE_LIST)
# @ echo "/STD/Gas:" $< ">" $@
@ mkdir -p $(@D)
@+ $(PRE_COMPILATION) $(GAS) $(GASFLAGS) -c $< -o $@ $(POST_COMPILATION)
##################
# Build a C file #
$(BUILD_DIR)/%.c.o: $(SRC_DIR)/%.c $(MAKEFILE_LIST)
# @ echo "/STD/C__:" $< ">" $@
@ mkdir -p $(@D)
@+ $(PRE_COMPILATION) $(CC) $(CFLAGS) -MD -MP -c $< -o $@ $(POST_COMPILATION)
# + $(PRE_COMPILATION) $(CC) $(CFLAGS) -Wa,-aslh -c $< -o $@ $(POST_COMPILATION) 1> [email protected]
####################
# Build a C++ file #
$(BUILD_DIR)/%.cpp.o: $(SRC_DIR)/%.cpp $(MAKEFILE_LIST)
# @ echo "/STD/C++:" $< ">" $@
@ mkdir -p $(@D)
@+ $(PRE_COMPILATION) $(CXX) $(CXXFLAGS) -MD -MP -c $< -o $@ $(POST_COMPILATION)
# + $(PRE_COMPILATION) $(CXX) $(CXXFLAGS) -Wa,-aslh -c $< -o $@ $(POST_COMPILATION) 1> [email protected]
####################################### ARCHITECTURE FILES ##########
#####################
# Build a NASM file #
$(BUILD_DIR)/%.asm.arc.o: $(ARC_DIR)/$(ARC)/src/%.asm $(MAKEFILE_LIST)
# @ echo "/ARC/Asm:" $< ">" $@
@ mkdir -p $(@D)
@+ $(PRE_COMPILATION) $(AS) $(ASFLAGS) $< -o $@ $(POST_COMPILATION)
####################
# Build a GAS file #
$(BUILD_DIR)/%.s.arc.o: $(ARC_DIR)/$(ARC)/src/%.s $(MAKEFILE_LIST)
# @ echo "/ARC/Gas:" $< ">" $@
@ mkdir -p $(@D)
@+ $(PRE_COMPILATION) $(GAS) $(GASFLAGS) -c $< -o $@ $(POST_COMPILATION)
##################
# Build a C file #
$(BUILD_DIR)/%.c.arc.o: $(ARC_DIR)/$(ARC)/src/%.c $(MAKEFILE_LIST)
# @ echo "/ARC/C__:" $< ">" $@
@ mkdir -p $(@D)
@+ $(PRE_COMPILATION) $(CC) $(CFLAGS) -MD -MP -c $< -o $@ $(POST_COMPILATION)
# + $(PRE_COMPILATION) $(CC) $(CFLAGS) -Wa,-aslh -c $< -o $@ $(POST_COMPILATION) 1> [email protected]
####################
# Build a C++ file #
$(BUILD_DIR)/%.cpp.arc.o: $(ARC_DIR)/$(ARC)/src/%.cpp $(MAKEFILE_LIST)
# @ echo "/ARC/C++:" $< ">" $@
@ mkdir -p $(@D)
@+ $(PRE_COMPILATION) $(CXX) $(CXXFLAGS) -MD -MP -c $< -o $@ $(POST_COMPILATION)
# + $(PRE_COMPILATION) $(CXX) $(CXXFLAGS) -Wa,-aslh -c $< -o $@ $(POST_COMPILATION) 1> [email protected]
####################################### AUXILIARY FILES ##########
#####################
# Build a NASM file #
$(BUILD_DIR)/%.asm.aux.o: $(AUX_DIR)/$(AUX)/src/%.asm $(MAKEFILE_LIST)
# @ echo "/AUX/Asm:" $< ">" $@
@ mkdir -p $(@D)
@+ $(PRE_COMPILATION) $(AS) $(ASFLAGS) $< -o $@ $(POST_COMPILATION)
####################
# Build a GAS file #
$(BUILD_DIR)/%.s.aux.o: $(AUX_DIR)/$(AUX)/src/%.s $(MAKEFILE_LIST)
# @ echo "/AUX/Gas:" $< ">" $@
@ mkdir -p $(@D)
@+ $(PRE_COMPILATION) $(GAS) $(GASFLAGS) -c $< -o $@ $(POST_COMPILATION)
##################
# Build a C file #
$(BUILD_DIR)/%.c.aux.o: $(AUX_DIR)/$(AUX)/src/%.c $(MAKEFILE_LIST)
# @ echo "/AUX/C__:" $< ">" $@
@ mkdir -p $(@D)
@+ $(PRE_COMPILATION) $(CC) $(CFLAGS) -MD -MP -c $< -o $@ $(POST_COMPILATION)
# + $(PRE_COMPILATION) $(CC) $(CFLAGS) -Wa,-aslh -c $< -o $@ $(POST_COMPILATION) 1> [email protected]
####################
# Build a C++ file #
$(BUILD_DIR)/%.cpp.aux.o: $(AUX_DIR)/$(AUX)/src/%.cpp $(MAKEFILE_LIST)
# @ echo "/AUX/C++:" $< ">" $@
@ mkdir -p $(@D)
@+ $(PRE_COMPILATION) $(CXX) $(CXXFLAGS) -MD -MP -c $< -o $@ $(POST_COMPILATION)
# + $(PRE_COMPILATION) $(CXX) $(CXXFLAGS) -Wa,-aslh -c $< -o $@ $(POST_COMPILATION) 1> [email protected]
####################################### DEPENDENCIES ##########
################################
# Include all dependency files #
-include $(DEPENDENCIES)