forked from freemint/qed
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDEPENDENCIES
More file actions
35 lines (26 loc) · 841 Bytes
/
Copy pathDEPENDENCIES
File metadata and controls
35 lines (26 loc) · 841 Bytes
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
# These are some standard dependencies rules common to all Makefiles.
COMPILE = $(filter-out $(NOCFLAGS-$(<F)), $(filter-out $(nocflags),\
$(CC) $(cflags) $(CFLAGS) $(CFLAGS-$(<F)) $(CFLAGS-$(DIRSTEM))) \
$(DEFS-$(<F)) $(DEFS-$(DIRSTEM)))
#
# compile rule
#
%.o: %.c
@echo "$(COMPILE) -c $< -o $@"; \
$(COMPILE) -Wp,-MD,.deps/$(@:.o=.P) -c $< -o $@
%.o: %.S
@echo '$(COMPILE) -c $< -o $@'; \
$(COMPILE) -Wp,-MD,.deps/$(@:.o=.P) -c $< -o $@
%.o: %.s
@echo "$(COMPILE) -c $< -o $@"; \
$(COMPILE) -Wp,-MD,.deps/$(@:.o=.P) -c $< -o $@
#
# dependencies
#
DEP_FILES = $(addprefix ./.deps/, $(patsubst %.o,%.P,$(OBJS)))
# These are automatically remade, no need for make to worry about
# them.
.PHONY : $(DEP_FILES)
DEPS_MAGIC := $(shell mkdir ./.deps > /dev/null 2>&1 || :)
.SECONDARY : $(DEP_FILES)
-include $(DEP_FILES) /dev/null