mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
depend.mk, rules.mk: Move dependency rules from rules.mk to depend.mk
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
0dcb71a7b1
commit
e37efb1a5e
2 changed files with 18 additions and 22 deletions
|
|
@ -4,8 +4,16 @@ DEPEND_CPPFLAGS += -D__MAKEDEPEND__
|
|||
DEPEND_MK += $(addprefix .,$(addsuffix .dep.mk, $(OBJ)))
|
||||
|
||||
ifeq ($(DEPEND_MK_INCLUDED),)
|
||||
# mandatory target behaviour
|
||||
|
||||
all:
|
||||
clean: depclean
|
||||
|
||||
# convenience targets
|
||||
dep: $(DEPEND_MK)
|
||||
depclean:
|
||||
$(RM) -f .*.dep.mk
|
||||
|
||||
$(DEPEND_MK): $(PREREQ_DONE)
|
||||
|
||||
ifneq ($(DEPEND_MK),)
|
||||
ifeq ($(MAKECMDGOALS),)
|
||||
|
|
@ -16,16 +24,16 @@ ifneq ($(DEPEND_MK),)
|
|||
endif
|
||||
endif
|
||||
|
||||
clean: depclean my_depclean
|
||||
|
||||
# convenience targets
|
||||
dep: $(DEPEND_MK)
|
||||
my_depclean:
|
||||
$(RM) -f .*.dep.mk
|
||||
|
||||
# rules
|
||||
$(DEPEND_MK): $(PREREQ_DONE)
|
||||
%.o: .%.o.dep.mk
|
||||
|
||||
.%.o.dep.mk: %.cpp $(BUILD_HDR)
|
||||
$(CC) -M $(BUILD_CPPFLAGS) $(DEPEND_CPPFLAGS) $< -o $@
|
||||
|
||||
.%.o.dep.mk: %.cc $(BUILD_HDR)
|
||||
$(CC) -M $(BUILD_CPPFLAGS) $(DEPEND_CPPFLAGS) $< -o $@
|
||||
|
||||
.%.o.dep.mk: %.c $(BUILD_HDR)
|
||||
$(CC) -M $(BUILD_CFLAGS) $(DEPEND_CPPFLAGS) $< -o $@
|
||||
|
||||
endif # DEPEND_MK_INCLUDED
|
||||
DEPEND_MK_INCLUDED := true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue