-
Notifications
You must be signed in to change notification settings - Fork 0
/
common_target.mk
107 lines (88 loc) · 3.21 KB
/
common_target.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
##
# Copyright (C) 2021 Alibaba Group Holding Limited
# Author: LuChongzhi <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
##
OBJS_1 = $(SRCS_1:.c=.o)
$(TARGET_1): $(OBJS_1) $(PREPARE)
@mkdir -p $(OUTPUT_DIR)
@echo ">>> Linking" $@ "..."
$(CC) $(LFLAGS) -o $@ $(addprefix .obj/,$(notdir $(OBJS_1))) -Wl,--start-group $(LIBS) $(LIBS_1) -Wl,--end-group
cp $@ $(OUTPUT_DIR)
$(OBJS_1): %.o:%.c
@mkdir -p .obj
@echo ">>> Compiling" $< "..."
$(CC) $(CFLAGS) $(INCLUDE) -c -o .obj/$(notdir $@) $<
OBJS_2 = $(SRCS_2:.c=.o)
$(TARGET_2): $(OBJS_2) $(PREPARE)
@mkdir -p $(OUTPUT_DIR)
@echo ">>> Linking" $@ "..."
$(CC) $(LFLAGS) -o $@ $(addprefix .obj/,$(notdir $(OBJS_2))) -Wl,--start-group $(LIBS) $(LIBS_2) -Wl,--end-group
cp $@ $(OUTPUT_DIR)
$(OBJS_2): %.o:%.c
@mkdir -p .obj
@echo ">>> Compiling" $< "..."
$(CC) $(CFLAGS) $(INCLUDE) -c -o .obj/$(notdir $@) $<
OBJS_3 = $(SRCS_3:.c=.o)
$(TARGET_3): $(OBJS_3) $(PREPARE)
@mkdir -p $(OUTPUT_DIR)
@echo ">>> Linking" $@ "..."
$(CC) $(LFLAGS) -o $@ $(addprefix .obj/,$(notdir $(OBJS_3))) -Wl,--start-group $(LIBS) $(LIBS_3) -Wl,--end-group
cp $@ $(OUTPUT_DIR)
$(OBJS_3): %.o:%.c
@mkdir -p .obj
@echo ">>> Compiling" $< "..."
$(CC) $(CFLAGS) $(INCLUDE) -c -o .obj/$(notdir $@) $<
OBJS_4 = $(SRCS_4:.c=.o)
$(TARGET_4): $(OBJS_4) $(PREPARE)
@mkdir -p $(OUTPUT_DIR)
@echo ">>> Linking" $@ "..."
$(CC) $(LFLAGS) -o $@ $(addprefix .obj/,$(notdir $(OBJS_4))) -Wl,--start-group $(LIBS) $(LIBS_4) -Wl,--end-group
cp $@ $(OUTPUT_DIR)
$(OBJS_4): %.o:%.c
@mkdir -p .obj
@echo ">>> Compiling" $< "..."
$(CC) $(CFLAGS) $(INCLUDE) -c -o .obj/$(notdir $@) $<
OBJS_5 = $(SRCS_5:.c=.o)
$(TARGET_5): $(OBJS_5) $(PREPARE)
@mkdir -p $(OUTPUT_DIR)
@echo ">>> Linking" $@ "..."
$(CC) $(LFLAGS) -o $@ $(addprefix .obj/,$(notdir $(OBJS_5))) -Wl,--start-group $(LIBS) $(LIBS_5) -Wl,--end-group
cp $@ $(OUTPUT_DIR)
$(OBJS_5): %.o:%.c
@mkdir -p .obj
@echo ">>> Compiling" $< "..."
$(CC) $(CFLAGS) $(INCLUDE) -c -o .obj/$(notdir $@) $<
OBJS_6 = $(SRCS_6:.c=.o)
$(TARGET_6): $(OBJS_6) $(PREPARE)
@mkdir -p $(OUTPUT_DIR)
@echo ">>> Linking" $@ "..."
$(CC) $(LFLAGS) -o $@ $(addprefix .obj/,$(notdir $(OBJS_6))) -Wl,--start-group $(LIBS) $(LIBS_6) -Wl,--end-group
cp $@ $(OUTPUT_DIR)
$(OBJS_6): %.o:%.c
@mkdir -p .obj
@echo ">>> Compiling" $< "..."
$(CC) $(CFLAGS) $(INCLUDE) -c -o .obj/$(notdir $@) $<
OBJS_7 = $(SRCS_7:.c=.o)
$(TARGET_7): $(OBJS_7) $(PREPARE)
@mkdir -p $(OUTPUT_DIR)
@echo ">>> Linking" $@ "..."
$(CC) $(LFLAGS) -o $@ $(addprefix .obj/,$(notdir $(OBJS_7))) -Wl,--start-group $(LIBS) $(LIBS_7) -Wl,--end-group
cp $@ $(OUTPUT_DIR)
$(OBJS_7): %.o:%.c
@mkdir -p .obj
@echo ">>> Compiling" $< "..."
$(CC) $(CFLAGS) $(INCLUDE) -c -o .obj/$(notdir $@) $<
OBJS_8 = $(SRCS_8:.c=.o)
$(TARGET_8): $(OBJS_8) $(PREPARE)
@mkdir -p $(OUTPUT_DIR)
@echo ">>> Linking" $@ "..."
$(CC) $(LFLAGS) -o $@ $(addprefix .obj/,$(notdir $(OBJS_8))) -Wl,--start-group $(LIBS) $(LIBS_8) -Wl,--end-group
cp $@ $(OUTPUT_DIR)
$(OBJS_8): %.o:%.c
@mkdir -p .obj
@echo ">>> Compiling" $< "..."
$(CC) $(CFLAGS) $(INCLUDE) -c -o .obj/$(notdir $@) $<